summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-12-23 20:22:20 +0000
committerAndrew Tridgell <tridge@samba.org>2002-12-23 20:22:20 +0000
commit54af5d0f252739240b933b61dffda445d1ca1337 (patch)
tree511136d56563fa049f2a00c9333017329f87f2d3
parentb95b82b798704d75403c4cf06ce6a10a6161b501 (diff)
downloadsamba-54af5d0f252739240b933b61dffda445d1ca1337.tar.gz
samba-54af5d0f252739240b933b61dffda445d1ca1337.tar.bz2
samba-54af5d0f252739240b933b61dffda445d1ca1337.zip
the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some kind. mkaplan found a situation where the structure was not present at all (depending on ptr_0) (This used to be commit d7f18c60f73a3acb00ec9b1f9c605cc8c9d690a7)
-rw-r--r--source3/rpc_parse/parse_samr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index d5ca78bda4..61b13d1350 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -745,8 +745,14 @@ static BOOL sam_io_unk_info2(char *desc, SAM_UNK_INFO_2 * u_2,
if(!prs_uint32("num_local_grps", ps, depth, &u_2->num_local_grps))
return False;
- if(!prs_uint8s(False, "padding", ps, depth, u_2->padding,sizeof(u_2->padding)))
- return False;
+ if (u_2->ptr_0) {
+ /* this was originally marked as 'padding'. It isn't
+ padding, it is some sort of optional 12 byte
+ structure. When it is present it contains zeros
+ !? */
+ if(!prs_uint8s(False, "unknown", ps, depth, u_2->padding,sizeof(u_2->padding)))
+ return False;
+ }
if(!smb_io_unistr2("uni_domain", &u_2->uni_domain, u_2->hdr_domain.buffer, ps, depth))
return False;