Patch review -- file_id_string_tos()?

Volker Lendecke Volker.Lendecke at SerNet.DE
Tue Oct 30 01:34:49 MDT 2012

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

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.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen, mailto:kontakt at

More information about the samba-technical mailing list