Bug 1478492 - SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty1.
SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty1.
Status: CLOSED DUPLICATE of bug 1574355
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2017-08-04 12:51 EDT by Joachim Frieben
Modified: 2018-05-22 06:11 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-05-22 06:11:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joachim Frieben 2017-08-04 12:51:41 EDT
Description of problem:
SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty1.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow daemons to use tty
Then you must tell SELinux about this by enabling the 'daemons_use_tty' boolean.

setsebool -P daemons_use_tty 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that loadkeys should be allowed open access on the tty1 chr_file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# ausearch -c 'loadkeys' --raw | audit2allow -M my-loadkeys
# semodule -X 300 -i my-loadkeys.pp

Additional Information:
Source Context                system_u:system_r:loadkeys_t:s0
Target Context                unconfined_u:object_r:user_tty_device_t:s0
Target Objects                /dev/tty1 [ chr_file ]
Source                        loadkeys
Source Path                   loadkeys
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-265.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.0-0.rc2.git3.1.fc27.x86_64 #1
                              SMP Fri Jul 28 16:02:24 UTC 2017 x86_64 x86_64
Alert Count                   6
First Seen                    2017-08-04 16:57:12 CEST
Last Seen                     2017-08-04 16:57:19 CEST
Local ID                      686e7800-8b32-4e86-84d7-9ad646b695f0

Raw Audit Messages
type=AVC msg=audit(1501858639.233:275): avc:  denied  { open } for  pid=1844 comm="loadkeys" path="/dev/tty1" dev="devtmpfs" ino=38 scontext=system_u:system_r:loadkeys_t:s0 tcontext=unconfined_u:object_r:user_tty_device_t:s0 tclass=chr_file permissive=0

Hash: loadkeys,loadkeys_t,user_tty_device_t,chr_file,open

Version-Release number of selected component:

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.0-0.rc2.git3.1.fc27.x86_64
type:           libreport
Comment 1 Jan Kurik 2017-08-15 04:52:44 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.
Comment 2 Lukas Vrabec 2018-05-22 06:11:33 EDT

*** This bug has been marked as a duplicate of bug 1574355 ***

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