diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2023-12-06 21:42:17 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-12-06 20:50:41 +0000 |
commit | bde5b4c310458db8b3b8f5a15bedded184a2acff (patch) | |
tree | 3a2f7d014efd07030e912d80c0f9b14509d453fb /modules/pam_localuser/tst-pam_localuser-retval.c | |
parent | f1ed3f00e2542cac4983a4bdc3edab3ae2646ddc (diff) | |
download | pam-bde5b4c310458db8b3b8f5a15bedded184a2acff.tar.gz pam-bde5b4c310458db8b3b8f5a15bedded184a2acff.tar.bz2 pam-bde5b4c310458db8b3b8f5a15bedded184a2acff.zip |
libpam: treat NUL in passwd files correctly
This already implies that the passwd file itself is broken. Yet do not
skip lines by accident due to fgets limitations.
As a positive side effect, arbitrarily long lines and user names are
supported now as well.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'modules/pam_localuser/tst-pam_localuser-retval.c')
-rw-r--r-- | modules/pam_localuser/tst-pam_localuser-retval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_localuser/tst-pam_localuser-retval.c b/modules/pam_localuser/tst-pam_localuser-retval.c index 5581cecc..3d2c8a42 100644 --- a/modules/pam_localuser/tst-pam_localuser-retval.c +++ b/modules/pam_localuser/tst-pam_localuser-retval.c @@ -55,7 +55,7 @@ main(void) ASSERT_EQ(PAM_SUCCESS, pam_start_confdir(service_file, name, &conv, ".", &pamh)); ASSERT_NE(NULL, pamh); - ASSERT_EQ(PAM_SERVICE_ERR, pam_authenticate(pamh, 0)); + ASSERT_EQ(PAM_PERM_DENIED, pam_authenticate(pamh, 0)); ASSERT_EQ(PAM_SUCCESS, pam_end(pamh, 0)); pamh = NULL; @@ -105,7 +105,7 @@ main(void) ASSERT_EQ(PAM_SUCCESS, pam_start_confdir(service_file, name, &conv, ".", &pamh)); ASSERT_NE(NULL, pamh); - ASSERT_EQ(PAM_SERVICE_ERR, pam_authenticate(pamh, 0)); + ASSERT_EQ(PAM_PERM_DENIED, pam_authenticate(pamh, 0)); ASSERT_EQ(PAM_SUCCESS, pam_end(pamh, 0)); pamh = NULL; |