[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>:
> Jesse Pollard <> writes:
> > 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.
> I need the credentials only for local connections, though. This is
> technically possible. A userspace implementation partially cloning
> ident seems to be a possible approach.

It won't be reliable. Even the documentation for ident (at least the version
I looked at a while ago, might be different now, but I don't think so) says
that the data returned is not reliable. (even fuser doesn't always get this
right when trying to identify processes with open sockets).

Part of the problem is that TCP sockets don't carry the same information
that domain sockets have (could be partially wrong here, it just may not
be filled in since the source of the data can't supply it). The other
part is that it depends on what allocated the socket. Ownership is established
at socket allocation time, and the socket can be passed to a totally different
user. Identity of the user of the socket is therefore lost.

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.022 / U:1.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site