]> git.ipfire.org Git - thirdparty/shadow.git/commit
login: Fix no-pam authorization regression
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 8 Jan 2025 16:04:07 +0000 (17:04 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 8 Jan 2025 17:01:27 +0000 (18:01 +0100)
commitc45b076b1c4d4829d96a16001f7d681fa526574f
tree2a1bae99b64838ab8c11bc5686b407f24a06ce2e
parent15524dd6138267dc20dac793ff5e40c85fe91621
login: Fix no-pam authorization regression

The list_match function handles EXCEPT entries through recursive
calls. It calls itself with NULL, which was then passed to strtok so
parsing continued at current position.

Replacing strtok with strsep, this means that EXCEPT entries never
match, because strsep(NULL, ...) always returns NULL, i.e. the
code treats everything after EXCEPT as non-existing.

Fix this by passing current list pointer to recursive call.

Fixes: 90afe61003ef (2024-07-04; "lib/, src/: Use strsep(3) instead of strtok(3)")
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
src/login_nopam.c