diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-11-05 18:48:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-11-05 18:48:32 +0000 |
commit | 5813efff39ce5b98c63c1b7cd8d2d58d99bfa4bd (patch) | |
tree | 2fed17116d1e985fadb93dc0bbe243c0932921ba /libexec | |
parent | 920f06ca736cd9e35026d553ea2b35d97ddd08ac (diff) |
The /var/run/ld.so.hints file is mapped into memory. It is never replaced,
so the mapping can be immutable.
ok kettenis
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/sod.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/sod.c b/libexec/ld.so/sod.c index 6774e9e2340..4987c4fd8fb 100644 --- a/libexec/ld.so/sod.c +++ b/libexec/ld.so/sod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sod.c,v 1.36 2022/01/08 06:49:41 guenther Exp $ */ +/* $OpenBSD: sod.c,v 1.37 2022/11/05 18:48:31 deraadt Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg @@ -186,6 +186,8 @@ _dl_maphints(void) if (hheader->hh_version >= LD_HINTS_VERSION_2) _dl_hint_search_path = _dl_split_path(hstrtab + hheader->hh_dirlist); + _dl_mimmutable(addr, hsize); + /* close the file descriptor, leaving the hints mapped */ _dl_close(hfd); |