Re: getpeereid() for Linux

Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Wed, 5 Sep 2001 10:51:55 -0500 (CDT)


Florian Weimer <Florian.Weimer@RUS.Uni-Stuttgart.DE>
> Michael Bacarella <mbac@nyct.net> writes:
>
> > There's no need. The equivalent functionality can already be
> > implemented in userspace.
>
> Well, it doesn't work with TCP. Uh-oh, I see I forgot to mention the
> following: I need this functionality for local TCP connections, not
> just UNIX domain sockets.

It doesn't work on BSD either. The manpage says:
(http://www.openbsd.org/cgi-bin/man.cgi?query=getpeereid&sektion=2&apropos=0&mnpath=OpenBSD+Current)

getpeereid() returns the effective user ID and group ID of the peer con-
nected to the UNIX domain socket s.

One common use is for UNIX domain servers to determine the credentials of
clients that have connected to it.

It is not possible to get a creditential from TCP connections yet. That
requires an extension to IPSec to even be able to carry credentials. There
is no reliable communication path (even for identd) to be able to pass
credentials.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/