main: don't try to mount api dirs if we are not root
This commit is contained in:
parent
1e89ced119
commit
8efe3c0114
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue