Bug 1478492 - SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty1.
Summary: SELinux is preventing loadkeys from 'open' accesses on the chr_file /dev/tty1.
Keywords:
Status: CLOSED DUPLICATE of bug 1574355
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f1a7cd4d9b2a7537426f1edf49b...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-04 16:51 UTC by Joachim Frieben
Modified: 2018-11-12 16:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-22 10:11:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joachim Frieben 2017-08-04 16:51:41 UTC
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.

Do
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.
Do
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:
selinux-policy-3.13.1-265.fc27.noarch

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 08:52:44 UTC
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 10:11:33 UTC

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