Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.wizards Subject: Re: socket -> UID Message-ID: <1990Jan15.053647.24388@athena.mit.edu> Date: 15 Jan 90 05:36:47 GMT References: <832@unipas.fmi.uni-passau.de> Sender: news@athena.mit.edu (News system) Reply-To: jik@athena.mit.edu (Jonathan I. Kamens) Organization: Massachusetts Institute of Technology Lines: 22 In article <832@unipas.fmi.uni-passau.de>, hessmann@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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8495 Home: 617-782-0710