Summary: | systemd environment is not updated after locale changes | ||
---|---|---|---|
Product: | systemd | Reporter: | Rui Tiago Matos <tiagomatos> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | CC: | bugzilla, mike.fabian |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Rui Tiago Matos
2013-09-25 16:06:21 UTC
This should work. What does "systemctl show-environment" print after you change the locale? This is on F20 btw: [root@localhost ~]# systemctl show-environment BOOT_IMAGE=/boot/vmlinuz-3.11.0-3.fc20.x86_64 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin LANG=en_US.UTF-8 [root@localhost ~]# localectl status System Locale: LANG=en_US.UTF-8 VC Keymap: us X11 Layout: us [root@localhost ~]# localectl set-locale LANG=de_DE.utf8 [root@localhost ~]# localectl status System Locale: LANG=de_DE.utf8 VC Keymap: us X11 Layout: us [root@localhost ~]# systemctl show-environment BOOT_IMAGE=/boot/vmlinuz-3.11.0-3.fc20.x86_64 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin LANG=en_US.UTF-8 Seems all fine here: # systemctl restart systemd-udevd # xargs -0 -n1 < /proc/$(pidof systemd-udevd)/environ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin LANG=en_US.UTF-8 LC_TIME=de_DE.UTF-8 LC_PAPER=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 # localectl set-locale LANG=en_US.utf8 # systemctl restart systemd-udevd # xargs -0 -n1 < /proc/$(pidof systemd-udevd)/environ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin LANG=en_US.utf8 NOTIFY_SOCKET=@/org/freedesktop/systemd1/notify LISTEN_PID=2529 LISTEN_FDS=2 > [root@localhost ~]# systemctl show-environment
> BOOT_IMAGE=/boot/vmlinuz-3.11.0-3.fc20.x86_64
Are you sure you have an up-to-date initramfs, there should be no such
variables leaking from the kernel/inird into systemd in F20.
(In reply to comment #4) > > [root@localhost ~]# systemctl show-environment > > BOOT_IMAGE=/boot/vmlinuz-3.11.0-3.fc20.x86_64 > > Are you sure you have an up-to-date initramfs, there should be no such > variables leaking from the kernel/inird into systemd in F20. Ok, I'm testing this on a VM which hadn't been updated in a few days. I updated only the kernel and systemd packages (systemd was at 206-9 and now is 207-4). Rebooted. I'm still seeing this :-( The BOOT_IMAGE variable doesn't show up in systemctl show-environment anymore though. Can you turn on debugging in systemd (kill -56 1) and run localectl again and attach the output? There should be a line like systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Manager.UnsetAndSetEnvironment() on /org/freedesktop/systemd1 Ok, that was a good hint, seems like it's selinux that's denying us: systemd[1]: Setting log level to debug. systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus systemd[1]: Accepted connection on private bus. systemd[1]: Got D-Bus request: org.freedesktop.DBus.Properties.Get() on /org/freedesktop/systemd1 systemd[1]: SELinux access check scon=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcon=system_u:system_r:init_t:s0 tclass=system perm=status path=(null) cmdline=systemctl show-environment: 0 systemd[1]: Got D-Bus request: org.freedesktop.DBus.Local.Disconnected() on /org/freedesktop/DBus/Local systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus polkitd[322]: Registered Authentication Agent for unix-process:1169:19037 (system bus name :1.44 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) systemd[1]: Got D-Bus request: org.freedesktop.systemd1.Manager.UnsetAndSetEnvironment() on /org/freedesktop/systemd1 systemd[1]: SELinux policy denies access. systemd[1]: SELinux access check scon=system_u:system_r:systemd_localed_t:s0 tcon=system_u:system_r:init_t:s0 tclass=system perm=reboot path=(null) cmdline=(null): -13 systemd-localed[942]: Failed to set locale information: Access denied systemd-localed[942]: Changed locale information. systemd[1]: Received SIGCHLD from PID 1170 (pkttyagent). systemd[1]: Got SIGCHLD for process 1170 (pkttyagent) systemd[1]: Child 1170 died (code=killed, status=15/TERM) systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus polkitd[322]: Unregistered Authentication Agent for unix-process:1169:19037 (system bus name :1.44, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8) (disconnected from bus) After a setenforce 0 it works fine. Closing this, thanks for the help. Seems systemd was at least partially to blame as we requested "reboot" permissions from selinux, rather than "reload". Fixed in git now. Also see: https://bugzilla.redhat.com/show_bug.cgi?id=1015257 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.