summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2007-08-29 11:02:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:19 -0500
commita0a32cf5d520937f492d32c743011741522f2d40 (patch)
tree43b6640339e99e522df8084b12adb2b5c0da1bd6 /source3/rpc_parse
parent60fb367fd94c19889ec4909b23c3e21dcda2e7d5 (diff)
downloadsamba-a0a32cf5d520937f492d32c743011741522f2d40.tar.gz
samba-a0a32cf5d520937f492d32c743011741522f2d40.tar.bz2
samba-a0a32cf5d520937f492d32c743011741522f2d40.zip
r24771: Use infolevel 25 to set the machine account's password (just like winxp).
This correctly updates pwdLastSet field on win2k3 server. rafal (This used to be commit dd6d44c1665121cff9ccc2c09580169ca4d330b9)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_samr.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 90f1a2243b..ddbe0a6255 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5930,6 +5930,25 @@ void init_sam_user_info23A(SAM_USER_INFO_23 * usr, NTTIME * logon_time, /* all z
}
}
+
+/*************************************************************************
+ init_samr_user_info25P
+ fields_present = ACCT_NT_PWD_SET | ACCT_LM_PWD_SET | ACCT_FLAGS
+*************************************************************************/
+
+void init_sam_user_info25P(SAM_USER_INFO_25 * usr,
+ uint32 fields_present, uint32 acb_info,
+ char newpass[532])
+{
+ usr->fields_present = fields_present;
+ ZERO_STRUCT(usr->padding1);
+ ZERO_STRUCT(usr->padding2);
+
+ usr->acb_info = acb_info;
+ memcpy(usr->pass, newpass, sizeof(usr->pass));
+}
+
+
/*******************************************************************
reads or writes a structure.
********************************************************************/