Bug 454252

Summary: Problem with who,write and tty permissions
Product: [Fedora] Fedora Reporter: Piotr Gackiewicz <gacek>
Component: util-linux-ngAssignee: Karel Zak <kzak>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-10 07:11:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Added check of tty gid against process egid in write none

Description Piotr Gackiewicz 2008-07-07 09:32:33 UTC
Description of problem:
"write", "who" do mistakes when determining users' message status.
These utils only check "group writable" bit on tty, but not "group tty" ownership.

Version-Release number of selected component (if applicable):
util-linux-ng-2.13.1-2.fc8

How reproducible:
Change group on tty and check:
who -wu
write 

This bug does hit when user logs in with gdm (look at the status of /dev/tty7):
root     - tty1         2008-07-07 11:08 00:17        2443
user_a   + tty7         2008-07-07 11:13   .         15676 (:0)
user_a   + pts/0        2008-07-07 11:13   .         15748
user_a   + pts/1        2008-07-07 11:15 00:10       16002
user_a   + pts/2        2008-07-07 11:17 00:11       16132
user_b   + pts/6        2008-07-07 09:32 01:55        8453 (xxx.xxx.x.xx)

then:
$ ls -l /dev/tty7
crw--w---- 1 root root 4, 7 lip  7 08:12 /dev/tty7

$ write user_a
write: user_a is logged in more than once; writing to tty7
write: /dev/tty7: Permission denied

Comment 1 Piotr Gackiewicz 2008-07-07 10:28:20 UTC
Created attachment 311135 [details]
Added check of tty gid against process egid in write

Comment 2 Karel Zak 2008-07-07 20:28:05 UTC
Thanks a lot. The patch (with a minor change) has been committed (
bf09b61a3283ddce337700e791c0c02aa2265aae) to the upstream repository.

I'm going to backport the patch to F8 and F9 ASAP.

Comment 3 Karel Zak 2008-08-12 14:07:38 UTC
The patch applied to F9.

Comment 4 Fedora Update System 2008-08-12 20:08:45 UTC
util-linux-ng-2.13.1-8.3.fc9 has been submitted as an update for Fedora 9

Comment 5 Fedora Update System 2008-09-10 07:11:22 UTC
util-linux-ng-2.13.1-8.3.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.