(_dl_map_object_from_fd): Add caller check.

This commit is contained in:
Ulrich Drepper 2004-09-20 15:15:23 +00:00
parent 664e7d93f9
commit 703ccc1245
1 changed files with 5 additions and 1 deletions

View File

@ -35,6 +35,7 @@
#include <abi-tag.h>
#include <dl-osinfo.h>
#include <stackinfo.h>
#include <caller.h>
#include <dl-dst.h>
@ -1293,7 +1294,10 @@ cannot allocate TLS data structures for initial thread");
size_t s = (uintptr_t) &__stack_prot - p + sizeof (int);
__mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
__stack_prot |= PROT_EXEC;
if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
allow_ldso|allow_libc) == 0,
0))
__stack_prot |= PROT_EXEC;
__mprotect ((void *) p, s, PROT_READ);
}
else