diff options
Diffstat (limited to 'source4/utils')
-rw-r--r-- | source4/utils/setntacl.c | 5 | ||||
-rw-r--r-- | source4/utils/setnttoken.c | 8 |
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); |