-/*
+/*
Unix SMB/CIFS implementation.
PAM Password checking
Copyright (C) Andrew Tridgell 1992-2001
#ifdef WITH_PAM
/*******************************************************************
- * Handle PAM authentication
+ * Handle PAM authentication
* - Access, Authentication, Session, Password
* Note: See PAM Documentation and refer to local system PAM implementation
* which determines what actions/limitations/allowances become affected.
*********************************************************************/
static bool smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
- const char *msg, int dbglvl,
+ const char *msg, int dbglvl,
NTSTATUS *nt_status)
{
*nt_status = pam_to_nt_status(pam_error);
Create a linked list containing chat data.
***************************************************************/
-static struct chat_struct *make_pw_chat(const char *p)
+static struct chat_struct *make_pw_chat(const char *p)
{
char *prompt;
char *reply;
struct chat_struct *t;
const struct loadparm_substitution *lp_sub =
loadparm_s3_global_substitution();
- bool found;
+ bool found;
*resp = NULL;
DEBUG(10,("smb_pam_passchange_conv: starting conversation for %d messages\n", num_msg));
return pconv;
}
-/*
+/*
* PAM Closing out cleanup handler
*/
return nt_status;
}
-/*
+/*
* PAM Account Handler
*/
static NTSTATUS smb_pam_account(pam_handle_t *pamh, const char * user)
*/
DEBUG(4,("PAM: Account Management SetCredentials for User: %s\n", user));
- pam_error = pam_setcred(pamh, (PAM_ESTABLISH_CRED|PAM_SILENT));
+ pam_error = pam_setcred(pamh, (PAM_ESTABLISH_CRED|PAM_SILENT));
switch( pam_error ) {
case PAM_CRED_UNAVAIL:
DEBUG(0, ("smb_pam_setcred: PAM: Credentials not found for user:%s\n", user ));
default:
DEBUG(0, ("PAM: UNKNOWN PAM ERROR (%d) for User: %s\n", pam_error, user));
}
-
+
if(!smb_pam_error_handler(pamh, pam_error, "Password Change Failed", 2)) {
return False;
}