aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/firemon.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-04-05 13:17:20 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-04-05 13:17:20 -0400
commit10c7565f9d414d745122dac2e441f5e816db7843 (patch)
treed6e56dacb20561abeb59c3bebd2ca857f4c35112 /src/firemon/firemon.c
parentfirecfg fixes (diff)
downloadfirejail-10c7565f9d414d745122dac2e441f5e816db7843.tar.gz
firejail-10c7565f9d414d745122dac2e441f5e816db7843.tar.zst
firejail-10c7565f9d414d745122dac2e441f5e816db7843.zip
grsecurity: --caps.print
Diffstat (limited to 'src/firemon/firemon.c')
-rw-r--r--src/firemon/firemon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c
index 0e38696ac..9c3558362 100644
--- a/src/firemon/firemon.c
+++ b/src/firemon/firemon.c
@@ -23,7 +23,8 @@
23#include <sys/ioctl.h> 23#include <sys/ioctl.h>
24#include <sys/prctl.h> 24#include <sys/prctl.h>
25#include <grp.h> 25#include <grp.h>
26 26#include <sys/stat.h>
27
27 28
28static int arg_route = 0; 29static int arg_route = 0;
29static int arg_arp = 0; 30static int arg_arp = 0;
@@ -111,6 +112,12 @@ int main(int argc, char **argv) {
111 unsigned pid = 0; 112 unsigned pid = 0;
112 int i; 113 int i;
113 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
114 // handle CTRL-C 121 // handle CTRL-C
115 signal (SIGINT, my_handler); 122 signal (SIGINT, my_handler);
116 signal (SIGTERM, my_handler); 123 signal (SIGTERM, my_handler);