[PATCH] Remove fstring from wb_acct_info
Andrew Bartlett
abartlet at samba.org
Wed Oct 31 22:55:06 UTC 2018
On Wed, 2018-10-31 at 15:36 -0700, Jeremy Allison via samba-technical
wrote:
> On Thu, Nov 01, 2018 at 11:25:20AM +1300, Andrew Bartlett wrote:
> >
> > However, my question is more: what is the lifetime for the output of
> > centry_string() and ads_pull_username()?
> >
> > I think the centry_string() should be duplicated with tallco_strdup()
> > (I dare not suggest talloc_reference) and ads_pull_username() brought
> > over with talloc_steal().
>
> centry_string() is doing a talloc_strdup onto the passed in
> talloc context, which in this case is (*info) - the last
> argument to centry_string is the context to copy onto.
>
> Same for the ads_pull_username() and ads_pull_string()
> calls (they're tallocing onto *info).
>
> So the patch is always talloc'ing onto the owning info, which (IMHO) is
> the correct thing to do.
OK. Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
More information about the samba-technical
mailing list