mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
systemctl: use the retval of must_be_root()
This commit is contained in:
parent
1f9425d1c4
commit
5aa48b6de1
@ -180,10 +180,9 @@ int halt_main(void) {
|
||||
return start_with_fallback();
|
||||
}
|
||||
|
||||
if (geteuid() != 0) {
|
||||
(void) must_be_root();
|
||||
return -EPERM;
|
||||
}
|
||||
r = must_be_root();
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (!arg_no_wtmp) {
|
||||
if (sd_booted() > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user