Hallo Laurent!

>  Forwarded to the uClibc development mailing-list.
>  Mail-Followup-To set.

Thx for forwarding!

>  I think reading /proc/self/fd/1 (we want to test stdout,
> not stdin or stderr) is the right thing to do for the "tty" command,

As far as I know is tty specified to test the stdin so fd 0 is the
right one (fd 2 was a typo of mine, sorry). Currently Busybox and GNU
tty test stdin and glibc does readlink /proc/self/fd/0 (from strace
output).
 
> but I'm fairly sure you will break numerous other applications
> by dropping the read permissions on /dev/pts/.

Currently none! ... and it is a Gentoo based LXDE desktop with
Firefox Browser, Sylpheed Mail Client, AbiWord Text Program, aMule P2P
GUI and some other programs. However you are right, it is not a
standard system. I do neither use default init, init scripts, udev, hal,
dbus, etc. ... but that's fine, it is my system and it does what I
want, and I like to use restrictive permission settings (directories
like sbin and lib not readable by ordinary users, only execute right,
etc.) ... but I know it is a trial and error to find the right
permissions for all programs.

It was just surprising that Busybox tty applet did respond with "not a
tty". So I thought there is a bug in Busybox and I tried to find and
fix that, but tracked it down to libc behaviour and noted the
difference of operation. The strace output gave me a permission denied
on /dev/pts, so after changing that the Busybox tty applet worked
correct.

Consider fixing this as a rare corner case.

--
Harald
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to