From owner-freebsd-questions@FreeBSD.ORG Mon Feb 4 13:07:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53A0716A476 for ; Mon, 4 Feb 2008 13:07:34 +0000 (UTC) (envelope-from SRS0=0IHuIv=SZ=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailout11.yourhostingaccount.com (mailout11.yourhostingaccount.com [65.254.253.90]) by mx1.freebsd.org (Postfix) with ESMTP id 212AB13C4DD for ; Mon, 4 Feb 2008 13:07:34 +0000 (UTC) (envelope-from SRS0=0IHuIv=SZ=vvelox.net=v.velox@yourhostingaccount.com) Received: from mailscan03.yourhostingaccount.com ([10.1.15.3] helo=mailscan03.yourhostingaccount.com) by mailout11.yourhostingaccount.com with esmtp (Exim) id 1JM12p-0001EP-6A for freebsd-questions@freebsd.org; Mon, 04 Feb 2008 08:07:31 -0500 Received: from impout02.yourhostingaccount.com ([10.1.55.2] helo=impout02.yourhostingaccount.com) by mailscan03.yourhostingaccount.com with esmtp (Exim) id 1JM12p-0000ZQ-1D; Mon, 04 Feb 2008 08:07:31 -0500 Received: from authsmtp09.yourhostingaccount.com ([10.1.18.9]) by impout02.yourhostingaccount.com with NO UCE id lR7W1Y0030BkWne0000000; Mon, 04 Feb 2008 08:07:30 -0500 X-EN-OrigOutIP: 10.1.18.9 X-EN-IMPSID: lR7W1Y0030BkWne0000000 Received: from c-98-206-161-17.hsd1.il.comcast.net ([98.206.161.17] helo=vixen42) by authsmtp09.yourhostingaccount.com with esmtpa (Exim) id 1JM12o-0007H2-Gg; Mon, 04 Feb 2008 08:07:30 -0500 Date: Mon, 4 Feb 2008 07:08:24 -0600 From: "Zane C.B." To: Scott Bennett Message-ID: <20080204070824.341a1bae@vixen42> In-Reply-To: <200802041133.m14BXMmW029486@mp.cs.niu.edu> References: <200802041133.m14BXMmW029486@mp.cs.niu.edu> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; i386-portbld-freebsd6.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EN-UserInfo: 0d1ca1697cdb7a831d4877828571b7ab:1570f0de6936c69fef9e164fffc541bc X-EN-AuthUser: vvelox2 Sender: "Zane C.B." X-EN-OrigIP: 98.206.161.17 X-EN-OrigHost: c-98-206-161-17.hsd1.il.comcast.net Cc: freebsd-questions@freebsd.org Subject: Re: unix domain socket security and PID retrieval X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 13:07:34 -0000 On Mon, 4 Feb 2008 05:33:22 -0600 (CST) Scott Bennett wrote: > > On Mon, 4 Feb 2008 04:30:21 -0600 "Zane C.B." > > > >wrote: > >Been starting to look into writing some stuff that uses unix domain > >sockets, but I've been running into the problem of figuring out > >what the calling PID is on the other end. > > > >Any suggestions on where I should begin to look? > > Sure. Take a look at the man pages for fork(2), vfork(2), and > fork(3f). > > > >As it currently stands, I am looking at doing this with perl. > > In that case, take a look at perlfork(1), too. I am a bit lost on what fork has to do with the question. Currently have found there is no method for figuring what PID it is. I've found there is support for figuring out what user it is, according to unix(4), but there appears to way to get to using any of the existing perl modules for unix domain sockets.