diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-01-13 02:08:37 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-01-13 02:08:37 +0000 |
commit | 3e539cb47e9fabfdda295926b4270b0f3cc7fa65 (patch) | |
tree | 12514bb60d33e94928e47d00f758d43debd7aa02 /elf/dl-load.c | |
parent | 1b85ed0ce299a8044e8417ca82e85cf6267d520a (diff) | |
download | glibc-3e539cb47e9fabfdda295926b4270b0f3cc7fa65.tar.gz |
* elf/dl-load.c (_dl_map_object_from_fd): We don't have to allow
callers from libc anymore.
* elf/dl-open.c (dl_open_worker): Pass __RTLD_AUDIT flag from caller
to _dl_map_object_deps.
* elf/dl-load.c (_dl_map_object_from_fd): Don't change memory
protections when loading auditing modules.
* dlfcn/dlopen.c (dlopen_doit): Catch invalid mode arguments and fail.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 363f77bcdf..f74f98f91e 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1359,14 +1359,14 @@ cannot allocate TLS data structures for initial thread"); protection of the variable which contains the flags used in the mprotect calls. */ #ifdef HAVE_Z_RELRO - if (mode & __RTLD_DLOPEN) + if ((mode & (__RTLD_DLOPEN | __RTLD_AUDIT)) == __RTLD_DLOPEN) { uintptr_t p = ((uintptr_t) &__stack_prot) & ~(GLRO(dl_pagesize) - 1); size_t s = (uintptr_t) &__stack_prot - p + sizeof (int); __mprotect ((void *) p, s, PROT_READ|PROT_WRITE); if (__builtin_expect (__check_caller (RETURN_ADDRESS (0), - allow_ldso|allow_libc) == 0, + allow_ldso) == 0, 0)) __stack_prot |= PROT_EXEC; __mprotect ((void *) p, s, PROT_READ); |