]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
user-util: validate the right field
authorLennart Poettering <lennart@poettering.net>
Fri, 19 Jan 2024 10:32:26 +0000 (11:32 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Jan 2024 16:55:07 +0000 (17:55 +0100)
src/basic/user-util.c

index 1cea96242e7cc2349838ef83b755a545ac37c631..ae6f13a8cf53ef10979f19edd0ee525a66b703f1 100644 (file)
@@ -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;