summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d7d3995e1b..7a829cea5c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -582,8 +582,9 @@ int main(int argc, char *argv[]) {
/* Mount /proc, /sys and friends, so that /proc/cmdline and
* /proc/$PID/fd is available. */
- if (mount_setup() < 0)
- goto finish;
+ if (geteuid() == 0)
+ if (mount_setup() < 0)
+ goto finish;
/* Reset all signal handlers. */
assert_se(reset_all_signal_handlers() == 0);