On Fri, 11 Jun 2010 11:19:32 +0200
Jakub Hrozek <jhrozek(a)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(a)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