[PATCH] [s3] set proper ads_keytab_flush() return code on error

Andreas Schneider asn at samba.org
Wed Nov 21 11:01:42 UTC 2018


On Wednesday, 21 November 2018 11:43:02 CET swen via samba-technical wrote:
> Hi Ralph
> 
> On Wed, 2018-11-21 at 11:14 +0100, Ralph Böhme via samba-technical
> 
> wrote:
> > Hi Swen,
> > 
> > On Wed, Nov 21, 2018 at 11:06:55AM +0100, swen via samba-technical
> > 
> > wrote:
> > > Please review and push if happy.
> > 
> > oh, good catch, how did you find that?
> 
> ...by accident. Working on something else in that area.
> 
> > > @@ -477,7 +478,7 @@ int ads_keytab_flush(ADS_STRUCT *ads)
> > > 
> > > 	if (!ADS_ERR_OK(aderr)) {
> > > 	
> > > 		DEBUG(1, (__location__ ": Error while clearing service
> > > 
> > > "
> > > 
> > > 			  "principal listings in LDAP.\n"));
> > > 
> > > -		goto out;
> > > +		ret = -1;
> > > 
> > > 	}
> > > 
> > > out:
> > I guess this should also use
> > 
> > 		ret = -1;
> > 		
> >  		goto out;
> > 
> > otherwise the next person to add code after the if and before the out
> > might not
> > notice that there's no goto out.
> > 
> > What do you think?
> 
> Hmm, I personally would have removed it, but have no really strong
> feelings about it :-) ....so put it back in.
> 
> Cheers Swen

RB+

-- 
Andreas Schneider                      asn at samba.org
Samba Team                             www.samba.org
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D





More information about the samba-technical mailing list