freeipa/client
Alexander Bokovoy 38a86e3367 systemd: enforce en_US.UTF-8 locale in systemd units
Python code does detection of the system encoding based on the locale
settings. On RHEL 8.4 development images we somehow get LANG=en_US which
defaults to iso8859-1 _inside_ the systemd-started service, even though
the whole environment defaults to LANG=en_US.UTF-8.

When instrumented with ExecStartPre=/usr/bin/locale, the following
output can be seen:

locale[45481]: LANG=en_US
locale[45481]: LC_CTYPE="en_US"
locale[45481]: LC_NUMERIC="en_US"
locale[45481]: LC_TIME="en_US"
locale[45481]: LC_COLLATE="en_US"
locale[45481]: LC_MONETARY="en_US"
locale[45481]: LC_MESSAGES="en_US"
locale[45481]: LC_PAPER="en_US"
locale[45481]: LC_NAME="en_US"
locale[45481]: LC_ADDRESS="en_US"
locale[45481]: LC_TELEPHONE="en_US"
locale[45481]: LC_MEASUREMENT="en_US"
locale[45481]: LC_IDENTIFICATION="en_US"
locale[45481]: LC_ALL=
ipactl[45483]: Unexpected error
ipactl[45483]: SystemEncodingError: System encoding must be UTF-8, 'iso8859-1' is not supported. Set LC_ALL="C.UTF-8", or LC_ALL="" and LC_CTYPE="C.UTF-8".
systemd[1]: ipa.service: Main process exited, code=exited, status=1/FAILURE

Set the environment to explicit LC_ALL=C.UTF-8 to please the Python
code. FreeIPA server side only cares about actual encoding, not the
language itself. We already use LC_ALL=C.UTF-8 in httpd service snippet.

Fixes: https://pagure.io/freeipa/issue/8617
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Thomas Woerner <twoerner@redhat.com>
2020-12-10 14:38:05 +02:00
..
man ipa-client-install manpage: add ipa.p11-kit to list of files created 2020-11-26 14:12:16 +01:00
share Create IPA ssh client configuration and move ProxyCommand 2020-11-23 09:04:27 +01:00
sysconfig Increase default debug level of certmonger 2019-06-24 10:00:37 +02:00
systemd systemd: enforce en_US.UTF-8 locale in systemd units 2020-12-10 14:38:05 +02:00
certbot-dns-ipa.in dnspython: Add compatibility shim 2020-08-31 09:46:03 +03:00
config.c Fix ressource leak in client/config.c get_config_entry 2018-10-23 16:45:22 +02:00
ipa-certupdate.in Replace PYTHONSHEBANG with valid shebang 2019-06-24 09:35:57 +02:00
ipa-client-automount.in Introduce minimal ipa-client-automount.in and ipactl.in 2019-06-28 10:53:07 +02:00
ipa-client-common.c Split ipa-client/ into ipaclient/ (Python library) and client/ (C, scripts) 2016-01-27 12:09:02 +01:00
ipa-client-common.h ipa-join: switch to jansson for json handling 2020-07-09 14:17:47 +03:00
ipa-client-install.in Replace PYTHONSHEBANG with valid shebang 2019-06-24 09:35:57 +02:00
ipa-client-samba.in ipa-client-samba: a tool to configure Samba domain member on IPA client 2019-06-29 11:00:28 +03:00
ipa-epn.in IPA-EPN: First version. 2020-06-09 08:43:45 +02:00
ipa-getkeytab.c CVE-2020-1722: prevent use of too long passwords 2020-04-14 12:36:01 +03:00
ipa-join.c Easier to use ipa_gethostfqdn() 2020-10-26 17:11:19 +11:00
ipa-rmkeytab.c ipa-rmkeytab, ipa-join: don't fail if init of gettext failed 2016-06-27 12:34:18 +02:00
Makefile.am acme: add certbot dns script 2020-07-10 08:33:22 -04:00
version.m4.in Split ipa-client/ into ipaclient/ (Python library) and client/ (C, scripts) 2016-01-27 12:09:02 +01:00