Subject: Re: kern/10798: getpeereid system call
To: Jason R Thorpe <thorpej@zembu.com>
From: William E. Baxter <web@superscript.com>
List: tech-kern
Date: 08/09/2000 15:43:20
On Wed, Aug 09, 2000 at 12:58:04PM -0700, Jason R Thorpe wrote:
> On Wed, Aug 09, 2000 at 12:19:04PM -0700, web-netbsd@superscript.com wrote:
>
> > >Synopsis: getpeereid system call
>
> I implemented a different mechanism, the LOCAL_CREDS socket option,
>
> LOCAL_CREDS, set by a server listening on a Unix domain socket,
> causes a "sockcreds" message (which includes the supplemental group
> list for the user, as well) to come in as ancillary data. This
> happens for every datagram in the SOCK_DGRAM case, and upon the
> client's first send of data in the SOCK_STREAM case.
I'd be happy to use LOCAL_CREDS if it permitted the server to obtain
credentials without waiting for the client to provide them.
Otherwise, clients can consume connections anonymously, and that's
unacceptable for my application.
If LOCAL_CREDS caused connect() to pass credentials immediately, in
addition to the present behavior, that would almost suffice. There
would need to be a means to access the information on the server side.
Regards,
W.