Bug 454261

Summary: who does not determine user's message status correctly
Product: [Fedora] Fedora Reporter: Piotr Gackiewicz <gacek>
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dkovalsk, kdudka, meyering, ovasik, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-7.6-11.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 553625 (view as bug list) Environment:
Last Closed: 2010-01-26 06:55:12 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 516998, 553625    
Attachments:
Description Flags
Additional check of terminal's group none

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):
coreutils-6.9-17.fc8

[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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
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:

http://article.gmane.org/gmane.comp.gnu.coreutils.bugs/19680
Comment 13 Kamil Dudka 2010-01-25 06:45:22 EST
patch got upstream with some additional improvements:

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=aad0bde0b5aa6ccf2714f43676d4941f820c6283
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.
http://admin.fedoraproject.org/updates/coreutils-7.6-11.fc12
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.
http://admin.fedoraproject.org/updates/coreutils-7.2-8.fc11
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.