From owner-freebsd-questions Tue Oct 22 11:24:42 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA21344 for questions-outgoing; Tue, 22 Oct 1996 11:24:42 -0700 (PDT) Received: from lserver.infoworld.com (lserver.infoworld.com [192.216.48.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id LAA21339 for ; Tue, 22 Oct 1996 11:24:40 -0700 (PDT) From: BRETT_GLASS@infoworld.com Received: from ccgate.infoworld.com (ccgate.infoworld.com [192.216.49.101]) by lserver.infoworld.com (8.7.5/8.7.3/GNAC-GW-1.2) with SMTP id LAA10101; Tue, 22 Oct 1996 11:23:08 -0700 (PDT) Received: from ccMail by ccgate.infoworld.com (SMTPLINK V2.11) id AA846008353; Tue, 22 Oct 96 10:53:20 PST Date: Tue, 22 Oct 96 10:53:20 PST Message-Id: <9609228460.AA846008353@ccgate.infoworld.com> To: Wes Peters Cc: questions@freebsd.org Subject: Programming question: How to identify owner of a socket? Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > As far as I know, the client would have to send this information > across the link to the server. This is a special case, though: the client and the server are the same machine. (The user is coming in via a modem connection and SLiRP.) So, a privileged process ought to be able to find out what process has opened the socket and is using that port number -- from which it ought to be able to deduce the ID of the user. --Brett