[Freeipa-devel] [PATCH] 057 Bad return values for ipa-rmkeytab command

Martin Kosek mkosek at redhat.com
Tue May 3 13:09:23 UTC 2011


On Tue, 2011-05-03 at 08:30 -0400, Simo Sorce wrote:
> On Mon, 2011-05-02 at 11:04 +0200, Martin Kosek wrote:
> > diff --git a/ipa-client/ipa-rmkeytab.c b/ipa-client/ipa-rmkeytab.c
> > index
> > 8afa9e1c4ea822554af436bf4644d717d922f56e..73a74070cf696f1e2b9fe3c8374446b68cc48441 100644
> > --- a/ipa-client/ipa-rmkeytab.c
> > +++ b/ipa-client/ipa-rmkeytab.c
> > @@ -108,6 +108,7 @@ remove_realm(krb5_context context, krb5_keytab
> > ktid, const char *realm, int debu
> >      krb5_kt_cursor kt_cursor;
> >      char * entry_princ_s = NULL;
> >      int rval = 0;
> > +    char realm_found = FALSE;
> 
> -----^^^^^---------------^^^^^^--
>  
> >      krberr = krb5_kt_start_seq_get(context, ktid, &kt_cursor);
> >      memset(&entry, 0, sizeof(entry));
> > @@ -128,6 +129,7 @@ remove_realm(krb5_context context, krb5_keytab
> > ktid, const char *realm, int debu
> >          krb5_kt_end_seq_get(context, ktid, &kt_cursor);
> >  
> >          if (strstr(entry_princ_s, realm) != NULL) {
> > +            realm_found = TRUE;
> 
> ---------------------------^^^^^^^
> 
> >              rval = remove_principal(context, ktid, entry_princ_s,
> > debug);
> >              if (rval != 0)
> >                  goto done;
> > @@ -136,6 +138,11 @@ remove_realm(krb5_context context, krb5_keytab
> > ktid, const char *realm, int debu
> >          }
> >      } 
> 
> Nack, please use 'bool', 'false' and 'true' here, not 'char' and
> uppercase boolean value names.
> 
> Simo.
> 

OK. Fixed patch attached.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-mkosek-057-2-bad-return-values-for-ipa-rmkeytab-command.patch
Type: text/x-patch
Size: 2413 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110503/ff8f0819/attachment.bin>


More information about the Freeipa-devel mailing list