[SSSD] [Patch] Added null checks to authtok module

Jakub Hrozek jhrozek at redhat.com
Mon Nov 18 15:57:49 UTC 2013


On Mon, Nov 18, 2013 at 08:35:14AM -0500, Simo Sorce wrote:
> On Mon, 2013-11-18 at 11:02 +0100, Jakub Hrozek wrote:
> > On Sat, Nov 16, 2013 at 09:39:36AM -0500, Simo Sorce wrote:
> > > On Sat, 2013-11-16 at 19:16 +0530, Pallavi Jha wrote:
> > > > Hello,
> > > > 
> > > > Please find the attachment below. Kindly review.
> > > > 
> > > I am not really a fan of these null checks, I prefer the code to crash
> > > in this case because these functions should never be called with an
> > > empty context.
> > 
> > It's a matter of style mostly I suppose, but do you prefer the code to
> > crash even for external facing API?
> 
> No.
> 
> > I agree with you when it comes to internal/static functions.
> 
> Yes only internal where we have few entry points and we want to catch
> asap programming errors.
> 
> I am in general for gracefully degrading, but some parts of the code are
> better fall hard immediately IMO.

OK, then we agree. Pallavi, can you change the code so that only input
parameters of public functions (only those without "static" keyword) are
checked?



More information about the sssd-devel mailing list