From: Lennart Poettering Date: Mon, 24 May 2010 16:59:13 +0000 (+0200) Subject: main: don't try to mount api dirs if we are not root X-Git-Tag: 0.git+20100605+dfd8ee-1~11^2^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8efe3c0114758f229273f17944fd6f2952b10c52;p=systemd main: don't try to mount api dirs if we are not root --- diff --git a/src/main.c b/src/main.c index d7d3995e..7a829cea 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);