1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-23 02:04:32 +03:00

user-util: validate the right field

This commit is contained in:
Lennart Poettering 2024-01-19 11:32:26 +01:00
parent afd08d7740
commit 829854afa5

View 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;