diff options
author | Luke Leighton <lkcl@samba.org> | 1998-10-15 05:47:29 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-10-15 05:47:29 +0000 |
commit | a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0 (patch) | |
tree | d5f55708810d375cb906e8deea7dd21e522be07f /source3/rpc_parse | |
parent | ba22030ed7e81749116191bce26e948ebf35e2cb (diff) | |
download | samba-a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0.tar.gz samba-a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0.tar.bz2 samba-a42afcdcc7ab9aa9ed193ae36d3dbb10843447f0.zip |
bug-fixing against:
AS/U:
it returns dce/rpc "first" and "last" bits _clear_ in a bind/ack
response, when they should be set in a (small) packet. they also,
in the bind/ack do not set a secondary address string at all, so
we can't check against that...
Win95:
client-side dce/rpc code is a bit odd. it does a "WaitNamedPipeState"
and has slightly different pipe-naming (\PIPE\LANMAN is joined by
\PIPE\SRVSVC, \PIPE\WINREG etc whereas nt just has \PIPE\LANMAN
and \PIPE\).
Win95-USRMGR.EXE:
added LsaOpenPolicy (renamed existing to LsaOpenPolicy2).
added SamrConnect (renamed existing to SamrConnect2).
(This used to be commit a7fccd807b938cbb51002ebae8c7a48b40dbb655)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 67 | ||||
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 73 |
2 files changed, 129 insertions, 11 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 40f05e0c3a..49a0951554 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -227,10 +227,11 @@ static void lsa_io_obj_attr(char *desc, LSA_OBJ_ATTR *attr, prs_struct *ps, int } } + /******************************************************************* makes an LSA_Q_OPEN_POL structure. ********************************************************************/ -void make_q_open_pol(LSA_Q_OPEN_POL *r_q, char *server_name, +void make_q_open_pol(LSA_Q_OPEN_POL *r_q, uint16 system_name, uint32 attributes, uint32 desired_access, LSA_SEC_QOS *qos) @@ -246,7 +247,7 @@ void make_q_open_pol(LSA_Q_OPEN_POL *r_q, char *server_name, r_q->des_access = desired_access; } - make_unistr2 (&(r_q->uni_server_name), server_name, strlen(server_name)); + r_q->system_name = system_name; make_lsa_obj_attr(&(r_q->attr ), attributes, qos); } @@ -261,8 +262,9 @@ void lsa_io_q_open_pol(char *desc, LSA_Q_OPEN_POL *r_q, prs_struct *ps, int dep depth++; prs_uint32("ptr ", ps, depth, &(r_q->ptr )); + prs_uint16("system_name", ps, depth, &(r_q->system_name )); + prs_align ( ps ); - smb_io_unistr2 ("", &(r_q->uni_server_name), r_q->ptr, ps, depth); lsa_io_obj_attr("", &(r_q->attr ), ps, depth); if (r_q->attr.ptr_sec_qos == 0) @@ -287,6 +289,65 @@ void lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, int dep } /******************************************************************* +makes an LSA_Q_OPEN_POL2 structure. +********************************************************************/ +void make_q_open_pol2(LSA_Q_OPEN_POL2 *r_q, char *server_name, + uint32 attributes, + uint32 desired_access, + LSA_SEC_QOS *qos) +{ + if (r_q == NULL) return; + + DEBUG(5,("make_open_pol2: attr:%d da:%d\n", attributes, desired_access)); + + r_q->ptr = 1; /* undocumented pointer */ + + if (qos == NULL) + { + r_q->des_access = desired_access; + } + + make_unistr2 (&(r_q->uni_server_name), server_name, strlen(server_name)); + make_lsa_obj_attr(&(r_q->attr ), attributes, qos); +} + +/******************************************************************* +reads or writes an LSA_Q_OPEN_POL2 structure. +********************************************************************/ +void lsa_io_q_open_pol2(char *desc, LSA_Q_OPEN_POL2 *r_q, prs_struct *ps, int depth) +{ + if (r_q == NULL) return; + + prs_debug(ps, depth, desc, "lsa_io_q_open_pol2"); + depth++; + + prs_uint32("ptr ", ps, depth, &(r_q->ptr )); + + smb_io_unistr2 ("", &(r_q->uni_server_name), r_q->ptr, ps, depth); + lsa_io_obj_attr("", &(r_q->attr ), ps, depth); + + if (r_q->attr.ptr_sec_qos == 0) + { + prs_uint32("des_access", ps, depth, &(r_q->des_access)); + } +} + +/******************************************************************* +reads or writes an LSA_R_OPEN_POL2 structure. +********************************************************************/ +void lsa_io_r_open_pol2(char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps, int depth) +{ + if (r_p == NULL) return; + + prs_debug(ps, depth, desc, "lsa_io_r_open_pol2"); + depth++; + + smb_io_pol_hnd("", &(r_p->pol), ps, depth); + + prs_uint32("status", ps, depth, &(r_p->status)); +} + +/******************************************************************* makes an LSA_Q_QUERY_INFO structure. ********************************************************************/ void make_q_query(LSA_Q_QUERY_INFO *q_q, POLICY_HND *hnd, uint16 info_class) diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index b71c209845..eb882a7564 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -2403,6 +2403,58 @@ void samr_io_r_connect(char *desc, SAMR_R_CONNECT *r_u, prs_struct *ps, int dep } /******************************************************************* +makes a SAMR_Q_CONNECT_ANON structure. +********************************************************************/ +void make_samr_q_connect_anon(SAMR_Q_CONNECT_ANON *q_u) +{ + if (q_u == NULL) return; + + DEBUG(5,("make_q_connect_anon\n")); + + q_u->ptr = 1; + q_u->unknown_0 = 0x5c; + q_u->unknown_1 = 0x01; + q_u->unknown_2 = 0x20; +} + + +/******************************************************************* +reads or writes a structure. +********************************************************************/ +void samr_io_q_connect_anon(char *desc, SAMR_Q_CONNECT_ANON *q_u, prs_struct *ps, int depth) +{ + if (q_u == NULL) return; + + prs_debug(ps, depth, desc, "samr_io_q_connect_anon"); + depth++; + + prs_align(ps); + + prs_uint32("ptr ", ps, depth, &(q_u->ptr )); + prs_uint16("unknown_0", ps, depth, &(q_u->unknown_0)); + prs_uint16("unknown_1", ps, depth, &(q_u->unknown_1)); + prs_uint32("unknown_2", ps, depth, &(q_u->unknown_2)); +} + +/******************************************************************* +reads or writes a structure. +********************************************************************/ +void samr_io_r_connect_anon(char *desc, SAMR_R_CONNECT_ANON *r_u, prs_struct *ps, int depth) +{ + if (r_u == NULL) return; + + prs_debug(ps, depth, desc, "samr_io_r_connect_anon"); + depth++; + + prs_align(ps); + + smb_io_pol_hnd("connect_pol", &(r_u->connect_pol), ps, depth); + prs_align(ps); + + prs_uint32("status", ps, depth, &(r_u->status)); +} + +/******************************************************************* makes a SAMR_Q_OPEN_ALIAS structure. ********************************************************************/ void make_samr_q_open_alias(SAMR_Q_OPEN_ALIAS *q_u, @@ -2552,16 +2604,16 @@ void samr_io_q_unknown_38(char *desc, SAMR_Q_UNKNOWN_38 *q_u, prs_struct *ps, i /******************************************************************* makes a SAMR_R_UNKNOWN_38 structure. ********************************************************************/ -void make_samr_r_unknown_38(SAMR_R_UNKNOWN_38 *r_u, - uint16 level, uint32 status) +void make_samr_r_unknown_38(SAMR_R_UNKNOWN_38 *r_u) { if (r_u == NULL) return; DEBUG(5,("make_r_unknown_38\n")); - r_u->level.value = level; - r_u->ptr_0 = 0; - r_u->status = status; + r_u->unk_0 = 0; + r_u->unk_1 = 0; + r_u->unk_2 = 0; + r_u->unk_3 = 0; } /******************************************************************* @@ -2576,9 +2628,14 @@ void samr_io_r_unknown_38(char *desc, SAMR_R_UNKNOWN_38 *r_u, prs_struct *ps, i prs_align(ps); - smb_io_lookup_level("level ", &(r_u->level), ps, depth); - prs_uint32("ptr_0 ", ps, depth, &(r_u->ptr_0 )); - prs_uint32("status", ps, depth, &(r_u->status)); + prs_uint16("unk_0", ps, depth, &(r_u->unk_0)); + prs_align(ps); + prs_uint16("unk_1", ps, depth, &(r_u->unk_1)); + prs_align(ps); + prs_uint16("unk_2", ps, depth, &(r_u->unk_2)); + prs_align(ps); + prs_uint16("unk_3", ps, depth, &(r_u->unk_3)); + prs_align(ps); } /******************************************************************* |