1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

Added error reporting to pam_session code.

(This used to be commit 72812e4cf199d804418dc52cc0b0ba683b8a2e5c)
This commit is contained in:
John Terpstra 2001-04-19 23:52:45 +00:00
parent 0fc676c335
commit 80187366f2
2 changed files with 38 additions and 0 deletions

View File

@ -287,6 +287,25 @@ static BOOL pam_account(pam_handle_t *pamh, char * user, char * password, BOOL p
DEBUG(4,("PAM: Account Management SetCredentials for User: %s\n", user));
pam_error = pam_setcred(pamh, (PAM_ESTABLISH_CRED|PAM_SILENT));
switch( pam_error ) {
case PAM_CRED_UNAVAIL:
DEBUG(0, ("PAM: Credentials not found for user:%s", user ));
break;
case PAM_CRED_EXPIRED:
DEBUG(0, ("PAM: Credentials for user: \"%s\" EXPIRED!", user ));
break;
case PAM_CRED_UNKNOWN:
DEBUG(0, ("PAM: User: \"%s\" is NOT known so can not set credentials!", user ));
break;
case PAM_CRED_UNKNOWN:
DEBUG(0, ("PAM: Unknown setcredentials error - unable to set credentials for %s", user ));
break;
case PAM_SUCCESS:
DEBUG(4, ("PAM: SetCredentials OK for User: %s\n", user));
break;
default:
DEBUG(0, ("PAM: Error Condition Unknown in pam_setcred function call!"));
}
if(!pam_error_handler(pamh, pam_error, "Set Credential Failure", 2)) {
proc_pam_end(pamh);
return False;

View File

@ -287,6 +287,25 @@ static BOOL pam_account(pam_handle_t *pamh, char * user, char * password, BOOL p
DEBUG(4,("PAM: Account Management SetCredentials for User: %s\n", user));
pam_error = pam_setcred(pamh, (PAM_ESTABLISH_CRED|PAM_SILENT));
switch( pam_error ) {
case PAM_CRED_UNAVAIL:
DEBUG(0, ("PAM: Credentials not found for user:%s", user ));
break;
case PAM_CRED_EXPIRED:
DEBUG(0, ("PAM: Credentials for user: \"%s\" EXPIRED!", user ));
break;
case PAM_CRED_UNKNOWN:
DEBUG(0, ("PAM: User: \"%s\" is NOT known so can not set credentials!", user ));
break;
case PAM_CRED_UNKNOWN:
DEBUG(0, ("PAM: Unknown setcredentials error - unable to set credentials for %s", user ));
break;
case PAM_SUCCESS:
DEBUG(4, ("PAM: SetCredentials OK for User: %s\n", user));
break;
default:
DEBUG(0, ("PAM: Error Condition Unknown in pam_setcred function call!"));
}
if(!pam_error_handler(pamh, pam_error, "Set Credential Failure", 2)) {
proc_pam_end(pamh);
return False;