diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-10-01 16:44:18 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-10-02 07:13:21 +0200 |
commit | bd4beaa2ebfbbec0a1263a7091a91e528ce8cf13 (patch) | |
tree | 03c1c4c02fabe2542c576bbf490e4cc7a26b1c35 /src/test/test-nss-hosts.c | |
parent | Merge pull request #34612 from poettering/hwdb-micmutify-subset (diff) | |
download | systemd-bd4beaa2ebfbbec0a1263a7091a91e528ce8cf13.tar.xz systemd-bd4beaa2ebfbbec0a1263a7091a91e528ce8cf13.zip |
tree-wide: always do dlopen() with RTLD_NOW + RTLD_NODELETE
Let's systematically use RTL_NOW|RLTD_NODELETE as flags passed to
dlopen(), across our codebase.
Various distros build with "-z now" anyway, hence it's weird to specify
RTLD_LAZY trying to override that (which it doesn't). Hence, let's
follow suit, and just do what everybody else does.
Also set RTLD_NODELETE, which is apparently what distros will probably
end up implying sooner or later anyway. Given that for pretty much all
our dlopen() calls we never call dlclose() anyway, let's just set this
everywhere too, to make things systematic.
This way, the flags we use by default match what distros such as fedora
do, there are no surprises, and read-only relocations can be a thing.
Fixes: #34537
Diffstat (limited to 'src/test/test-nss-hosts.c')
-rw-r--r-- | src/test/test-nss-hosts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-nss-hosts.c b/src/test/test-nss-hosts.c index 6744d7068a..214fb217c8 100644 --- a/src/test/test-nss-hosts.c +++ b/src/test/test-nss-hosts.c @@ -380,7 +380,7 @@ static int test_one_module(const char *dir, log_info("======== %s ========", module); - _cleanup_(dlclosep) void *handle = nss_open_handle(dir, module, RTLD_LAZY|RTLD_NODELETE); + _cleanup_(dlclosep) void *handle = nss_open_handle(dir, module, RTLD_NOW|RTLD_NODELETE); if (!handle) return -EINVAL; |