aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/list.c')
-rw-r--r--src/firejail/list.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/firejail/list.c b/src/firejail/list.c
new file mode 100644
index 000000000..c2c4e801f
--- /dev/null
+++ b/src/firejail/list.c
@@ -0,0 +1,65 @@
1/*
2 * Copyright (C) 2014, 2015 netblue30 (netblue30@yahoo.com)
3 *
4 * This file is part of firejail project
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19*/
20#include "firejail.h"
21
22void top(void) {
23 drop_privs(1);
24
25 char *arg[4];
26 arg[0] = "bash";
27 arg[1] = "-c";
28 arg[2] = "firemon --top";
29 arg[3] = NULL;
30 execvp("/bin/bash", arg);
31}
32
33void netstats(void) {
34 drop_privs(1);
35
36 char *arg[4];
37 arg[0] = "bash";
38 arg[1] = "-c";
39 arg[2] = "firemon --netstats";
40 arg[3] = NULL;
41 execvp("/bin/bash", arg);
42}
43
44void list(void) {
45 drop_privs(1);
46
47 char *arg[4];
48 arg[0] = "bash";
49 arg[1] = "-c";
50 arg[2] = "firemon --list";
51 arg[3] = NULL;
52 execvp("/bin/bash", arg);
53}
54
55void tree(void) {
56 drop_privs(1);
57
58 char *arg[4];
59 arg[0] = "bash";
60 arg[1] = "-c";
61 arg[2] = "firemon --tree";
62 arg[3] = NULL;
63 execvp("/bin/bash", arg);
64}
65