From owner-cvs-all Mon Nov 27 22:17: 2 2000 Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 3F3E337B681; Mon, 27 Nov 2000 22:16:58 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eAS6Gvo28484; Mon, 27 Nov 2000 22:16:57 -0800 (PST) Date: Mon, 27 Nov 2000 22:16:57 -0800 From: Alfred Perlstein To: Warner Losh Cc: Robert Watson , Peter Wemm , "Brian F. Feldman" , obrien@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/inetd builtins.c Message-ID: <20001127221656.Z8051@fw.wintelcom.net> References: <200011280529.WAA07456@harmony.village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200011280529.WAA07456@harmony.village.org>; from imp@village.org on Mon, Nov 27, 2000 at 10:29:00PM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Warner Losh [001127 21:29] wrote: > In message Robert Watson writes: > : Presumably the only really correct solution here is to: > : > : 1) Set effective process rights to that of the user in question using > : setusercontext() > : 2) Open the file using open() > : 3) fstat() the file to determine that it is regular and sane > : 4) Proceed with operations > > I'm not sure I understand the need for #3. If the effective process > rights are what you want, then the kernel will enforce protections at > #2. What's is regular and sane? Remeber you're still a system deamon, even if running as a user, being extra cautious never hurt anyone... ...except Linux. :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message