getpeereid() for Linux
Florian Weimer <[email protected]>
Quoted 8 lines
Quoted 2 lines · Michael Bacarella
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: [email protected]
Any opinions expressed are solely my own.
Quoted 4 lines · Jesse Pollard
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.
Signature · 3 lines
Florian Weimer [email protected] University of Stuttgart http://cert.uni-stuttgart.de/ RUS-CERT +49-711-685-5973/fax +49-711-685-5898
Followup to: <[email protected]> By author: Florian Weimer <[email protected]> In newsgroup: linux.dev.kernel
Quoted 5 lines
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.
Since it will only work locally anyway, just use a Unix domain socket -- that's what they're for.
-hpa
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>