summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/chgpasswd.c10
-rw-r--r--source3/smbd/lanman.c4
-rw-r--r--source3/smbd/password.c18
-rw-r--r--source3/smbd/reply.c10
4 files changed, 21 insertions, 21 deletions
diff --git a/source3/smbd/chgpasswd.c b/source3/smbd/chgpasswd.c
index 2b4676eb33..cf1fca405a 100644
--- a/source3/smbd/chgpasswd.c
+++ b/source3/smbd/chgpasswd.c
@@ -565,7 +565,7 @@ BOOL check_lanman_password(char *user, uchar * pass1,
if (ret == False) {
DEBUG(0,("check_lanman_password: getsampwnam returned NULL\n"));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return False;
}
@@ -574,7 +574,7 @@ BOOL check_lanman_password(char *user, uchar * pass1,
if (acct_ctrl & ACB_DISABLED) {
DEBUG(0,("check_lanman_password: account %s disabled.\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return False;
}
@@ -586,7 +586,7 @@ BOOL check_lanman_password(char *user, uchar * pass1,
}
else if (lanman_pw == NULL) {
DEBUG(0, ("check_lanman_password: no lanman password !\n"));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return False;
}
@@ -599,7 +599,7 @@ BOOL check_lanman_password(char *user, uchar * pass1,
/* Check that the two old passwords match. */
if (memcmp(lanman_pw, unenc_old_pw, 16)) {
DEBUG(0,("check_lanman_password: old password doesn't match.\n"));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return False;
}
@@ -692,7 +692,7 @@ BOOL pass_oem_change(char *user,
memset(new_passwd, 0, sizeof(new_passwd));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return ret;
}
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index d5dd876670..69a0fa5ac3 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1788,7 +1788,7 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid, char *param
if(lp_unix_password_sync() && !chgpasswd(user,pass1,saved_pass2,False))
SSVAL(*rparam,0,NERR_badpass);
}
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
}
@@ -1825,7 +1825,7 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid, char *param
{
SSVAL(*rparam,0,NERR_Success);
}
- pdb_clear_sam(hnd);
+ pdb_free_sam(hnd);
}
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 0bc21dbbd6..01fc9cdd53 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -376,7 +376,7 @@ static BOOL update_smbpassword_file(char *user, char *password)
if(ret == False) {
DEBUG(0,("pdb_getsampwnam returned NULL\n"));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return False;
}
@@ -393,7 +393,7 @@ static BOOL update_smbpassword_file(char *user, char *password)
DEBUG(3,("change_oem_password returned False\n"));
}
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return ret;
}
@@ -558,14 +558,14 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal,
if (ret == False)
{
DEBUG(1,("Couldn't find user '%s' in passdb file.\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return(False);
}
/* Quit if the account was disabled. */
if(pdb_get_acct_ctrl(sampass) & ACB_DISABLED) {
DEBUG(1,("Account for user '%s' was disabled.\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return(False);
}
@@ -575,7 +575,7 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal,
if (smb_pass->smb_userid != pass->pw_uid)
{
DEBUG(0,("Error : UNIX and SMB uids in password files do not match for user '%s'!\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return(False);
}
#endif
@@ -585,25 +585,25 @@ BOOL pass_check_smb(char *user, char *domain, uchar *chal,
if (lp_null_passwords())
{
DEBUG(3,("Account for user '%s' has no password and null passwords are allowed.\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return(True);
}
else
{
DEBUG(3,("Account for user '%s' has no password and null passwords are NOT allowed.\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return(False);
}
}
if (smb_password_ok(sampass, chal, lm_pwd, nt_pwd))
{
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return(True);
}
DEBUG(2,("pass_check_smb failed - invalid password for user [%s]\n", user));
- pdb_clear_sam(sampass);
+ pdb_free_sam(sampass);
return False;
}
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index c9ef881b59..41970c4040 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -436,7 +436,7 @@ static int session_trust_account(connection_struct *conn, char *inbuf, char *out
} else {
DEBUG(0,("session_trust_account: Trust account %s only supported with security = user\n", user));
SSVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
- pdb_clear_sam(sam_trust_acct);
+ pdb_free_sam(sam_trust_acct);
return(ERROR(0, NT_STATUS_LOGON_FAILURE));
}
@@ -444,25 +444,25 @@ static int session_trust_account(connection_struct *conn, char *inbuf, char *out
/* lkclXXXX: workstation entry doesn't exist */
DEBUG(0,("session_trust_account: Trust account %s user doesn't exist\n",user));
SSVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
- pdb_clear_sam(sam_trust_acct);
+ pdb_free_sam(sam_trust_acct);
return(ERROR(0, NT_STATUS_NO_SUCH_USER));
} else {
if ((smb_passlen != 24) || (smb_nt_passlen != 24)) {
DEBUG(0,("session_trust_account: Trust account %s - password length wrong.\n", user));
SSVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
- pdb_clear_sam(sam_trust_acct);
+ pdb_free_sam(sam_trust_acct);
return(ERROR(0, NT_STATUS_LOGON_FAILURE));
}
if (!smb_password_ok(sam_trust_acct, NULL, (unsigned char *)smb_passwd, (unsigned char *)smb_nt_passwd)) {
DEBUG(0,("session_trust_account: Trust Account %s - password failed\n", user));
SSVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);
- pdb_clear_sam(sam_trust_acct);
+ pdb_free_sam(sam_trust_acct);
return(ERROR(0, NT_STATUS_LOGON_FAILURE));
}
acct_ctrl = pdb_get_acct_ctrl(sam_trust_acct);
- pdb_clear_sam(sam_trust_acct);
+ pdb_free_sam(sam_trust_acct);
if (acct_ctrl & ACB_DOMTRUST) {
DEBUG(0,("session_trust_account: Domain trust account %s denied by server\n",user));
SSVAL(outbuf, smb_flg2, SVAL(outbuf, smb_flg2) | FLAGS2_32_BIT_ERROR_CODES);