diff options
author | Tim Potter <tpot@samba.org> | 2001-01-11 22:55:13 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-01-11 22:55:13 +0000 |
commit | 6b4dcfff3a43e64f428770f0548598faebaaf0de (patch) | |
tree | 13f580b116ec69a6e367c42c62293dabb8269f2b | |
parent | e29c028a44b7b31f3bfee760d65ad6d876e47c16 (diff) | |
download | samba-6b4dcfff3a43e64f428770f0548598faebaaf0de.tar.gz samba-6b4dcfff3a43e64f428770f0548598faebaaf0de.tar.bz2 samba-6b4dcfff3a43e64f428770f0548598faebaaf0de.zip |
General clean up. Merge of access_mask fixes for some unknown fields from
tng.
(This used to be commit c292f4aa31c2d3b4b5b274ef8aded569bdf06fdd)
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index aa08606a57..bb02ad9669 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -22,12 +22,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #include "includes.h" extern int DEBUGLEVEL; - /******************************************************************* Inits a SAMR_Q_CLOSE_HND structure. ********************************************************************/ @@ -93,14 +91,14 @@ BOOL samr_io_r_close_hnd(char *desc, SAMR_R_CLOSE_HND *r_u, prs_struct *ps, int Reads or writes a structure. ********************************************************************/ -void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN *q_u, - POLICY_HND *connect_pol, uint32 rid, - DOM_SID *sid) +void init_samr_q_open_domain(SAMR_Q_OPEN_DOMAIN *q_u, + POLICY_HND *connect_pol, + uint32 access_mask, DOM_SID *sid) { DEBUG(5,("samr_init_q_open_domain\n")); - memcpy(&q_u->connect_pol, connect_pol, sizeof(q_u->connect_pol)); - q_u->rid = rid; + q_u->pol = *connect_pol; + q_u->access_mask = access_mask; init_dom_sid2(&q_u->dom_sid, sid); } @@ -119,12 +117,12 @@ BOOL samr_io_q_open_domain(char *desc, SAMR_Q_OPEN_DOMAIN *q_u, prs_struct *ps, if(!prs_align(ps)) return False; - if(!smb_io_pol_hnd("connect_pol", &q_u->connect_pol, ps, depth)) + if(!smb_io_pol_hnd("pol", &q_u->pol, ps, depth)) return False; if(!prs_align(ps)) return False; - if(!prs_uint32("rid", ps, depth, &q_u->rid)) + if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) return False; if(!smb_io_dom_sid2("sid", &q_u->dom_sid, ps, depth)) @@ -2552,23 +2550,22 @@ BOOL samr_io_r_lookup_rids(char *desc, SAMR_R_LOOKUP_RIDS *r_u, prs_struct *ps, Inits a SAMR_Q_OPEN_USER struct. ********************************************************************/ -void init_samr_q_open_user(SAMR_Q_OPEN_USER *q_u, - POLICY_HND *pol, - uint32 unk_0, uint32 rid) +void init_samr_q_open_user(SAMR_Q_OPEN_USER *q_u, POLICY_HND *pol, + uint32 access_mask, uint32 rid) { - DEBUG(5,("samr_init_q_open_user\n")); + DEBUG(5,("init_samr_q_open_user\n")); - memcpy(&q_u->domain_pol, pol, sizeof(q_u->domain_pol)); - - q_u->unknown_0 = unk_0; - q_u->user_rid = rid; + q_u->domain_pol = *pol; + q_u->access_mask = access_mask; + q_u->user_rid = rid; } /******************************************************************* Reads or writes a structure. ********************************************************************/ -BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER *q_u, prs_struct *ps, int depth) +BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER *q_u, + prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -2584,7 +2581,7 @@ BOOL samr_io_q_open_user(char *desc, SAMR_Q_OPEN_USER *q_u, prs_struct *ps, int if(!prs_align(ps)) return False; - if(!prs_uint32("unknown_0", ps, depth, &q_u->unknown_0)) + if(!prs_uint32("access_mask", ps, depth, &q_u->access_mask)) return False; if(!prs_uint32("user_rid ", ps, depth, &q_u->user_rid)) return False; @@ -3233,7 +3230,8 @@ void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO *r_u, Reads or writes a structure. ********************************************************************/ -BOOL samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO *r_u, prs_struct *ps, int depth) +BOOL samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO *r_u, + prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -3366,19 +3364,18 @@ BOOL samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER *r_u, prs_struct *ps, Inits a SAMR_Q_CONNECT structure. ********************************************************************/ -void init_samr_q_connect(SAMR_Q_CONNECT *q_u, - char *srv_name, uint32 unknown_0) +void init_samr_q_connect(SAMR_Q_CONNECT *q_u, char *srv_name, + uint32 access_mask) { int len_srv_name = strlen(srv_name); DEBUG(5,("init_q_connect\n")); /* make PDC server name \\server */ - q_u->ptr_srv_name = len_srv_name > 0 ? 1 : 0; - init_unistr2(&q_u->uni_srv_name, srv_name, len_srv_name+1); + q_u->ptr_srv_name = len_srv_name > 0; + init_unistr2(&q_u->uni_srv_name, srv_name, len_srv_name + 1); - /* example values: 0x0000 0002 */ - q_u->unknown_0 = unknown_0; + q_u->access_mask = access_mask; } /******************************************************************* @@ -3404,7 +3401,7 @@ BOOL samr_io_q_connect(char *desc, SAMR_Q_CONNECT *q_u, prs_struct *ps, int dep if(!prs_align(ps)) return False; - if(!prs_uint32("unknown_0 ", ps, depth, &q_u->unknown_0)) + if(!prs_uint32("access_mask ", ps, depth, &q_u->access_mask)) return False; return True; |