Really wierd 'more' interaction with 'newrole' and stderr...

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Fri May 26 17:43:41 UTC 2006


On Fri, 26 May 2006 13:27:56 EDT, Stephen Smalley said:

> Hmm...they used to be O_RDWR, but Steve Grubb submitted a patch that
> changed them a while back as part of a general cleanup of newrole.  If
> programs expect stdout and stderr to be rw, then I suppose newrole needs
> to open them that way, although it does seem odd to read from your error
> stream.

It can't read from stdin, because that might be in use:

grep foo bar* | more

And most shells open stderr as R/W, so reading from that works.

One can certainly argue that stderr *should* be write-only, and programs
using stderr for reading should probably be fixed to open /dev/tty and use
that instead.  But not knowing whether it's just this one odd program,
or lots of them, I can't really say.

I suppose Fedora could just do the equivalent change in /bin/bash and see
how many bug reports come in. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 226 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-selinux-list/attachments/20060526/5cc5f0ce/attachment.sig>


More information about the fedora-selinux-list mailing list