From owner-freebsd-hackers Mon Sep 18 6:39:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D8A6337B423; Mon, 18 Sep 2000 06:39:30 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id AAA21762; Tue, 19 Sep 2000 00:39:11 +1100 Date: Tue, 19 Sep 2000 00:39:08 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Adrian Filipi-Martin Cc: Ben Smithurst , Poul-Henning Kamp , Peter Pentchev , Julian Elischer , Chris Costello , hackers@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: Fdescfs updates--coming to a devfs near you! In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 17 Sep 2000, Adrian Filipi-Martin wrote: > I recently ran into revelant problem with /dev/stdout, while > working on some software under linux that expected /dev/stdout as an > argument instead of using stdout. > > Using the device file breaks, if the process is suid to a non-root > user. This is because it cannot open /dev/stdout, which is owned by your > UID and not the EUID of the process to which the device was passed. My > solution was to add the "-" hack and use the existing open descriptor. Um, open on fdesc devices doesn't check either uid. It just checks the access mode. Perhaps the software expected /dev/stdout to for read-write like a tty would be. Then opening /dev/stdout would fail for normal shell output redirection which only opens for writing. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message