summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-14 20:23:20 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-14 20:23:20 +0000
commit254470cb566fc06f5818830d105361d853648d6e (patch)
tree503e7fc28d56ccff11720f3d5c653d308c6af6ff /source3/rpc_client
parentd4385df3e80d63dbc7a1c90cc903d8343dfba652 (diff)
downloadsamba-254470cb566fc06f5818830d105361d853648d6e.tar.gz
samba-254470cb566fc06f5818830d105361d853648d6e.tar.bz2
samba-254470cb566fc06f5818830d105361d853648d6e.zip
added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids.
(This used to be commit 0b2095e092d747f741e78a3349f0b81a72811629)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_lsarpc.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 0e28174b8b..6f78f308dd 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -106,6 +106,7 @@ BOOL lsa_lookup_names(struct cli_state *cli, uint16 fnum,
int num_names,
const char **names,
DOM_SID **sids,
+ uint8 **types,
int *num_sids)
{
prs_struct rbuf;
@@ -180,6 +181,11 @@ BOOL lsa_lookup_names(struct cli_state *cli, uint16 fnum,
}
}
+ if (types != NULL && valid_response && r_l.num_entries != 0)
+ {
+ (*types) = (uint8*)malloc((*num_sids) * sizeof(uint8));
+ }
+
if (sids != NULL && valid_response && r_l.num_entries != 0)
{
(*sids) = (DOM_SID*)malloc((*num_sids) * sizeof(DOM_SID));
@@ -201,10 +207,18 @@ BOOL lsa_lookup_names(struct cli_state *cli, uint16 fnum,
{
sid_append_rid(sid, dom_rid);
}
+ if (types != NULL && (*types) != NULL)
+ {
+ (*types)[i] = t_rids[i].type;
+ }
}
else
{
ZERO_STRUCTP(sid);
+ if (types != NULL && (*types) != NULL)
+ {
+ (*types)[i] = SID_NAME_UNKNOWN;
+ }
}
}
}
@@ -224,6 +238,7 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum,
int num_sids,
DOM_SID **sids,
char ***names,
+ uint8 **types,
int *num_names)
{
prs_struct rbuf;
@@ -293,6 +308,11 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum,
}
}
+ if (types != NULL && valid_response && t_names.num_entries != 0)
+ {
+ (*types) = (uint8*)malloc((*num_names) * sizeof(uint8));
+ }
+
if (names != NULL && valid_response && t_names.num_entries != 0)
{
(*names) = (char**)malloc((*num_names) * sizeof(char*));
@@ -320,10 +340,18 @@ BOOL lsa_lookup_sids(struct cli_state *cli, uint16 fnum,
dom_name, name);
(*names)[i] = strdup(full_name);
+ if (types != NULL && (*types) != NULL)
+ {
+ (*types)[i] = t_names.name[i].sid_name_use;
+ }
}
else
{
(*names)[i] = NULL;
+ if (types != NULL && (*types) != NULL)
+ {
+ (*types)[i] = SID_NAME_UNKNOWN;
+ }
}
}
}