summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-10-27 15:40:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:51 -0500
commit157dc5e7ea2e46fee8f57f8092371512b4e6e224 (patch)
tree89167c40d8ee8ca607010fc877f3da7e72fa57ae /source4
parentfbb44e96169cb0b18cb0a242fd412a88c16faadb (diff)
downloadsamba-157dc5e7ea2e46fee8f57f8092371512b4e6e224.tar.gz
samba-157dc5e7ea2e46fee8f57f8092371512b4e6e224.tar.bz2
samba-157dc5e7ea2e46fee8f57f8092371512b4e6e224.zip
r3291: fix the build, thx to pipitas for finding this
metze (This used to be commit d331a83f08b492ea463fb8781b4c46a71f80bf42)
Diffstat (limited to 'source4')
-rw-r--r--source4/utils/setntacl.c5
-rw-r--r--source4/utils/setnttoken.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/source4/utils/setntacl.c b/source4/utils/setntacl.c
index 93939caec0..2ac6e6d6f3 100644
--- a/source4/utils/setntacl.c
+++ b/source4/utils/setntacl.c
@@ -91,9 +91,8 @@ static void setntacl(char *filename, struct security_descriptor *sd)
return 1;
}
- acl->aces = talloc_realloc(
- acl->aces,
- (acl->num_aces + 1) * sizeof(struct security_ace));
+ acl->aces = talloc_realloc(mem_ctx, acl->aces,
+ (acl->num_aces + 1) * sizeof(struct security_ace));
acl->aces[acl->num_aces].type = ace_type;
acl->aces[acl->num_aces].flags = ace_flags;
diff --git a/source4/utils/setnttoken.c b/source4/utils/setnttoken.c
index 96adaf8286..e3f699fce4 100644
--- a/source4/utils/setnttoken.c
+++ b/source4/utils/setnttoken.c
@@ -38,9 +38,12 @@ int main(int argc, char **argv)
struct ndr_push *ndr;
struct lsa_SidArray sidarray;
NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
setup_logging("setnttoken", DEBUG_STDOUT);
+ mem_ctx = talloc_init("setnttoken");
+
ndr = ndr_push_init();
sidarray.num_sids = 0;
@@ -54,9 +57,8 @@ int main(int argc, char **argv)
continue;
}
- sidarray.sids = talloc_realloc(
- sidarray.sids,
- (sidarray.num_sids + 1) * sizeof(struct lsa_SidPtr));
+ sidarray.sids = talloc_realloc(mem_ctx, sidarray.sids,
+ (sidarray.num_sids + 1) * sizeof(struct lsa_SidPtr));
sidarray.sids[sidarray.num_sids].sid =
dom_sid_dup(ndr, sid);