From 5197ccfef498d8d8072fba71d3bd58509fa10ad4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 1 May 2001 17:19:42 +0000 Subject: Added Andrew Bartlett's fixes to my changes to his original patch (at the court of king caractacus, was just passing by... :-). Jeremy. (This used to be commit acc3e7a057ad7fb0c2fb1cafff0c623ec0524d04) --- source3/auth/pampass.c | 4 ++-- source3/auth/pass_check.c | 2 +- source3/passdb/pampass.c | 4 ++-- source3/passdb/pass_check.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c index 09b84db71a..061e5ee0bf 100644 --- a/source3/auth/pampass.c +++ b/source3/auth/pampass.c @@ -664,9 +664,9 @@ uint32 smb_pam_passcheck(char * user, char * password) */ if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, password, NULL)) == NULL) - return False; + return NT_STATUS_LOGON_FAILURE; - if (!smb_pam_start(&pamh, user, NULL, NULL)) + if (!smb_pam_start(&pamh, user, NULL, pconv)) return NT_STATUS_LOGON_FAILURE; if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_NOPROBLEMO) { diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c index 05f7138c3c..9424189b23 100644 --- a/source3/auth/pass_check.c +++ b/source3/auth/pass_check.c @@ -599,7 +599,7 @@ static BOOL password_check(char *password) { #ifdef WITH_PAM - return (smb_pam_passcheck(this_user, password)); + return (smb_pam_passcheck(this_user, password) == NT_STATUS_NOPROBLEMO); #endif /* WITH_PAM */ #ifdef WITH_AFS diff --git a/source3/passdb/pampass.c b/source3/passdb/pampass.c index 09b84db71a..061e5ee0bf 100644 --- a/source3/passdb/pampass.c +++ b/source3/passdb/pampass.c @@ -664,9 +664,9 @@ uint32 smb_pam_passcheck(char * user, char * password) */ if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, password, NULL)) == NULL) - return False; + return NT_STATUS_LOGON_FAILURE; - if (!smb_pam_start(&pamh, user, NULL, NULL)) + if (!smb_pam_start(&pamh, user, NULL, pconv)) return NT_STATUS_LOGON_FAILURE; if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_NOPROBLEMO) { diff --git a/source3/passdb/pass_check.c b/source3/passdb/pass_check.c index 05f7138c3c..9424189b23 100644 --- a/source3/passdb/pass_check.c +++ b/source3/passdb/pass_check.c @@ -599,7 +599,7 @@ static BOOL password_check(char *password) { #ifdef WITH_PAM - return (smb_pam_passcheck(this_user, password)); + return (smb_pam_passcheck(this_user, password) == NT_STATUS_NOPROBLEMO); #endif /* WITH_PAM */ #ifdef WITH_AFS -- cgit