3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/glibc
Maximilian Bosch 748faeb623
glibc: don't hide symbol __nss_files_fopen
I realized that `libredirect` doesn't wrap `__nss_files_fopen` anymore
which subsequently broke the `checkPhase` of `pkgs.openssh`[1] which was
implemented in 85c63a515d.

The reason for that is what `libc_hidden_{def,proto}` are used for, to
quote `libc-symbols.h`[2]:

    The following macros are used for PLT bypassing within libc.so
    (and if needed other libraries similarly).

This basically means that these symbols are altered in a way so that
they cannot be wrapped by `libredirect` even though it re-defines
`__nss_files_fopen` while being loaded at first with `LD_PRELOAD`.

The problem was caused by a change in 2.34[3] where the `files`-module
for NSS isn't loaded from `libnss_files.so.2` anymore, but the relevant
symbols are directly obtained from `libc.so.6` since a lot of glibc's
APIs were merged into `libc.so.6` before.

As this would effectively break `libredirect` whenever it tries to wrap
C APIs that interact with NSS (e.g. to use `getpwnam(3)`), I decided to
undo this change for `__nss_files_fopen`.

[1] https://hydra.nixos.org/build/160688523
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=include/libc-symbols.h;h=d41ecf4384d07f9108698dba1d4e9e6a7a9b975f;hb=ae37d06c7d127817ba43850f0f898b793d42aea7
[3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=f9c8b11ed7726b858cd7b7cea0d3d7c5233d78cf;hp=6212bb67f4695962748a5981e1b9fea105af74f6
2022-02-27 10:26:53 +01:00
..
0001-Revert-Remove-all-usage-of-BASH-or-BASH-in-installed.patch glibc: revert /bin/bash usage 2022-02-27 10:25:35 +01:00
2.34-master.patch.gz
allow-kernel-2.6.32.patch
common.nix glibc: don't hide symbol __nss_files_fopen 2022-02-27 10:26:53 +01:00
darwin-cross-build.patch
default.nix glibc: also create backwards-compat symlinks for libdl and libutil 2022-02-27 10:25:34 +01:00
dont-use-system-ld-so-cache.patch
dont-use-system-ld-so-preload.patch
fix-rpc-types-musl-conflicts.patch
fix-x64-abi.patch
fix_path_attribute_in_getconf.patch
info.nix
locales-builder.sh
locales.nix
mtrace.nix
multi.nix
nix-locale-archive.patch
nix-nss-open-files.patch
rpcgen-path.patch