lkml.org 
[lkml]   [2001]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: getpeereid() for Linux
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/

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