socket -> UID
Jonathan I. Kamens
jik at athena.mit.edu
Mon Jan 15 16:36:47 AEST 1990
In article <832 at unipas.fmi.uni-passau.de>, hessmann at unipas.fmi.uni-passau.de
(Georg Hessmann) writes:
> [How can a program at one end of an Internet socket find out what the UID and
> GID of the process at the other end of the socket are?]
(I speak from experience with BSD4.3; I don't know if what I say below
is wrong for other versions of Unix, although I very much doubt that it is.)
This can't be done. An Internet domain socket doesn't have any UID or GID
information associated with it; Internet domain sockets are not in any
way tied to the Unix operating system -- tcp/ip code, including code to
use sockets as Unix does, exists for any number of different
architectures, including VM/CMS, VMS, and MacOS.
You are going to have to send the UID and GID over the socket yourself
at some point.
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8495 Home: 617-782-0710
More information about the Comp.unix.wizards
mailing list