[PATCH] Remove fstring from wb_acct_info

Andrew Bartlett abartlet at samba.org
Thu Nov 1 05:26:43 UTC 2018


On Thu, 2018-11-01 at 11:55 +1300, Andrew Bartlett via samba-technical
wrote:
> 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

Pushed to autobuild.

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list