Patch review -- file_id_string_tos()?

Andrew Bartlett abartlet at samba.org
Tue Oct 30 02:24:16 MDT 2012


On Tue, 2012-10-30 at 08:34 +0100, Volker Lendecke wrote:
> On Tue, Oct 30, 2012 at 07:52:45AM +1100, Andrew Bartlett wrote:
> > On Mon, 2012-10-29 at 16:47 +0100, Volker Lendecke wrote:
> > > Hi, Andrew!
> > > 
> > > The attached patch removes some code duplication. I send
> > > this to you because you introduced file_id_string() without
> > > _tos() recently.
> > > 
> > > Please review and push if it seems appropriate to you.
> > 
> > I'll be very glad to remove another implicit return on talloc_tos().
> 
> Actually, this one is the one (and only one) place where I
> would argue returning a string on talloc_tos() is a good
> thing. In fact, talloc_tos() was invented for this case:
> DEBUG. I did not find an easy way to print SIDs in a sane
> way without much more effort on the caller. Tridge had
> invented sid_string_dbg(), but this crashes when another
> function call called from the DEBUG args also calls
> sid_string_dbg().
> 
> I did think a LOT about the DEBUG problem. If you can come
> up with a solution that does not involve a lot of explicit
> talloc_tos() args, I'd be happy to look at it.

I would prefer explicit talloc_tos() args.

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list