summaryrefslogtreecommitdiffstats
path: root/src/basic/user-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-01-19 11:32:26 +0100
committerLennart Poettering <lennart@poettering.net>2024-01-22 17:55:07 +0100
commit829854afa5e38db30be207fc8f8f80705e623795 (patch)
treed5cc6226295330ecf452d861c7b25b704637ab45 /src/basic/user-util.c
parentMerge pull request #31023 from poettering/vmspawn-work (diff)
downloadsystemd-829854afa5e38db30be207fc8f8f80705e623795.tar.xz
systemd-829854afa5e38db30be207fc8f8f80705e623795.zip
user-util: validate the right field
Diffstat (limited to 'src/basic/user-util.c')
-rw-r--r--src/basic/user-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
index 1cea96242e..ae6f13a8cf 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
@@ -322,7 +322,7 @@ int get_user_creds(
if (ret_shell)
*ret_shell = (FLAGS_SET(flags, USER_CREDS_CLEAN) &&
(isempty(p->pw_shell) ||
- !path_is_valid(p->pw_dir) ||
+ !path_is_valid(p->pw_shell) ||
!path_is_absolute(p->pw_shell) ||
is_nologin_shell(p->pw_shell))) ? NULL : p->pw_shell;