mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Added Andrew Bartlett's fixes to my changes to his original patch (at the
court of king caractacus, was just passing by... :-). Jeremy.
This commit is contained in:
parent
4d7565342d
commit
acc3e7a057
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user