]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/misc-progs/getconntracktable.c
core115: Include captive portal in updater
[ipfire-2.x.git] / src / misc-progs / getconntracktable.c
index 674b211b5cc0bdeaaa3f65c8bd103fe1834b7712..78eb11ad85ec58558c290172a26c03006894bc6c 100644 (file)
@@ -1,31 +1,31 @@
-/* IPFire helper program - getconntracktable\r
- *\r
- * This program is distributed under the terms of the GNU General Public\r
- * Licence.  See the file COPYING for details.\r
- *\r
- * The kernel's connection tracking table is not readable by\r
- * non-root users. So this helper will just read and output it.\r
- */\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include "setuid.h"\r
-\r
-int main(void) {\r
-       if (!(initsetuid()))\r
-               exit(1);\r
-\r
-       FILE *fp = fopen("/proc/net/nf_conntrack", "r");\r
-       if (fp == NULL) {\r
-               exit(1);\r
-       }\r
-\r
-       /* Read content line by line and write it to stdout. */\r
-       char linebuf[STRING_SIZE];\r
-       while (fgets(linebuf, STRING_SIZE, fp)) {\r
-               printf("%s", linebuf);\r
-       }\r
-\r
-       fclose(fp);\r
-       return 0;\r
-}\r
+/* IPFire helper program - getconntracktable
+ *
+ * This program is distributed under the terms of the GNU General Public
+ * Licence.  See the file COPYING for details.
+ *
+ * The kernel's connection tracking table is not readable by
+ * non-root users. So this helper will just read and output it.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "setuid.h"
+
+int main(void) {
+       if (!(initsetuid()))
+               exit(1);
+
+       FILE *fp = fopen("/proc/net/nf_conntrack", "r");
+       if (fp == NULL) {
+               exit(1);
+       }
+
+       /* Read content line by line and write it to stdout. */
+       char linebuf[STRING_SIZE];
+       while (fgets(linebuf, STRING_SIZE, fp)) {
+               printf("%s", linebuf);
+       }
+
+       fclose(fp);
+       return 0;
+}