summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-05-01 23:07:30 +0000
committerJeremy Allison <jra@samba.org>2001-05-01 23:07:30 +0000
commitf5eab4421c0fcda6907259cb91ba091e9cca5eae (patch)
treed091ec613c15342bd895c1d5447130bc6a6e49c8 /source3/utils
parent0961f7b494319e90c581016fda95be0b8eaf4229 (diff)
downloadsamba-f5eab4421c0fcda6907259cb91ba091e9cca5eae.tar.gz
samba-f5eab4421c0fcda6907259cb91ba091e9cca5eae.tar.bz2
samba-f5eab4421c0fcda6907259cb91ba091e9cca5eae.zip
Fixup smbcacls. Don't return memory already freed, don't free memory allocated
with talloc. Jeremy. (This used to be commit 0ae0d024f5898f7e47e4b1d4487b15447096780c)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbcacls.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 66b15ea1ac..7b459a32ed 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -127,10 +127,6 @@ static void SidToString(fstring str, DOM_SID *sid)
/* Converted OK */
fstrcpy(str, names[0]);
-
- safe_free(names[0]);
- safe_free(names);
- safe_free(types);
}
/* convert a string to a SID, either numeric or username/group */
@@ -154,9 +150,6 @@ static BOOL StringToSid(DOM_SID *sid, char *str)
sid_copy(sid, &sids[0]);
- safe_free(sids);
- safe_free(types);
-
done:
return result;
@@ -458,7 +451,7 @@ static int cacl_dump(struct cli_state *cli, char *filename)
return EXIT_FAILED;
}
- sd = cli_query_secdesc(cli, fnum);
+ sd = cli_query_secdesc(cli, fnum, ctx);
if (!sd) {
printf("ERROR: secdesc query failed: %s\n", cli_errstr(cli));
@@ -495,7 +488,7 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode,
if (!StringToSid(&sid, new_username))
return EXIT_PARSE_ERROR;
- old = cli_query_secdesc(cli, fnum);
+ old = cli_query_secdesc(cli, fnum, ctx);
cli_close(cli, fnum);
@@ -589,7 +582,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
return EXIT_FAILED;
}
- old = cli_query_secdesc(cli, fnum);
+ old = cli_query_secdesc(cli, fnum, ctx);
if (!old) {
printf("calc_set: Failed to query old descriptor\n");