diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2021-12-20 18:05:50 +0100 |
---|---|---|
committer | Ludwig Nussel <ludwig.nussel@suse.de> | 2022-01-25 17:43:13 +0100 |
commit | 38d55bf2641f345445cb4e6a5e5e808555591db2 (patch) | |
tree | e367da67c0851fb7ead347fc68b72fd0d557b2c0 /src/systemctl/systemctl-compat-halt.c | |
parent | 5ed73478e1b1560274038ef30ec6f89022b4d8f6 (diff) | |
download | systemd-38d55bf2641f345445cb4e6a5e5e808555591db2.tar.gz |
systemctl: shutdown don't fallback on auth fail
For shutdowns don't fall back to starting the target directly if talking
to logind failed with auth failure. That would just lead to another
polkit auth attempt.
Diffstat (limited to 'src/systemctl/systemctl-compat-halt.c')
-rw-r--r-- | src/systemctl/systemctl-compat-halt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl-compat-halt.c b/src/systemctl/systemctl-compat-halt.c index 7d95d34d54..a7d3ffadf4 100644 --- a/src/systemctl/systemctl-compat-halt.c +++ b/src/systemctl/systemctl-compat-halt.c @@ -156,8 +156,8 @@ int halt_main(void) { } if (r >= 0) return r; - if (IN_SET(r, -EOPNOTSUPP, -EINPROGRESS)) - /* Requested operation is not supported on the local system or already in + if (IN_SET(r, -EACCES, -EOPNOTSUPP, -EINPROGRESS)) + /* Requested operation requires auth, is not supported on the local system or already in * progress */ return r; /* on all other errors, try low-level operation */ |