diff options
Diffstat (limited to 'src/firejail/list.c')
-rw-r--r-- | src/firejail/list.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/firejail/list.c b/src/firejail/list.c index d5ef1ac2c..676df6a14 100644 --- a/src/firejail/list.c +++ b/src/firejail/list.c | |||
@@ -20,8 +20,7 @@ | |||
20 | #include "firejail.h" | 20 | #include "firejail.h" |
21 | 21 | ||
22 | void top(void) { | 22 | void top(void) { |
23 | if (getuid() != geteuid()) | 23 | EUID_ASSERT(); |
24 | drop_privs(1); | ||
25 | 24 | ||
26 | char *arg[4]; | 25 | char *arg[4]; |
27 | arg[0] = "bash"; | 26 | arg[0] = "bash"; |
@@ -32,8 +31,7 @@ void top(void) { | |||
32 | } | 31 | } |
33 | 32 | ||
34 | void netstats(void) { | 33 | void netstats(void) { |
35 | if (getuid() != geteuid()) | 34 | EUID_ASSERT(); |
36 | drop_privs(1); | ||
37 | 35 | ||
38 | char *arg[4]; | 36 | char *arg[4]; |
39 | arg[0] = "bash"; | 37 | arg[0] = "bash"; |
@@ -44,8 +42,7 @@ void netstats(void) { | |||
44 | } | 42 | } |
45 | 43 | ||
46 | void list(void) { | 44 | void list(void) { |
47 | if (getuid() != geteuid()) | 45 | EUID_ASSERT(); |
48 | drop_privs(1); | ||
49 | 46 | ||
50 | char *arg[4]; | 47 | char *arg[4]; |
51 | arg[0] = "bash"; | 48 | arg[0] = "bash"; |
@@ -56,8 +53,7 @@ void list(void) { | |||
56 | } | 53 | } |
57 | 54 | ||
58 | void tree(void) { | 55 | void tree(void) { |
59 | if (getuid() != geteuid()) | 56 | EUID_ASSERT(); |
60 | drop_privs(1); | ||
61 | 57 | ||
62 | char *arg[4]; | 58 | char *arg[4]; |
63 | arg[0] = "bash"; | 59 | arg[0] = "bash"; |