bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is hard-coding the group name, "tty", portable enough for who -a?


From: Piotr Gackiewicz
Subject: Re: is hard-coding the group name, "tty", portable enough for who -a?
Date: Tue, 8 Jul 2008 08:04:08 +0200 (CEST)

On Mon, 7 Jul 2008, James Youngman wrote:

> How about just comparing the GID of the other user's terminal against
> the GID of the terminal whose name would have been printed if we'd run
> "tty"?

Actually, my patch with checking terminals group against "tty" was based on
permissions of "write" and "wall" packaged in fedora 8 (and probably most of
modern linuxes):

-bash-3.2# ls -l /usr/bin/write /usr/bin/wall
-r-xr-sr-x 1 root tty  8308 pa┼║ 10  2007 /usr/bin/wall
-rwxr-sr-x 1 root tty 10056 lip  7 12:13 /usr/bin/write

Another possibility is to set same permissions on "who" as on these tools.

Regards,

-- 
Piotr Gackiewicz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]