From 2b8abc030b1eca43f7c0c05dc96eebeb6c492030 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 28 Jun 2006 21:30:21 +0000 Subject: r16644: Fix bug #3887 reported by jason@ncac.gwu.edu by converting the lookup_XX functions to correctly return SID_NAME_TYPE enums. Jeremy. (This used to be commit ee2b2d96b60c668e37592c79e86c2fd851e15f69) --- source3/rpc_client/cli_lsarpc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source3/rpc_client/cli_lsarpc.c') diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index deb97724a0..97d8eb621b 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -175,7 +175,9 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, int num_sids, const DOM_SID *sids, - char ***domains, char ***names, uint32 **types) + char ***domains, + char ***names, + enum SID_NAME_USE **types) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_SIDS q; @@ -231,7 +233,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli, goto done; } - if (!((*types) = TALLOC_ARRAY(mem_ctx, uint32, num_sids))) { + if (!((*types) = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_sids))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_NO_MEMORY; goto done; @@ -252,7 +254,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli, (*names)[i] = talloc_strdup(mem_ctx, name); (*domains)[i] = talloc_strdup(mem_ctx, dom_name); - (*types)[i] = t_names.name[i].sid_name_use; + (*types)[i] = (enum SID_NAME_USE)t_names.name[i].sid_name_use; if (((*names)[i] == NULL) || ((*domains)[i] == NULL)) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); @@ -280,7 +282,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, const char **names, const char ***dom_names, DOM_SID **sids, - uint32 **types) + enum SID_NAME_USE **types) { prs_struct qbuf, rbuf; LSA_Q_LOOKUP_NAMES q; @@ -327,7 +329,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, goto done; } - if (!((*types = TALLOC_ARRAY(mem_ctx, uint32, num_names)))) { + if (!((*types = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_names)))) { DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n")); result = NT_STATUS_NO_MEMORY; goto done; @@ -363,7 +365,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli, sid_append_rid(sid, dom_rid); } - (*types)[i] = t_rids[i].type; + (*types)[i] = (enum SID_NAME_USE)t_rids[i].type; if (dom_names == NULL) { continue; -- cgit