diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-08 22:16:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:09:59 -0500 |
commit | 86358fc10bb02bd3069736bedb120f52fa3f6494 (patch) | |
tree | c150b7213e364ff833579d54470eab23c8537667 /source3/rpc_parse/parse_samr.c | |
parent | 1e68cce96dce53557a5f2edbf1539a144db377b5 (diff) | |
download | samba-86358fc10bb02bd3069736bedb120f52fa3f6494.tar.gz samba-86358fc10bb02bd3069736bedb120f52fa3f6494.tar.xz samba-86358fc10bb02bd3069736bedb120f52fa3f6494.zip |
r13396: Add in userinfo26, re-enable userinfo25 - took the knowledge
from Samba4 on how to decode the 532 byte password buffers.
Getting closer to passing samba4 RPC-SCHANNEL test.
Jeremy.
(This used to be commit 205db6968a26c43dec64c14d8053d8e66807086f)
Diffstat (limited to 'source3/rpc_parse/parse_samr.c')
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index d13d3c9d4a8..a0108d9eb7b 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -5404,13 +5404,41 @@ static BOOL sam_io_user_info24(const char *desc, SAM_USER_INFO_24 * usr, if (MARSHALLING(ps) && (usr->pw_len != 0)) { if (!prs_uint16("pw_len", ps, depth, &usr->pw_len)) return False; + } else if (UNMARSHALLING(ps)) { + if (!prs_uint16("pw_len", ps, depth, &usr->pw_len)) + return False; } + + return True; +} + +/******************************************************************* +reads or writes a structure. +********************************************************************/ + +static BOOL sam_io_user_info26(const char *desc, SAM_USER_INFO_26 * usr, + prs_struct *ps, int depth) +{ + if (usr == NULL) + return False; + + prs_debug(ps, depth, desc, "sam_io_user_info26"); + depth++; + if(!prs_align(ps)) return False; + if(!prs_uint8s(False, "password", ps, depth, usr->pass, + sizeof(usr->pass))) + return False; + + if (!prs_uint8("pw_len", ps, depth, &usr->pw_len)) + return False; + return True; } + /************************************************************************* init_sam_user_info23 @@ -6475,6 +6503,16 @@ static BOOL samr_io_userinfo_ctr(const char *desc, SAM_USERINFO_CTR **ppctr, } ret = sam_io_user_info25("", ctr->info.id25, ps, depth); break; + case 26: + if (UNMARSHALLING(ps)) + ctr->info.id26 = PRS_ALLOC_MEM(ps,SAM_USER_INFO_26,1); + + if (ctr->info.id26 == NULL) { + DEBUG(2,("samr_io_userinfo_ctr: info pointer not initialised\n")); + return False; + } + ret = sam_io_user_info26("", ctr->info.id26, ps, depth); + break; default: DEBUG(2, ("samr_io_userinfo_ctr: unknown switch level 0x%x\n", ctr->switch_value)); ret = False; |