From 829854afa5e38db30be207fc8f8f80705e623795 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 19 Jan 2024 11:32:26 +0100 Subject: [PATCH] user-util: validate the right field --- src/basic/user-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/user-util.c b/src/basic/user-util.c index 1cea96242e7..ae6f13a8cf5 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; -- 2.47.3