diff options
Diffstat (limited to 'source3/pam_smbpass/support.c')
-rw-r--r-- | source3/pam_smbpass/support.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/source3/pam_smbpass/support.c b/source3/pam_smbpass/support.c index 32aba7dd5b..11de306d13 100644 --- a/source3/pam_smbpass/support.c +++ b/source3/pam_smbpass/support.c @@ -308,6 +308,7 @@ void _cleanup_failures( pam_handle_t * pamh, void *fl, int err ) int _smb_verify_password( pam_handle_t * pamh, SAM_ACCOUNT *sampass, const char *p, unsigned int ctrl ) { + uchar hash_pass[16]; uchar lm_pw[16]; uchar nt_pw[16]; int retval = PAM_AUTH_ERR; @@ -338,8 +339,11 @@ int _smb_verify_password( pam_handle_t * pamh, SAM_ACCOUNT *sampass, const char *service; pam_get_item( pamh, PAM_SERVICE, (const void **)&service ); - _log_err( LOG_NOTICE, "failed auth request by %s for service %s as %s", - uidtoname(getuid()), service ? service : "**unknown**", name); + _log_err( LOG_NOTICE + , "failed auth request by %s for service %s as %s(%d)" + , uidtoname( getuid() ) + , service ? service : "**unknown**", name + , pdb_get_uid(sampass) ); return PAM_AUTH_ERR; } } @@ -393,34 +397,32 @@ int _smb_verify_password( pam_handle_t * pamh, SAM_ACCOUNT *sampass, retval = PAM_MAXTRIES; } } else { - _log_err(LOG_NOTICE, - "failed auth request by %s for service %s as %s", - uidtoname(getuid()), - service ? service : "**unknown**", name); + _log_err( LOG_NOTICE + , "failed auth request by %s for service %s as %s(%d)" + , uidtoname( getuid() ) + , service ? service : "**unknown**", name + , pdb_get_uid(sampass) ); new->count = 1; } - if (NT_STATUS_IS_ERR(sid_to_uid(pdb_get_user_sid(sampass, &(new->id), &type)))) { - _log_err(LOG_NOTICE, - "failed auth request by %s for service %s as %s", - uidtoname(getuid()), - service ? service : "**unknown**", name); - } new->user = smbpXstrDup( name ); + new->id = pdb_get_uid(sampass); new->agent = smbpXstrDup( uidtoname( getuid() ) ); pam_set_data( pamh, data_name, new, _cleanup_failures ); } else { _log_err( LOG_CRIT, "no memory for failure recorder" ); - _log_err(LOG_NOTICE, - "failed auth request by %s for service %s as %s(%d)", - uidtoname(getuid()), - service ? service : "**unknown**", name); + _log_err( LOG_NOTICE + , "failed auth request by %s for service %s as %s(%d)" + , uidtoname( getuid() ) + , service ? service : "**unknown**", name + , pdb_get_uid(sampass) ); } } else { - _log_err(LOG_NOTICE, - "failed auth request by %s for service %s as %s(%d)", - uidtoname(getuid()), - service ? service : "**unknown**", name); + _log_err( LOG_NOTICE + , "failed auth request by %s for service %s as %s(%d)" + , uidtoname( getuid() ) + , service ? service : "**unknown**", name + , pdb_get_uid(sampass) ); retval = PAM_AUTH_ERR; } } |