diff options
-rw-r--r-- | src/systemctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 01deafe2a1..0314337903 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -3156,6 +3156,11 @@ static int start_with_fallback(DBusConnection *bus) { static int halt_main(DBusConnection *bus) { int r; + if (geteuid() != 0) { + log_error("Must to be root."); + return -EPERM; + } + if (!arg_dry && !arg_immediate) return start_with_fallback(bus); |