summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-24 18:59:13 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-24 18:59:13 +0200
commit8efe3c0114758f229273f17944fd6f2952b10c52 (patch)
tree598c4c55a713b3d0e59a576f20e693c26edd5d4f
parent1e89ced119b1b80d21fca778fb20eb818b6f20c5 (diff)
main: don't try to mount api dirs if we are not root
-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);