projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
febe813
)
logind-action: check if inhibit_what is valid
author
Mike Yuan
<me@yhndnzj.com>
Thu, 16 Nov 2023 09:47:47 +0000
(17:47 +0800)
committer
Mike Yuan
<me@yhndnzj.com>
Thu, 16 Nov 2023 09:49:33 +0000
(17:49 +0800)
Fixes #30037
src/login/logind-action.c
patch
|
blob
|
history
diff --git
a/src/login/logind-action.c
b/src/login/logind-action.c
index
c1d60af
..
e678edd
100644
(file)
--- a/
src/login/logind-action.c
+++ b/
src/login/logind-action.c
@@
-172,7
+172,8
@@
static int handle_action_execute(
inhibit_operation = handle_action_lookup(handle)->inhibit_what;
/* If the actual operation is inhibited, warn and fail */
- if (!ignore_inhibited &&
+ if (inhibit_what_is_valid(inhibit_operation) &&
+ !ignore_inhibited &&
manager_is_inhibited(m, inhibit_operation, INHIBIT_BLOCK, NULL, false, false, 0, &offending)) {
_cleanup_free_ char *comm = NULL, *u = NULL;