This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2109691 - systemctl rescue doesn't work from gnome-terminal
Summary: systemctl rescue doesn't work from gnome-terminal
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.6
Hardware: x86_64
OS: Linux
low
high
Target Milestone: rc
: 8.9
Assignee: Zdenek Pytela
QA Contact: Amith
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-21 20:20 UTC by Eric Atwood
Modified: 2023-08-16 17:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 17:43:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-1390 0 None None None 2023-08-16 17:43:23 UTC
Red Hat Issue Tracker RHELPLAN-128671 0 None None None 2022-07-21 20:29:49 UTC

Description Eric Atwood 2022-07-21 20:20:41 UTC
Description of problem:
On a basic 8.6 system, the following command does not work:
# /usr/bin/systemctl rescue

Version-Release number of selected component (if applicable):
systemd-239-58

How reproducible:
Always
Steps to Reproduce:
1. systemctl rescue
2.
3.

Actual results:
sulogin: cannot read /dev/tty1: Bad file descriptor

It then resumes the default target

Expected results:
A prompt for the password to enter rescue mode

Additional info:
If you do setenforce 0 before entering the systemctl command, things work properly

Comment 1 Zdenek Pytela 2022-08-10 11:21:50 UTC
I haven't managed to reproduce this issue. Is there any special setup needed?
Can you collect AVC denials?

  # ausearch -i -m avc,user_avc,selinux_err,user_selinux_err

Comment 2 Eric Atwood 2022-08-11 15:44:37 UTC
It was done as a straight 8.6 (minimal install), with no special setup required. It was installed into a VMware VM.
AVC collected after systemctl rescue (enforcing = 0)
----
type=USER_AVC msg=audit(07/12/2022 10:28:03.338:97) : pid=1074 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  received policyload notice (seqno=2)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(08/11/2022 09:24:56.083:95) : pid=1076 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 

AVC collected after reboot, systemctl rescue (enforcing=1)
----
type=USER_AVC msg=audit(07/12/2022 10:28:03.338:97) : pid=1074 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  received policyload notice (seqno=2)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=USER_AVC msg=audit(08/11/2022 09:24:56.083:95) : pid=1076 uid=dbus auid=unset ses=unset subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  received setenforce notice (enforcing=0)  exe=/usr/bin/dbus-daemon sauid=dbus hostname=? addr=? terminal=?' 
----
type=PROCTITLE msg=audit(08/11/2022 09:29:29.626:157) : proctitle=/usr/bin/loadkeys -q -C /dev/tty1 -u us 
type=SYSCALL msg=audit(08/11/2022 09:29:29.626:157) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=AT_FDCWD a1=0x7ffe9e4c0f48 a2=O_RDWR a3=0x0 items=0 ppid=1598 pid=1620 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=loadkeys exe=/usr/bin/loadkeys subj=system_u:system_r:loadkeys_t:s0 key=(null) 
type=AVC msg=audit(08/11/2022 09:29:29.626:157) : avc:  denied  { dac_override } for  pid=1620 comm=loadkeys capability=dac_override  scontext=system_u:system_r:loadkeys_t:s0 tcontext=system_u:system_r:loadkeys_t:s0 tclass=capability permissive=0 
----
type=PROCTITLE msg=audit(08/11/2022 09:29:29.626:158) : proctitle=/usr/bin/loadkeys -q -C /dev/tty1 -u us 
type=SYSCALL msg=audit(08/11/2022 09:29:29.626:158) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=AT_FDCWD a1=0x7ffe9e4c0f48 a2=O_WRONLY a3=0x0 items=0 ppid=1598 pid=1620 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=loadkeys exe=/usr/bin/loadkeys subj=system_u:system_r:loadkeys_t:s0 key=(null) 
type=AVC msg=audit(08/11/2022 09:29:29.626:158) : avc:  denied  { dac_override } for  pid=1620 comm=loadkeys capability=dac_override  scontext=system_u:system_r:loadkeys_t:s0 tcontext=system_u:system_r:loadkeys_t:s0 tclass=capability permissive=0

Comment 3 Zdenek Pytela 2022-12-09 15:52:02 UTC
I am sorry, still no luck with reproducing, deferring to 8.9.


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