diff options
Diffstat (limited to 'src/firemon')
-rw-r--r-- | src/firemon/firemon.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c index 9c3558362..3140c5f70 100644 --- a/src/firemon/firemon.c +++ b/src/firemon/firemon.c | |||
@@ -112,12 +112,6 @@ int main(int argc, char **argv) { | |||
112 | unsigned pid = 0; | 112 | unsigned pid = 0; |
113 | int i; | 113 | int i; |
114 | 114 | ||
115 | struct stat s; | ||
116 | if (getuid() != 0 &&stat("/proc/sys/kernel/grsecurity", &s) == 0) { | ||
117 | fprintf(stderr, "Error: on Grsecurity systems only root user can run this program\n"); | ||
118 | exit(1); | ||
119 | } | ||
120 | |||
121 | // handle CTRL-C | 115 | // handle CTRL-C |
122 | signal (SIGINT, my_handler); | 116 | signal (SIGINT, my_handler); |
123 | signal (SIGTERM, my_handler); | 117 | signal (SIGTERM, my_handler); |
@@ -143,6 +137,12 @@ int main(int argc, char **argv) { | |||
143 | return 0; | 137 | return 0; |
144 | } | 138 | } |
145 | else if (strcmp(argv[i], "--netstats") == 0) { | 139 | else if (strcmp(argv[i], "--netstats") == 0) { |
140 | struct stat s; | ||
141 | if (getuid() != 0 && stat("/proc/sys/kernel/grsecurity", &s) == 0) { | ||
142 | fprintf(stderr, "Error: this feature is not available on Grsecurity systems\n"); | ||
143 | exit(1); | ||
144 | } | ||
145 | |||
146 | netstats(); | 146 | netstats(); |
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |