Bug 454252 - Problem with who,write and tty permissions
Summary: Problem with who,write and tty permissions
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: 8
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-07-07 09:32 UTC by Piotr Gackiewicz
Modified: 2008-09-10 07:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-09-10 07:11:31 UTC
Type: ---

Attachments (Terms of Use)
Added check of tty gid against process egid in write (561 bytes, patch)
2008-07-07 10:28 UTC, Piotr Gackiewicz
no flags Details | Diff

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):

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

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)

$ 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.

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