diff options
author | Günther Deschner <gd@samba.org> | 2008-02-04 21:13:19 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-02-04 22:12:40 +0100 |
commit | a64cd55101ca69d7d8855964cb2b8864e039cac3 (patch) | |
tree | ffd2286d3b493f5e98eb21e864eef061bbe4c31d /source3/rpc_server | |
parent | 422a2465e6e7c85e3e4b0d59d9105a33d60f8b95 (diff) | |
download | samba-a64cd55101ca69d7d8855964cb2b8864e039cac3.tar.gz samba-a64cd55101ca69d7d8855964cb2b8864e039cac3.tar.bz2 samba-a64cd55101ca69d7d8855964cb2b8864e039cac3.zip |
Use pidl for _lsa_QuerySecurity().
Guenther
(This used to be commit 6b2f205844b1e2af4c74247fed13d6e383319067)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 24 | ||||
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 25 |
2 files changed, 9 insertions, 40 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index 5084bf915c..94fc9b806a 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -547,29 +547,7 @@ static bool api_lsa_removeprivs(pipes_struct *p) static bool api_lsa_query_secobj(pipes_struct *p) { - LSA_Q_QUERY_SEC_OBJ q_u; - LSA_R_QUERY_SEC_OBJ r_u; - - prs_struct *data = &p->in_data.data; - prs_struct *rdata = &p->out_data.rdata; - - ZERO_STRUCT(q_u); - ZERO_STRUCT(r_u); - - if(!lsa_io_q_query_sec_obj("", &q_u, data, 0)) { - DEBUG(0,("api_lsa_query_secobj: failed to unmarshall LSA_Q_QUERY_SEC_OBJ.\n")); - return False; - } - - r_u.status = _lsa_query_secobj(p, &q_u, &r_u); - - /* store the response in the SMB stream */ - if(!lsa_io_r_query_sec_obj("", &r_u, rdata, 0)) { - DEBUG(0,("api_lsa_query_secobj: Failed to marshall LSA_R_QUERY_SEC_OBJ.\n")); - return False; - } - - return True; + return proxy_lsa_call(p, NDR_LSA_QUERYSECURITY); } /*************************************************************************** diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 076e7aabed..0799d2ddf6 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1866,20 +1866,19 @@ NTSTATUS _lsa_removeprivs(pipes_struct *p, LSA_Q_REMOVEPRIVS *q_u, LSA_R_REMOVEP } /*************************************************************************** - For a given SID, remove some privileges. + _lsa_QuerySecurity ***************************************************************************/ -NTSTATUS _lsa_query_secobj(pipes_struct *p, LSA_Q_QUERY_SEC_OBJ *q_u, LSA_R_QUERY_SEC_OBJ *r_u) +NTSTATUS _lsa_QuerySecurity(pipes_struct *p, + struct lsa_QuerySecurity *r) { struct lsa_info *handle=NULL; SEC_DESC *psd = NULL; size_t sd_size; NTSTATUS status; - r_u->status = NT_STATUS_OK; - /* find the connection policy handle. */ - if (!find_policy_by_hnd(p, &q_u->pol, (void **)(void *)&handle)) + if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&handle)) return NT_STATUS_INVALID_HANDLE; /* check if the user have enough rights */ @@ -1887,7 +1886,7 @@ NTSTATUS _lsa_query_secobj(pipes_struct *p, LSA_Q_QUERY_SEC_OBJ *q_u, LSA_R_QUER return NT_STATUS_ACCESS_DENIED; - switch (q_u->sec_info) { + switch (r->in.sec_info) { case 1: /* SD contains only the owner */ @@ -1896,7 +1895,7 @@ NTSTATUS _lsa_query_secobj(pipes_struct *p, LSA_Q_QUERY_SEC_OBJ *q_u, LSA_R_QUER return NT_STATUS_NO_MEMORY; - if((r_u->buf = make_sec_desc_buf(p->mem_ctx, sd_size, psd)) == NULL) + if((*r->out.sdbuf = make_sec_desc_buf(p->mem_ctx, sd_size, psd)) == NULL) return NT_STATUS_NO_MEMORY; break; case 4: @@ -1906,16 +1905,14 @@ NTSTATUS _lsa_query_secobj(pipes_struct *p, LSA_Q_QUERY_SEC_OBJ *q_u, LSA_R_QUER if(!NT_STATUS_IS_OK(status)) return NT_STATUS_NO_MEMORY; - if((r_u->buf = make_sec_desc_buf(p->mem_ctx, sd_size, psd)) == NULL) + if((*r->out.sdbuf = make_sec_desc_buf(p->mem_ctx, sd_size, psd)) == NULL) return NT_STATUS_NO_MEMORY; break; default: return NT_STATUS_INVALID_LEVEL; } - r_u->ptr=1; - - return r_u->status; + return status; } #if 0 /* AD DC work in ongoing in Samba 4 */ @@ -2195,12 +2192,6 @@ NTSTATUS _lsa_EnumPrivs(pipes_struct *p, struct lsa_EnumPrivs *r) return NT_STATUS_NOT_IMPLEMENTED; } -NTSTATUS _lsa_QuerySecurity(pipes_struct *p, struct lsa_QuerySecurity *r) -{ - p->rng_fault_state = True; - return NT_STATUS_NOT_IMPLEMENTED; -} - NTSTATUS _lsa_SetSecObj(pipes_struct *p, struct lsa_SetSecObj *r) { p->rng_fault_state = True; |