aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/firemon.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-07 17:37:36 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-07 17:37:36 -0400
commit752c3a43a322b40c1a43012735aa797d9e3c7435 (patch)
tree0835b4d1bed77eb61cd1f6ef179541310d470881 /src/firemon/firemon.c
parentadded dnsmasq profile (diff)
downloadfirejail-752c3a43a322b40c1a43012735aa797d9e3c7435.tar.gz
firejail-752c3a43a322b40c1a43012735aa797d9e3c7435.tar.zst
firejail-752c3a43a322b40c1a43012735aa797d9e3c7435.zip
grsecurity fixes
Diffstat (limited to 'src/firemon/firemon.c')
-rw-r--r--src/firemon/firemon.c12
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 }