diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-24 18:09:33 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-24 18:09:33 +0000 |
commit | d7889cd22347e7acd4effb7682d442eef7a666e4 (patch) | |
tree | 907179b9877eece7831db52b207a5d2efcc5c469 /source3/rpc_parse | |
parent | 511b2d673649a871d406228b0bc6d4d3ac910f99 (diff) | |
download | samba-d7889cd22347e7acd4effb7682d442eef7a666e4.tar.gz samba-d7889cd22347e7acd4effb7682d442eef7a666e4.tar.bz2 samba-d7889cd22347e7acd4effb7682d442eef7a666e4.zip |
rewrote policy handle code to be generic (it's needed for client-side too)
attempted to fix regsetsec command
(This used to be commit eaac0923e0e5e3f4c3d944272a71f3235ac2a741)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 8 | ||||
-rw-r--r-- | source3/rpc_parse/parse_sec.c | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index ec2699e745..5e7e950ae4 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -664,13 +664,14 @@ BOOL reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) makes a structure. ********************************************************************/ BOOL make_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, + uint32 sec_info, uint32 buf_len, SEC_DESC *sec_desc) { if (q_i == NULL) return False; memcpy(&(q_i->pol), pol, sizeof(q_i->pol)); - q_i->sec_info = DACL_SECURITY_INFORMATION; + q_i->sec_info = sec_info; q_i->ptr = 1; make_buf_hdr(&(q_i->hdr_sec), buf_len, buf_len); @@ -723,15 +724,14 @@ BOOL reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, in makes a structure. ********************************************************************/ BOOL make_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol, + uint32 sec_info, uint32 buf_len, SEC_DESC_BUF *sec_buf) { if (q_i == NULL) return False; memcpy(&(q_i->pol), pol, sizeof(q_i->pol)); - q_i->sec_info = OWNER_SECURITY_INFORMATION | - GROUP_SECURITY_INFORMATION | - DACL_SECURITY_INFORMATION; + q_i->sec_info = sec_info; q_i->ptr = sec_buf != NULL ? 1 : 0; q_i->data = sec_buf; diff --git a/source3/rpc_parse/parse_sec.c b/source3/rpc_parse/parse_sec.c index 161e42c9ff..d4f4f8185f 100644 --- a/source3/rpc_parse/parse_sec.c +++ b/source3/rpc_parse/parse_sec.c @@ -94,6 +94,7 @@ BOOL sec_io_ace(char *desc, SEC_ACE *t, prs_struct *ps, int depth) sec_io_access ("info ", &t->info, ps, depth); prs_align(ps); smb_io_dom_sid("sid ", &t->sid , ps, depth); + prs_align(ps); prs_uint16_post("size ", ps, depth, &t->size, offset_ace_size, old_offset); @@ -519,9 +520,11 @@ BOOL sec_io_desc_buf(char *desc, SEC_DESC_BUF *sec, prs_struct *ps, int depth) sec_io_desc("sec ", sec->sec, ps, depth); } + prs_align(ps); + size = ps->offset - old_offset; - prs_uint32_post("max_len", ps, depth, &(sec->max_len), off_max_len, size == 0 ? sec->max_len : size); - prs_uint32_post("len ", ps, depth, &(sec->len ), off_len , size); + prs_uint32_post("max_len", ps, depth, &(sec->max_len), off_max_len, size == 0 ? sec->max_len : size + 8); + prs_uint32_post("len ", ps, depth, &(sec->len ), off_len , size == 0 ? 0 : size + 8); return True; } |