summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-28 21:30:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:05 -0500
commit2b8abc030b1eca43f7c0c05dc96eebeb6c492030 (patch)
treebaaede502f92ed3528fc26793eff4c1adda96ed5 /source3/rpc_client
parent79eaa709a05d765673ea0766b1d23a0c60d76b4c (diff)
downloadsamba-2b8abc030b1eca43f7c0c05dc96eebeb6c492030.tar.gz
samba-2b8abc030b1eca43f7c0c05dc96eebeb6c492030.tar.bz2
samba-2b8abc030b1eca43f7c0c05dc96eebeb6c492030.zip
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)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_lsarpc.c14
1 files changed, 8 insertions, 6 deletions
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;