[SSSD] [PATCH] Let the PAM client send its PID

Stephen Gallagher sgallagh at redhat.com
Fri Sep 11 14:48:10 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/11/2009 10:29 AM, Sumit Bose wrote:
> On Fri, Sep 11, 2009 at 09:07:01AM -0400, Stephen Gallagher wrote:
> On 09/11/2009 06:13 AM, Sumit Bose wrote:
>>>> Hi,
>>>>
>>>> with this patch the client sends its PID to sssd. This is at least
>>>> needed by the krb5 provider if the client PID should be part of the
>>>> credential cache file.
>>>>
>>>> bye,
>>>> Sumit
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> sssd-devel mailing list
>>>> sssd-devel at lists.fedorahosted.org
>>>> https://fedorahosted.org/mailman/listinfo/sssd-devel
> 
> I'm not a huge fan of the assignment in extract_uint32_t.
> 
> Isn't
> *var = (uint32_t)body[*c]);
> the same, or does that throw typecast warnings?
> 
> 
>> no, this is not the same, this takes the byte a body[*c] and cast it to
>> uint32_t, because body is uint8_t.
> 
> If the latter, then I'd prefer that it at least be written as:
> *var = *(uint32_t *)&body[*c];
> 
> Using array notation gives an implication I don't like.
> 
> Same comment about array notation use in add_uint32_t_item.
> 
>> My preference would be
> 
>> *var = *(uint32_t *)(body + *c);
> 
>> but the other notation was used in the code before I started using it in
>> the PAM related parts. I think it would make sense to agree on a
>> notation and change the whole code. Would you mind filing a bug?

I agree. I'll file a bug on this.

> 
> 
> 
> 
> Also, don't we need to bump the protocol version if we're adding new
> mandatory arguments?
> 
>> Good point. Shall we make it mandatory? Currently it is only needed if
>> you want to have the pid in your ccache file (which is not the default).

I think it should be mandatory in the protocol, with the option to just
pass 0 if it's not supported by the client (for compatibility)

> 
>> bye,
>> Sumit
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkqqYyMACgkQeiVVYja6o6ONIACgnyqn3oDuS0UtvBJQKzF7CSM2
pKUAoJ8jDGhZqFfY8neejo++x80uH0Q/
=4+35
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list