Bug 1015257 - systemd environment is not updated after locale changes
systemd environment is not updated after locale changes
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-03 14:17 EDT by Rui Matos
Modified: 2013-12-03 19:13 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-03 19:13:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
FreeDesktop.org 69821 None None None Never

  None (edit)
Description Rui Matos 2013-10-03 14:17:05 EDT
It seems like selinux allows localectl set-locale to update /etc/locale.conf but doesn't allow systemd to update its own environment at the same time:

Out 03 20:14:47 localhost.localdomain systemd[1]: SELinux policy denies access.
Out 03 20:14:47 localhost.localdomain systemd-localed[1822]: Failed to set locale information: Access denied
Out 03 20:14:47 localhost.localdomain systemd-localed[1822]: Changed locale information.

See https://bugs.freedesktop.org/show_bug.cgi?id=69821 for more context.
Comment 1 Daniel Walsh 2013-10-04 10:46:41 EDT
Do you have avc's when this happened?
Comment 2 Daniel Walsh 2013-10-04 10:52:25 EDT
Ok I see the following avc

type=USER_AVC msg=audit(10/04/2013 10:47:50.362:103733) : pid=1 uid=root auid=unset ses=unset  subj=system_u:system_r:init_t:s0 msg='avc:  denied  { reboot } for auid=unset uid=unset gid=unset scontext=system_u:system_r:systemd_localed_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=system  exe=/usr/lib/systemd/systemd sauid=root hostname=? addr=? terminal=?'

Which generated an allow rule that looks like.

allow systemd_localed_t init_t:system reboot;

SHouldn't systemd be asking for a reload rather then reboot?
Comment 3 Daniel Walsh 2013-10-04 10:55:18 EDT
36920903183484407a13205f003aa02abf69a95b allows the reboot call in git, although i think it would be better to check reload.
Comment 4 Lennart Poettering 2013-10-04 11:08:16 EDT
Oh, this looks like a copy/paste mistake in systemd. Fixed upstream now:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=a316932f5a627c1ef78f568fd5dfa579f12e76b2
Comment 5 Zbigniew Jędrzejewski-Szmek 2013-12-03 19:13:09 EST
This fix was included in F19 and F20 updates a few ago.

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