From owner-freebsd-security@FreeBSD.ORG Tue Feb 5 16:22:26 2008 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E418F16A418 for ; Tue, 5 Feb 2008 16:22:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id B603F13C448 for ; Tue, 5 Feb 2008 16:22:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 73EE647C05; Tue, 5 Feb 2008 11:22:26 -0500 (EST) Date: Tue, 5 Feb 2008 16:22:26 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Zane C.B." In-Reply-To: <20080205083417.3f3a4a3b@vixen42> Message-ID: <20080205162043.U49855@fledge.watson.org> References: <20080205083417.3f3a4a3b@vixen42> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd security Subject: Re: LOCAL_CREDS and unix domain sockets X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Feb 2008 16:22:27 -0000 On Tue, 5 Feb 2008, Zane C.B. wrote: > With unix domain sockets, unix(4), are LOCAL_CREDS actually supported or > not? > > I've been trying to fetch this from within a Perl script using 'my > $local_creds=$some_connection->sockopt(LOCAL_CREDS)', but all I keep getting > is a undefined variable in return, as if fetching it is not supported. It depends on the version of FreeBSD. Using a C language program I can get and set LOCAL_CREDS on FreeBSD 7.0 and it looks implemented in the kernel. There are also some regression tests although I've not run them, but it appears things are together. Are you running an older FreeBSD version and/or have you rebuilt Perl since support for LOCAL_CREDS was added (April 2005)? Robert N M Watson Computer Laboratory University of Cambridge