Bug 454261 - who does not determine user's message status correctly
who does not determine user's message status correctly
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
Depends On:
Blocks: 516998 553625
  Show dependency treegraph
Reported: 2008-07-07 06:48 EDT by Piotr Gackiewicz
Modified: 2010-05-17 15:07 EDT (History)
5 users (show)

See Also:
Fixed In Version: coreutils-7.6-11.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 553625 (view as bug list)
Last Closed: 2010-01-26 06:55:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Additional check of terminal's group (580 bytes, patch)
2008-07-07 06:53 EDT, Piotr Gackiewicz
no flags Details | Diff

  None (edit)
Description Piotr Gackiewicz 2008-07-07 06:48:43 EDT
Description of problem:
who does not take group owner of tty into account when determining users'
message status

Version-Release number of selected component (if applicable):

[root@fc8d ~]# ls -l /dev/pts*
total 0
crw--w---- 1 root  root 136, 0 Jul  7 12:37 0
crw--w---- 1 user_a tty  136, 1 Jul  7 12:37 1
crw--w---- 1 root  tty  136, 2 Jul  7 12:42 2

[root@fc8d ~]# who -wu
user_a    + pts/0        Jul  7 11:43 00:05       27269 (hostname.domain)
user_a    + pts/1        Jul  7 12:31 00:05       15316 (hostname.domain)
root     + pts/2        Jul  7 12:32   .         15345 (hostname.domain)

Actually, user "user_a" on tty /dev/pts/0 has "mesg n" (because of tty group: root).
Bug does occur when logged through gdm.

"who" should check getgrnam("tty") gr_gid against stat("/dev/...") s_gid or
should be setgid tty and check term gid against getegid().
Comment 1 Piotr Gackiewicz 2008-07-07 06:53:06 EDT
Created attachment 311137 [details]
Additional check of terminal's group
Comment 2 Ondrej Vasik 2008-07-07 07:18:08 EDT
Thanks for report and patch, as the behaviour is still upstream adding upstream
maintainer to cc.
Comment 3 Jim Meyering 2008-07-07 09:56:15 EDT
Thanks.  I've raised a portability-related question on the bug-coreutils mailing
list: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14022
Comment 4 Fedora Update System 2008-08-07 10:09:35 EDT
coreutils-6.9-18.fc8 has been submitted as an update for Fedora 8
Comment 5 Ondrej Vasik 2008-08-07 10:15:39 EDT
Oops, that's by accident, fix is not included in that update as there is still upstream about portability impact.
Comment 6 Bug Zapper 2008-11-26 05:58:24 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 7 Bug Zapper 2009-06-09 05:38:21 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
Comment 12 Kamil Dudka 2010-01-20 10:54:28 EST
Piotr, thanks for the patch!  I've added the configure option requested by upstream.  The updated patch is now pending review at upsatream mailing-list:

Comment 13 Kamil Dudka 2010-01-25 06:45:22 EST
patch got upstream with some additional improvements:

Comment 14 Ondrej Vasik 2010-01-26 06:55:12 EST
Built as coreutils-8.4-2.fc13, closing RAWHIDE.
Comment 15 Fedora Update System 2010-04-28 12:08:03 EDT
coreutils-7.6-11.fc12 has been submitted as an update for Fedora 12.
Comment 16 Fedora Update System 2010-04-28 14:56:44 EDT
coreutils-7.2-8.fc11 has been submitted as an update for Fedora 11.
Comment 17 Fedora Update System 2010-05-17 15:04:26 EDT
coreutils-7.2-8.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2010-05-17 15:07:28 EDT
coreutils-7.6-11.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.