[PATCH v3] fixes account locked when using winbind refresh tickets

Ralph Böhme slow at samba.org
Mon Jan 15 17:17:09 UTC 2018


On Mon, Jan 15, 2018 at 05:13:38PM +0100, Andreas Schneider via samba-technical wrote:
> On Monday, 15 January 2018 16:48:02 CET David Disseldorp via samba-technical 
> wrote:
> > Hi Andreas,
> > 
> > On Mon, 15 Jan 2018 16:29:33 +0100, Andreas Schneider via samba-technical 
> wrote:
> > > +static uint64_t fetch_last_password_change(struct WINBINDD_CCACHE_ENTRY
> > > *entry)
> > > +{
> > > +	TALLOC_CTX *ctx = talloc_new(entry);
> > > 
> > > Please use:
> > > 	TALLOC_CTX *frame = talloc_stackframe();
> > > 
> > > This is cheaper than talloc_new().
> > 
> > Are there any public real-world benchmark results that show this? In
> > terms of readability I find the former much easier to follow.
> 
> Ask Metze or Volker :-)

I've recently looked into the code and my personal take-away was: if possible,
avoid both. :) If really needed (for proper run-down of temp objects), use
talloc_stackframe().

-slow

-- 
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/



More information about the samba-technical mailing list