diff options
author | Jim McDonough <jmcd@samba.org> | 2007-06-26 20:09:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:23:36 -0500 |
commit | 9c3db7adf3efb7e485ac0a7301f31a1ab6338435 (patch) | |
tree | 43872efb41a9ca0ce4fe74c47bf52d12a258d01c /source3/rpc_parse | |
parent | 53637791023ec35f669244d7ea24ceaf6cf30d18 (diff) | |
download | samba-9c3db7adf3efb7e485ac0a7301f31a1ab6338435.tar.gz samba-9c3db7adf3efb7e485ac0a7301f31a1ab6338435.tar.bz2 samba-9c3db7adf3efb7e485ac0a7301f31a1ab6338435.zip |
r23616: Fix bugzilla #4719: must change password is not set from usrmgr.exe.
This was only affecting the newer versions of usrmgr.exe, because they
use a user_info_25 struct. The password is getting set separately
inside that code, so the password last set time was getting set from the
password change logic.
We also were not parsing a number of fields (like logon hours) from the
user_info_25. That should also be fixed.
(This used to be commit afabd68b6ae874aceba708dc36808ed007ad496c)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index e7726fbb26..1a4048e54b 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -6134,9 +6134,26 @@ static BOOL sam_io_user_info25(const char *desc, SAM_USER_INFO_25 * usr, prs_str if(!prs_uint32("fields_present ", ps, depth, &usr->fields_present)) return False; - if(!prs_uint32s(False, "unknown_5 ", ps, depth, usr->unknown_5, 5)) + if(!prs_uint16("logon_divs ", ps, depth, &usr->logon_divs)) /* logon divisions per week */ + return False; + if(!prs_align(ps)) + return False; + if(!prs_uint32("ptr_logon_hrs ", ps, depth, &usr->ptr_logon_hrs)) + return False; + + if(!prs_uint16("bad_password_count ", ps, depth, &usr->bad_password_count)) + return False; + if(!prs_uint16("logon_count ", ps, depth, &usr->logon_count)) return False; + if(!prs_uint8s(False, "padding1 ", ps, depth, usr->padding1, sizeof(usr->padding1))) + return False; + if(!prs_uint8("passmustchange ", ps, depth, &usr->passmustchange)) + return False; + if(!prs_uint8("padding2 ", ps, depth, &usr->padding2)) + return False; + + if(!prs_uint8s(False, "password ", ps, depth, usr->pass, sizeof(usr->pass))) return False; @@ -6172,13 +6189,11 @@ static BOOL sam_io_user_info25(const char *desc, SAM_USER_INFO_25 * usr, prs_str if(!smb_io_unistr2("uni_munged_dial ", &usr->uni_munged_dial, usr->hdr_munged_dial.buffer, ps, depth)) return False; -#if 0 /* JRA - unknown... */ /* ok, this is only guess-work (as usual) */ if (usr->ptr_logon_hrs) { if(!sam_io_logon_hrs("logon_hrs", &usr->logon_hrs, ps, depth)) return False; } -#endif return True; } |