diff options
author | Luke Leighton <lkcl@samba.org> | 2000-03-17 19:15:50 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-03-17 19:15:50 +0000 |
commit | 272402c3de55b632f98250ff64f1728ca8d2b531 (patch) | |
tree | 5d3d3b358045b3255ab4e3cdb60649cad6ca69e4 | |
parent | e999698318f89484b76cd56db4a16fcde7bcdd6a (diff) | |
download | samba-272402c3de55b632f98250ff64f1728ca8d2b531.tar.gz samba-272402c3de55b632f98250ff64f1728ca8d2b531.tar.xz samba-272402c3de55b632f98250ff64f1728ca8d2b531.zip |
ok, this one's weird. firstly, sam_set_userinfo doesn't align the
2nd info level at the container, but sam_set_userinfo2 *does*.
secondly, it _looks_ like there are two revisions for SAM database
entries, where some unknown trash is _not_ placed in the structure
(at the end: unknown_6 and padding4) if the revision number (unknown_5)
is zero.
have to keep an eye on this one over the next year or so, to make sure
all cases are caught.
third, it _looks_ like if you do a password set that the account disabled
acb_info bit is automatically unset, but i cannot confirm that right
now, i'll just have to wing-it (in the next commit)
-rw-r--r-- | source/rpc_parse/parse_samr.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c index 9d42e8013fc..f8e761871f3 100644 --- a/source/rpc_parse/parse_samr.c +++ b/source/rpc_parse/parse_samr.c @@ -5473,8 +5473,17 @@ static BOOL sam_io_user_info23(char *desc, SAM_USER_INFO_23 * usr, usr->hdr_munged_dial.buffer, ps, depth); /* worksations user can log on from */ prs_align(ps); - prs_uint32("unknown_6 ", ps, depth, &(usr->unknown_6)); - prs_uint32("padding4 ", ps, depth, &(usr->padding4)); + /* ok, this is only guess-work (as usual) */ + if (usr->unknown_5 != 0x0) + { + prs_uint32("unknown_6 ", ps, depth, &(usr->unknown_6)); + prs_uint32("padding4 ", ps, depth, &(usr->padding4)); + } + else if (UNMARSHALLING(ps)) + { + usr->unknown_6 = 0; + usr->padding4 = 0; + } if (usr->ptr_logon_hrs) { @@ -5948,7 +5957,7 @@ static BOOL samr_io_userinfo_ctr(char *desc, SAM_USERINFO_CTR * ctr, prs_debug(ps, depth, desc, "samr_io_userinfo_ctr"); depth++; - prs_align(ps); + /* lkclXXXX DO NOT ALIGN BEFORE READING SWITCH VALUE! */ prs_uint16("switch_value", ps, depth, &(ctr->switch_value)); prs_align(ps); |