summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-01-19 16:52:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:59 -0500
commitb3757eadf05a4e47a5cd19049ee2c5eecf140c37 (patch)
tree64aca31a02e6198587baedd1763b37c37d653d03 /source3/rpc_client
parent0a2449faf5a2ffb1cc84807761fdd91b6821c4c6 (diff)
downloadsamba-b3757eadf05a4e47a5cd19049ee2c5eecf140c37.tar.gz
samba-b3757eadf05a4e47a5cd19049ee2c5eecf140c37.tar.bz2
samba-b3757eadf05a4e47a5cd19049ee2c5eecf140c37.zip
r4849: * finish SeAddUsers support in srv_samr_nt.c
* define some const SE_PRIV structure for use when you need a SE_PRIV* to a privilege * fix an annoying compiler warngin in smbfilter.c * translate SIDs to names in 'net rpc rights list accounts' * fix a seg fault in cli_lsa_enum_account_rights caused by me forgetting the precedence of * vs. [] (This used to be commit d25fc84bc2b14da9fcc0f3c8d7baeca83f0ea708)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_lsarpc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index bf2c0353c0..98c2475a65 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -1218,7 +1218,7 @@ NTSTATUS cli_lsa_query_secobj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_lsa_enum_account_rights(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *pol, DOM_SID *sid,
- uint32 *count, char ***privs_name)
+ uint32 *count, char ***priv_names)
{
prs_struct qbuf, rbuf;
LSA_Q_ENUM_ACCT_RIGHTS q;
@@ -1226,6 +1226,7 @@ NTSTATUS cli_lsa_enum_account_rights(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result;
int i;
fstring *privileges;
+ char **names;
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1260,15 +1261,17 @@ NTSTATUS cli_lsa_enum_account_rights(struct cli_state *cli, TALLOC_CTX *mem_ctx,
privileges = TALLOC_ARRAY(mem_ctx, fstring, *count);
- *privs_name = TALLOC_ARRAY(mem_ctx, char *, *count);
+ names = TALLOC_ARRAY(mem_ctx, char *, *count);
for ( i=0; i<*count; i++ ) {
/* ensure NULL termination ... what a hack */
pull_ucs2(NULL, privileges[i], r.rights.strings[i].string.buffer,
sizeof(fstring), r.rights.strings[i].string.uni_str_len*2 , 0);
/* now copy to the return array */
- *privs_name[i] = talloc_strdup( mem_ctx, privileges[i] );
+ names[i] = talloc_strdup( mem_ctx, privileges[i] );
}
+
+ *priv_names = names;
done: