aboutsummaryrefslogtreecommitdiffstats
path: root/src/firemon/firemon.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-01-24 08:48:50 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2018-01-24 08:48:50 -0500
commit5ebebb1211364a4d7164ad30d021adabf5374d32 (patch)
treeadcd26d88b059d25e058e19c56dd496c811e1690 /src/firemon/firemon.c
parentapparmor support for --overlay sandboxes (diff)
downloadfirejail-5ebebb1211364a4d7164ad30d021adabf5374d32.tar.gz
firejail-5ebebb1211364a4d7164ad30d021adabf5374d32.tar.zst
firejail-5ebebb1211364a4d7164ad30d021adabf5374d32.zip
added firejail --apparmor.print and firemon --apparmor
Diffstat (limited to 'src/firemon/firemon.c')
-rw-r--r--src/firemon/firemon.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/firemon/firemon.c b/src/firemon/firemon.c
index 44e2b8687..54f0c5fc9 100644
--- a/src/firemon/firemon.c
+++ b/src/firemon/firemon.c
@@ -37,6 +37,7 @@ static int arg_x11 = 0;
37static int arg_top = 0; 37static int arg_top = 0;
38static int arg_list = 0; 38static int arg_list = 0;
39static int arg_netstats = 0; 39static int arg_netstats = 0;
40static int arg_apparmor = 0;
40int arg_nowrap = 0; 41int arg_nowrap = 0;
41 42
42static struct termios tlocal; // startup terminal setting 43static struct termios tlocal; // startup terminal setting
@@ -178,6 +179,8 @@ int main(int argc, char **argv) {
178 arg_route = 1; 179 arg_route = 1;
179 else if (strcmp(argv[i], "--arp") == 0) 180 else if (strcmp(argv[i], "--arp") == 0)
180 arg_arp = 1; 181 arg_arp = 1;
182 else if (strcmp(argv[i], "--apparmor") == 0)
183 arg_apparmor = 1;
181 184
182 else if (strncmp(argv[i], "--name=", 7) == 0) { 185 else if (strncmp(argv[i], "--name=", 7) == 0) {
183 char *name = argv[i] + 7; 186 char *name = argv[i] + 7;
@@ -238,7 +241,7 @@ int main(int argc, char **argv) {
238 } 241 }
239 242
240 // if --name requested without other options, print all data 243 // if --name requested without other options, print all data
241 if (pid && !arg_cpu && !arg_seccomp && !arg_caps && 244 if (pid && !arg_cpu && !arg_seccomp && !arg_caps && !arg_apparmor &&
242 !arg_cgroup && !arg_x11 && !arg_interface && !arg_route && !arg_arp) { 245 !arg_cgroup && !arg_x11 && !arg_interface && !arg_route && !arg_arp) {
243 arg_tree = 1; 246 arg_tree = 1;
244 arg_cpu = 1; 247 arg_cpu = 1;
@@ -249,6 +252,7 @@ int main(int argc, char **argv) {
249 arg_interface = 1; 252 arg_interface = 1;
250 arg_route = 1; 253 arg_route = 1;
251 arg_arp = 1; 254 arg_arp = 1;
255 arg_apparmor = 1;
252 } 256 }
253 257
254 // cumulative options 258 // cumulative options
@@ -265,6 +269,10 @@ int main(int argc, char **argv) {
265 caps((pid_t) pid, print_procs); 269 caps((pid_t) pid, print_procs);
266 print_procs = 0; 270 print_procs = 0;
267 } 271 }
272 if (arg_apparmor) {
273 apparmor((pid_t) pid, print_procs);
274 print_procs = 0;
275 }
268 if (arg_cgroup) { 276 if (arg_cgroup) {
269 cgroup((pid_t) pid, print_procs); 277 cgroup((pid_t) pid, print_procs);
270 print_procs = 0; 278 print_procs = 0;