summaryrefslogtreecommitdiff
path: root/source3/smbd/lanman.c
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2001-05-04 15:44:27 +0000
committerJean-François Micouleau <jfm@samba.org>2001-05-04 15:44:27 +0000
commitf35157f39293f9fa240a28642c41708b55d301c8 (patch)
treecd0eb02e9b316899d2cfb9b8cc2784ad739c60a5 /source3/smbd/lanman.c
parent1f7a451c1e059b5a86e1e78debd582579aa7bcb7 (diff)
downloadsamba-f35157f39293f9fa240a28642c41708b55d301c8.tar.gz
samba-f35157f39293f9fa240a28642c41708b55d301c8.tar.bz2
samba-f35157f39293f9fa240a28642c41708b55d301c8.zip
Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the password changing. So don't cry ;-) J.F. (This used to be commit a4a4c02b12f030a3b9e6225b999c90689dfc4719)
Diffstat (limited to 'source3/smbd/lanman.c')
-rw-r--r--source3/smbd/lanman.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 8dc3d8308a..d5dd876670 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1765,7 +1765,7 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid, char *param
{
fstring saved_pass2;
- SAM_ACCOUNT *sampass;
+ SAM_ACCOUNT *sampass=NULL;
/*
* Save the new password as change_oem_password overwrites it
@@ -1788,7 +1788,9 @@ 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);
+ }
+
/*
* If the above failed, attempt the plaintext password change.
@@ -1823,8 +1825,10 @@ static BOOL api_SetUserPassword(connection_struct *conn,uint16 vuid, char *param
{
SSVAL(*rparam,0,NERR_Success);
}
+ pdb_clear_sam(hnd);
}
+
memset((char *)pass1,'\0',sizeof(fstring));
memset((char *)pass2,'\0',sizeof(fstring));