summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-02-08 04:46:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:09:58 -0500
commit1b14d3b69754ddfe8a258c8accb65b01f16e880b (patch)
treecfc9cb6c2b1900bf0f5dfcaeedaef5161a505a86 /source3
parenta988be716b87b0dca69688ed3b909af0a69e91f6 (diff)
downloadsamba-1b14d3b69754ddfe8a258c8accb65b01f16e880b.tar.gz
samba-1b14d3b69754ddfe8a258c8accb65b01f16e880b.tar.bz2
samba-1b14d3b69754ddfe8a258c8accb65b01f16e880b.zip
r13386: Fix parsing of SAMR_Q_CONNECT_ANON.
Jeremy. (This used to be commit 6f8334ad31ac773f5c13335f5d8c5bed62987466)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/rpc_samr.h7
-rw-r--r--source3/rpc_parse/parse_samr.c11
2 files changed, 8 insertions, 10 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index 2fae514c3d..e53bc1ede8 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/include/rpc_samr.h
@@ -1677,13 +1677,10 @@ typedef struct r_samr_open_alias_info
/* SAMR_Q_CONNECT_ANON - probably an open */
-typedef struct q_samr_connect_anon_info
-{
+typedef struct q_samr_connect_anon_info {
uint32 ptr; /* ptr? */
- uint16 unknown_0; /* 0x005c */
- uint16 unknown_1; /* 0x0001 */
+ uint16 unknown_0; /* Only pushed if ptr is non-zero. */
uint32 access_mask;
-
} SAMR_Q_CONNECT_ANON;
/* SAMR_R_CONNECT_ANON - probably an open */
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 87bfcebe26..d13d3c9d4a 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -6965,8 +6965,7 @@ void init_samr_q_connect_anon(SAMR_Q_CONNECT_ANON * q_u)
q_u->ptr = 1;
q_u->unknown_0 = 0x5c; /* server name (?!!) */
- q_u->unknown_1 = 0x01;
- q_u->access_mask = 0x20;
+ q_u->access_mask = MAXIMUM_ALLOWED_ACCESS;
}
/*******************************************************************
@@ -6987,9 +6986,11 @@ BOOL samr_io_q_connect_anon(const char *desc, SAMR_Q_CONNECT_ANON * q_u,
if(!prs_uint32("ptr ", ps, depth, &q_u->ptr))
return False;
- if(!prs_uint16("unknown_0", ps, depth, &q_u->unknown_0))
- return False;
- if(!prs_uint16("unknown_1", ps, depth, &q_u->unknown_1))
+ if (q_u->ptr) {
+ if(!prs_uint16("unknown_0", ps, depth, &q_u->unknown_0))
+ return False;
+ }
+ if(!prs_align(ps))
return False;
if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask))
return False;