]> sourceware.org Git - glibc.git/commit - elf/ldconfig.c
ldconfig: set LC_COLLATE to C [BZ #22505]
authorAurelien Jarno <aurelien@aurel32.net>
Sat, 16 Dec 2017 11:25:41 +0000 (12:25 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 16 Dec 2017 11:25:41 +0000 (12:25 +0100)
commit7d38eb38977980efe703eac93645b1af5a5f8a0c
treea3d28d675b75f4f6c2e8bb18e382f6e1bb46c47a
parent2e77deef676677a7bed97d87d2519679654a2772
ldconfig: set LC_COLLATE to C [BZ #22505]

ldconfig supports `include' directives and use the glob function to
process them. The glob function sort entries according to the LC_COLLATE
category. When using a standard "include /etc/ld.so.conf.d/*.conf" entry
in /etc/ld.so.conf, the order therefore depends on the locale used to
run ldconfig. A few examples of locale specific order that might be
disturbing in that context compared to the C locale:
- The cs_CZ and sk_SK locales sort the digits after the letters.
- The et_EE locale sorts the 'z' between 's' and 't'.

This patch fixes that by setting LC_COLLATE to C in order to process
files in deterministic order, independently of the locale used to launch
ldconfig.

NOTE: This should NOT be backported to older release branches.

Changelog:
[BZ #22505]
* elf/ldconfig.c (main): Call setlocale to force LC_COLLATE to C.
ChangeLog
NEWS
elf/ldconfig.c
This page took 0.043488 seconds and 5 git commands to generate.