[systemd-devel] [PATCH V2] Do not serialize environment, when switching root

Harald Hoyer harald.hoyer at gmail.com
Mon Apr 8 05:45:47 PDT 2013


Am 08.04.2013 14:42, schrieb Lennart Poettering:
> On Mon, 08.04.13 14:33, harald at redhat.com (harald at redhat.com) wrote:
> 
>> From: Harald Hoyer <harald at redhat.com>
>>
>> When switching root, i.e. LANG can be set to the locale of the initramfs
>> or "C", if it was unset. When systemd deserializes LANG in the real root
>> this would overwrite the setting previously gathered by locale_set().
>>
>> To reproduce, boot with an initramfs without locale.conf or change
>> /etc/locale.conf to a different language than the initramfs and check a
>> daemon started by systemd:
>>
>> $ tr "$\000" '\n' </proc/$(pidof sshd)/environ | grep LANG
>> LANG=C
>>
>> To prevent that, serialization of environment variables is skipped, when
>> serializing for switching root.
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=949525
> 
> Looks good! Please apply!

pushed


More information about the systemd-devel mailing list