Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Sep 2000 00:39:08 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Adrian Filipi-Martin <adrian@ubergeeks.com>
Cc:        Ben Smithurst <ben@FreeBSD.ORG>, Poul-Henning Kamp <phk@critter.freebsd.dk>, Peter Pentchev <roam@orbitel.bg>, Julian Elischer <julian@elischer.org>, Chris Costello <chris@calldei.com>, hackers@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: Fdescfs updates--coming to a devfs near you!
Message-ID:  <Pine.BSF.4.21.0009190028380.16912-100000@besplex.bde.org>
In-Reply-To: <Pine.BSF.4.10.10009171709380.24360-100000@lorax.ubergeeks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009190028380.16912-100000>