Bug 2227097

Summary: wall(1) fails when trying to use seat0
Product: Red Hat Enterprise Linux 8 Reporter: nomad
Component: util-linuxAssignee: Karel Zak <kzak>
Status: MODIFIED --- QA Contact: Radka Brychtova <rskvaril>
Severity: medium Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, fsumsal, jwboyer, rskvaril
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: util-linux-2.32.1-43.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description nomad 2023-07-27 20:27:28 UTC
Description of problem:
The Network UPS Tool (NUT) wants to notify users when something critical happens. It uses wall for local users but fails when one of them is on 'seat0' since there is no /dev/seat0.

Version-Release number of selected component (if applicable):
util-linux-2.32.1-42.el8.x86_64


How reproducible:
100%

Steps to Reproduce:
1. login to graphical console so loginctl says you are on seat0
2. echo "test" | wall
3. view error

Actual results:
 ; loginctl
SESSION  UID USER SEAT  TTY 
      2 1001 lvd  seat0 tty2

1 sessions listed.
 ; echo test | wall
wall: /dev/seat0: No such file or directory


Expected results:
"test" appears on all local terminals including xterms

Additional info:

Comment 1 Karel Zak 2023-08-10 09:50:14 UTC
Fixed (wall(1)) in the upstream tree by commit 7d3713a6d541be0bac0bb78cc8fea1620583fd08.

write(1) seems OK, it works on demand for the specified user and it prints an error when not able to get usable tty.