From 35c554bef02e9acfe9cbec12d1f4ebc1067bedd4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 10 Jul 2010 09:04:43 +0200 Subject: s4:libnet_UserList: allocate children strings on the correct talloc parent Otherwise the _recv() function won't move the children strings to the callers memory context and let the callers crash. metze --- source4/libnet/libnet_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c index 0055639974..7f93b3f6d5 100644 --- a/source4/libnet/libnet_user.c +++ b/source4/libnet/libnet_user.c @@ -1138,11 +1138,11 @@ static void continue_users_enumerated(struct tevent_req *subreq) if (composite_nomem(user_sid, c)) return; /* username */ - s->users[i].username = talloc_strdup(c, entry->name.string); + s->users[i].username = talloc_strdup(s->users, entry->name.string); if (composite_nomem(s->users[i].username, c)) return; /* sid string */ - s->users[i].sid = dom_sid_string(c, user_sid); + s->users[i].sid = dom_sid_string(s->users, user_sid); if (composite_nomem(s->users[i].sid, c)) return; } -- cgit