Bug 1906157
Summary: | after su from root to a normal user mesg is unable to show current status | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Michele Casaburo <mcasabur> | |
Component: | util-linux | Assignee: | Karel Zak <kzak> | |
Status: | CLOSED ERRATA | QA Contact: | Radka Brychtova <rskvaril> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.3 | CC: | alrodrig, jke, kzak, ngalvin, paygupta, veichler, vmishra | |
Target Milestone: | rc | Keywords: | Reopened | |
Target Release: | 8.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | util-linux-2.32.1-28.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2053536 (view as bug list) | Environment: | ||
Last Closed: | 2021-11-09 20:02:21 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2053536 |
Description
Michele Casaburo
2020-12-09 18:59:49 UTC
Sure, this is expected behavior. su(1) changes the user and group ID, but it still uses the original terminal with the original permissions. Since v2.31 su(1) provides a new command-line option --pty to create a pseudo-terminal for the session, but it does not change permissions for the pty device. It seems like a disadvantage that I can fix in the upstream tree. Anyway, won't fix for RHEL8. I have investigated the problem more closely and it seems we can fix it :-) I thought the problem is only the relation between terminal and mesg(1) permissions, but the issue is that the new mesg(1) always tries to open the terminal device. It seems unnecessary. All we need is to call stat(2) in this case. Sorry for the previous CLOSE/UPSTREAM, reopening. Fixed also in the upstream tree by commit https://github.com/karelzak/util-linux/commit/c0246ce059503bbc078122a50d564ca36a66f348 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (util-linux bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4490 Please, see my answer for bug #2053536. |