summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_samr_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-04-25 22:12:13 +0000
committerGerald Carter <jerry@samba.org>2001-04-25 22:12:13 +0000
commitc3bf153c0c0c7c1c0f1d012147fb4c061b2be324 (patch)
treee769ecf2e8099a315da0bc6231ae7fc417100023 /source3/rpc_server/srv_samr_nt.c
parentce4d3cd4fa5b98187f63c2b48e8d31be16090df5 (diff)
downloadsamba-c3bf153c0c0c7c1c0f1d012147fb4c061b2be324.tar.gz
samba-c3bf153c0c0c7c1c0f1d012147fb4c061b2be324.tar.bz2
samba-c3bf153c0c0c7c1c0f1d012147fb4c061b2be324.zip
converted the passdb smbpasswd implementation to using talloc
for memory allocation. This fixes a long standing seg fault (i knew i would get around to it one day :) ) Tested with NT4 and Win2k. Needs a little more testing with the "create the machine account on the fly" code for NT4. Simo, this is probably going to break the tdb passdb code. Can you look at that when you get a chance and see what you think? (This used to be commit 1c13110873e456748dc09fd51749f664643fe888)
Diffstat (limited to 'source3/rpc_server/srv_samr_nt.c')
-rw-r--r--source3/rpc_server/srv_samr_nt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index e0d6d6056e..7054f85ff9 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -2060,6 +2060,7 @@ static BOOL set_user_info_21(SAM_USER_INFO_21 *id21, uint32 rid)
return False;
/* we make a copy so that we can modify stuff */
+ ZERO_STRUCT(new_pwd);
copy_sam_passwd(&new_pwd, pwd);
copy_id21_to_sam_passwd(&new_pwd, id21);
@@ -2099,8 +2100,9 @@ static BOOL set_user_info_23(SAM_USER_INFO_23 *id23, uint32 rid)
if (pwd == NULL)
return False;
- acct_ctrl = pdb_get_acct_ctrl(pwd);
+ acct_ctrl = pdb_get_acct_ctrl(pwd);
+ ZERO_STRUCT (new_pwd);
copy_sam_passwd(&new_pwd, pwd);
copy_id23_to_sam_passwd(&new_pwd, id23);