Bug 981491

Summary: localectl fails to apply VC keymap after selecting it (SELinux-related)
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-12 08:11:44 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:

Description Adam Williamson 2013-07-04 23:41:15 UTC
When trying to use 'localectl set-keymap' with SELinux in Enforcing mode, I get errors in journalctl output, and the change does not take effect.

Jul 04 16:35:30 adam.localdomain polkitd[657]: Registered Authentication Agent for unix-process:29771:1379682 (system bus name :1.206 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8)
Jul 04 16:35:30 adam.localdomain systemd-localed[28481]: Changed virtual console keymap to 'fr'
Jul 04 16:35:30 adam.localdomain systemd-localed[28481]: Failed to issue method call: Access denied
Jul 04 16:35:30 adam.localdomain systemd-localed[28481]: Failed to request keymap reload: Input/output error
Jul 04 16:35:30 adam.localdomain polkitd[657]: Unregistered Authentication Agent for unix-process:29771:1379682 (system bus name :1.206, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus)

If I do 'setenforce Permissive', the VC change takes effect immediately. No AVC appears to be logged in either case, though.

Comment 1 Adam Williamson 2013-07-04 23:44:10 UTC
Note that I can call 'loadkeys fr' or 'loadkeys us' happily as root, with the expected consequences, with SELinux enforcing.

Comment 2 Adam Williamson 2013-07-05 00:09:12 UTC
This affects both F19 and Rawhide, BTW.

Comment 3 Daniel Walsh 2013-07-05 11:43:43 UTC
Can you attempt this after executing

# semodule -DB

And see if this generates avcs.

Comment 4 Daniel Walsh 2013-07-05 11:54:56 UTC
05ee83c01ea9bfce9f9ed4e67e24fa7959eb8360 fixes this in git.  At least what I saw.

Comment 5 Adam Williamson 2013-07-12 15:31:47 UTC
Yup, indeed it seems to work in today's Rawhide. Thanks!