[lkml]   [2001]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: getpeereid() for Linux
Florian Weimer <Florian.Weimer@RUS.Uni-Stuttgart.DE>
> Michael Bacarella <> 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:

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

Jesse I Pollard, II

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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:02    [W:0.027 / U:5.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site