From 8efe3c0114758f229273f17944fd6f2952b10c52 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 May 2010 18:59:13 +0200 Subject: [PATCH] main: don't try to mount api dirs if we are not root --- src/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.39.5