svn commit: samba r16711 - in trunk/source/passdb: .

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Jul 1 08:02:08 GMT 2006

On Fri, Jun 30, 2006 at 03:35:58PM -0700, Jeremy Allison wrote:
> > I think I'm missing the broader problem here, because part of me is
> > asking 'What is wrong with talloc_steal()?'.
> Unmaintainable code.

That's maybe a bit brief :-)

I think there's one use pattern where it would make sense:
It's creating a temporary talloc context in a routine
handing the resulting structure to the context that we were
given. The only really valid one from my point of view was
in find_forced_user which is not given a talloc context and
which has to create a NT token as its own talloc parent. But
then you could argue that find_forced_user should have been
given a talloc context, so that this one would have been
unnecessary as well.

To be honest, every time I put in talloc_steal I had to
twist my brain a bit to make sure I get it correct. This
completely personal impression and due to not being used to
it, but I think it should be a warning sign. So when Jeremy
whined about talloc_steal() I gave it a try. If it would
have been difficult or very expensive to get rid of, then I
would have left it in. But I don't think that memdup'ing a
name of usually at most 20-30 bytes in lookup_name is very

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the samba-technical mailing list