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

Sumit Bose sbose at redhat.com
Sat Sep 12 08:11:48 UTC 2009


On Fri, Sep 11, 2009 at 05:46:24PM -0400, Simo Sorce wrote:
> On Fri, 2009-09-11 at 17:10 +0200, Sumit Bose wrote:
> > Most of items are not mandatory at the protocol level. If e.g. the
> > remote host is not known to the client it is not sent to the server
> > and
> > the server complains if he really needs it, e.g. the user name.
> > 
> > I haven't put a check like 'if cli_pid==0 do not send to the server'
> > because as getpid(2) says "These functions are always successful.".
> > 
> > On the server side cli_pid is 0 if the client does not send a PID
> > item.
> > 
> > I think the way it currently works is the way your are expecting it to
> > work.
> 
> Will the unpacking function work is the client doesn't send the pid at
> all (ie it is an older client ?).

Yes, it will work. This was one of the main ideas why I have changed the
original protocol some time ago. Every item has an identifier. So it is
always clear for the unpacking function what the next item will be. If
one item is missing, it is just left empty (NULL,0) on the server side.

bye,
Sumit

> If not we probably need to bump up the protocol version so that
> communication will fail much earlier and with clearer errors.
> 
> Simo.
> 
> 
> -- 
> Simo Sorce * Red Hat, Inc * New York
> 
> _______________________________________________
> 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