diff options
-rw-r--r-- | source3/include/rpc_samr.h | 7 | ||||
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 11 |
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; |