chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
main: make it possible to run a system daemon along side an aloready running one...
[elogind.git]
/
src
/
systemctl.c
diff --git
a/src/systemctl.c
b/src/systemctl.c
index a9a975ee8188648ceb775d5b3ce0e6e1bc801986..03143379030cf2d7e10213a6fc071dfe8d530262 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-3156,7
+3156,12
@@
static int start_with_fallback(DBusConnection *bus) {
static int halt_main(DBusConnection *bus) {
int r;
- if (!arg_immediate)
+ if (geteuid() != 0) {
+ log_error("Must to be root.");
+ return -EPERM;
+ }
+
+ if (!arg_dry && !arg_immediate)
return start_with_fallback(bus);
if (!arg_no_wtmp)