Page MenuHomeFreeBSD

D27953.diff
No OneTemporary

D27953.diff

diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -2982,7 +2982,8 @@
base = obj->relocbase + trunc_page(ph->p_vaddr);
sz = round_page(ph->p_vaddr + ph->p_filesz) -
trunc_page(ph->p_vaddr);
- prot = convert_prot(ph->p_flags) | (before ? PROT_WRITE : 0);
+ prot = before ? (PROT_READ | PROT_WRITE) :
+ convert_prot(ph->p_flags);
if (mprotect(base, sz, prot) == -1) {
_rtld_error("%s: Cannot write-%sable text segment: %s",
obj->path, before ? "en" : "dis",

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 28, 9:23 AM (5 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16266298
Default Alt Text
D27953.diff (567 B)

Event Timeline