diff options
Diffstat (limited to 'source3/rpc_parse/parse_reg.c')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index b97fe3958b..47e1ae3af2 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -135,8 +135,7 @@ static void reg_io_hdrbuf_sec(uint32 ptr, uint32 *ptr3, BUFHDR *hdr_sec, SEC_DES } if (ptr3 == NULL || *ptr3 != 0) { - /* JRA - this line is probably wrong... */ - sec_io_desc_buf("data ", &data , ps, depth); + sec_io_desc_buf("data ", data , ps, depth); } smb_io_hdrbuf_post("hdr_sec", hdr_sec, ps, depth, hdr_offset, data->max_len, data->len); @@ -152,7 +151,8 @@ creates a structure. void make_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd, char *name, char *class, SEC_ACCESS *sam_access, - SEC_DESC_BUF *sec_buf) + SEC_DESC_BUF *sec_buf, + int sec_len, SEC_DESC *sec) { int len_name = name != NULL ? strlen(name ) + 1: 0; int len_class = class != NULL ? strlen(class) + 1: 0; @@ -175,8 +175,9 @@ void make_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd, q_c->data = sec_buf; q_c->ptr2 = 1; - make_buf_hdr(&(q_c->hdr_sec), sec_buf->len, sec_buf->len); + make_buf_hdr(&(q_c->hdr_sec), sec_len, sec_len); q_c->ptr3 = 1; + make_sec_desc_buf(q_c->data, sec_len, sec); q_c->unknown_2 = 0x00000000; } @@ -548,7 +549,7 @@ void reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) makes a structure. ********************************************************************/ void make_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, - SEC_DESC_BUF *sec_desc_buf) + uint32 buf_len, SEC_DESC *sec_desc) { if (q_i == NULL) return; @@ -557,8 +558,8 @@ void make_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, q_i->sec_info = DACL_SECURITY_INFORMATION; q_i->ptr = 1; - make_buf_hdr(&(q_i->hdr_sec), sec_desc_buf->len, sec_desc_buf->len); - q_i->data = sec_desc_buf; + make_buf_hdr(&(q_i->hdr_sec), buf_len, buf_len); + make_sec_desc_buf(q_i->data, buf_len, sec_desc); } /******************************************************************* @@ -601,7 +602,7 @@ void reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, in makes a structure. ********************************************************************/ void make_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol, - uint32 sec_buf_size, SEC_DESC_BUF *psdb) + uint32 buf_len, SEC_DESC_BUF *sec_buf) { if (q_i == NULL) return; @@ -611,10 +612,14 @@ void make_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol, GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION; - q_i->ptr = psdb != NULL ? 1 : 0; - q_i->data = psdb; + q_i->ptr = sec_buf != NULL ? 1 : 0; + q_i->data = sec_buf; - make_buf_hdr(&(q_i->hdr_sec), sec_buf_size, 0); + if (sec_buf != NULL) + { + make_buf_hdr(&(q_i->hdr_sec), buf_len, 0); + make_sec_desc_buf(q_i->data, buf_len, NULL); + } } /******************************************************************* @@ -671,7 +676,8 @@ void reg_io_r_get_key_sec(char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, i if (r_q->ptr != 0) { - sec_io_desc_buf("", &r_q->data, ps, depth); + smb_io_hdrbuf("", &(r_q->hdr_sec), ps, depth); + sec_io_desc_buf("", r_q->data, ps, depth); prs_align(ps); } |