[SSSD] [PATCH] Remove the krb5_changepw_principal option

Simo Sorce ssorce at redhat.com
Fri Jun 11 12:07:40 UTC 2010


On Fri, 11 Jun 2010 11:19:32 +0200
Jakub Hrozek <jhrozek at redhat.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 06/10/2010 09:54 PM, Simo Sorce wrote:
> > On Thu, 10 Jun 2010 20:34:13 +0200
> > Jakub Hrozek <jhrozek at redhat.com> wrote:
> > 
> >>  
> >> +#define SSSD_KRB5_CHANGEPW_PRINCIPLE
> >> "SSSD_KRB5_CHANGEPW_PRINCIPLE" +
> > 
> > shouldn't this be: "kadmin/changepw" ?
> > 
> 
> Yes, thank you, I replied to Stephen's review with the fixed patch.
> 
> >> +                        discard_const_p(char,
> >> SSSD_KRB5_CHANGEPW_PRINCIPLE),
> >> +                        kr->options);
> >>  
> > 
> > I really don't like the use of discard_const_p(), can you please
> > talloc_strdup() it ?
> > 
> 
> Done, but would you mind giving a couple of examples where
> discard_const_p() should or should not be used? It seems I don't quite
> understand it.

IT should be used only when you are calling a system call that
takes a non-const and where you have a const value and you are
absolutely positive it will not be changed. 

In very rare other cases, so rare that discussing each of them is ok.

Simo.



-- 
Simo Sorce * Red Hat, Inc * New York



More information about the sssd-devel mailing list