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

Sumit Bose sbose at redhat.com
Fri Sep 11 14:29:09 UTC 2009


On Fri, Sep 11, 2009 at 09:07:01AM -0400, Stephen Gallagher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 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?


> 
> 
> 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).

bye,
Sumit


> - -- 
> Stephen Gallagher
> RHCE 804006346421761
> 
> Looking to carve out IT costs?
> www.redhat.com/carveoutcosts/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAkqqS3EACgkQeiVVYja6o6OvvQCgpCdn9uc8XsrMPdgJFPxIxgqa
> BZkAn3dr6mYITlsKRG04KKFyjENzpXbK
> =wKnD
> -----END PGP SIGNATURE-----
> _______________________________________________
> sssd-devel mailing list
> sssd-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/sssd-devel



More information about the sssd-devel mailing list