summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-04-14 11:21:25 +0000
committerTim Potter <tpot@samba.org>2002-04-14 11:21:25 +0000
commitd0386372b2f491cd9281fc6466b1b5d2f5cf59a9 (patch)
tree5f9544811c5b2c37a45b1db91ebff33e3a3a0519 /source3/utils
parent3a139656a336ac0b86632b9a32ed32ed85c969c0 (diff)
downloadsamba-d0386372b2f491cd9281fc6466b1b5d2f5cf59a9.tar.gz
samba-d0386372b2f491cd9281fc6466b1b5d2f5cf59a9.tar.bz2
samba-d0386372b2f491cd9281fc6466b1b5d2f5cf59a9.zip
The cli_lsa_lookup_{names,sids} functions were returning useless
information when one or more of the names/sids being queried were not resolvable. We now return a list the same length as the parameters passed instead of an array of just the resolvable names/sids. (This used to be commit 245468dbabb7c849ce423cc3cb586fa913d0adfe)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcacls.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 8c0b2a4a72..017f4035b0 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -108,7 +108,6 @@ static void SidToString(fstring str, DOM_SID *sid)
char **domains = NULL;
char **names = NULL;
uint32 *types = NULL;
- int num_names;
sid_to_string(str, sid);
@@ -118,8 +117,8 @@ static void SidToString(fstring str, DOM_SID *sid)
if (!cacls_open_policy_hnd() ||
!NT_STATUS_IS_OK(cli_lsa_lookup_sids(&lsa_cli, lsa_cli.mem_ctx,
- &pol, 1, sid, &domains, &names,
- &types, &num_names)) ||
+ &pol, 1, sid, &domains,
+ &names, &types)) ||
!domains || !domains[0] || !names || !names[0]) {
return;
}
@@ -137,7 +136,6 @@ static BOOL StringToSid(DOM_SID *sid, const char *str)
{
uint32 *types = NULL;
DOM_SID *sids = NULL;
- int num_sids;
BOOL result = True;
if (strncmp(str, "S-", 2) == 0) {
@@ -145,9 +143,9 @@ static BOOL StringToSid(DOM_SID *sid, const char *str)
}
if (!cacls_open_policy_hnd() ||
- !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx, &pol, 1,
- &str,
- &sids, &types, &num_sids))) {
+ !NT_STATUS_IS_OK(cli_lsa_lookup_names(&lsa_cli, lsa_cli.mem_ctx,
+ &pol, 1, &str, &sids,
+ &types))) {
result = False;
goto done;
}