aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_unix/pam_unix_passwd.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2024-01-15 20:05:28 +0100
committerDmitry V. Levin <ldv@strace.io>2024-01-15 20:01:23 +0000
commite3309f060a67805e679fee55b1101b91991ea824 (patch)
tree45513599de4e02e3b34db460fa7c2f000df727ef /modules/pam_unix/pam_unix_passwd.c
parent94386184f67fd0870fa56eef2a2d473943c03eb1 (diff)
downloadpam-e3309f060a67805e679fee55b1101b91991ea824.tar.gz
pam-e3309f060a67805e679fee55b1101b91991ea824.tar.bz2
pam-e3309f060a67805e679fee55b1101b91991ea824.zip
pam_unix: fix regressions
The returned value stored in pwd from _unix_getpwnam is inserted into pam handler through pam_set_data. Do not manually free the value. Also check getline return value for != -1 instead of == -1. Fixes 8f2ca5919b26843ef774ef0aeb9bf261dec943a0 and 73d009e9ea8edafc18c7fe3650b25dd6bdce88c1. No release affected. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Diffstat (limited to 'modules/pam_unix/pam_unix_passwd.c')
-rw-r--r--modules/pam_unix/pam_unix_passwd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index 7c141c3b..fe3f566a 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -660,7 +660,6 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
user);
return PAM_USER_UNKNOWN;
}
- _pam_drop(pwd);
/*
* This is not an AUTH module!