[SSSD] [PATCH 1/1] LDAP: Better debug logging when saving groups

Jakub Hrozek jhrozek at redhat.com
Thu Nov 1 10:27:51 UTC 2012


On Wed, Oct 31, 2012 at 03:10:12PM -0400, Simo Sorce wrote:
> On Wed, 2012-10-31 at 14:36 -0400, Stephen Gallagher wrote:
> > On Wed 31 Oct 2012 02:16:02 PM EDT, Simo Sorce wrote:
> > > On Wed, 2012-10-31 at 13:18 -0400, Stephen Gallagher wrote:
> > >>   fail:
> > >> -    DEBUG(2, ("Failed to save group [%s]\n",
> > >> -              name ? name : "Unknown"));
> > >> +    DEBUG(SSSDBG_MINOR_FAILURE,
> > >> +          ("Failed to save group [%s]: [%s]\n",
> > >> +           name ? name : "Unknown",
> > >> +           strerror(ret)));
> > >
> > > Given you already print the strerror() in all previous debug messages,
> > > does it make sense to repeat it here ?
> > >
> > > (Otherwise ACK, patch looks good)
> > >
> > 
> > Well, this is a catch-all for things like ENOMEM, which my debug 
> > messages don't catch. (And as it happens, it turned out that the bug 
> > this was intended to catch was actually reporting ENOMEM and wasn't 
> > caught by my other messages)[1]
> > 
> > So I'm leaving it in. Too much information is always better than too 
> > little in debug logs.
> > 
> > [1] See Jakub's patch about the off-by-one error. Basically, we were 
> > trying to allocate an array of zero length, getting NULL back and 
> > treating it as an out-of-memory error.
> 
> Ok, then ACK.
> 
> Simo.

Pushed to master and sssd-1-9.



More information about the sssd-devel mailing list