Line
Link Here
|
0 |
-- glibc/elf/rtld.c |
0 |
++ glibc/elf/rtld.c |
Lines 2641-2646
process_envvars (enum mode *modep)
Link Here
|
2641 |
GLRO(dl_debug_mask) = 0; |
2641 |
GLRO(dl_debug_mask) = 0; |
2642 |
} |
2642 |
} |
2643 |
|
2643 |
|
|
|
2644 |
if (__builtin_expect(GLRO(dl_lazy), 1)) { |
2645 |
/* disable lazy bindings for SUID binaries. |
2646 |
* All this funky code is so people can disable this behavior for |
2647 |
* certain [broken] binaries (like Xorg). Once Xorg gets fixed, |
2648 |
* we can reduce all of this to one file (like above with suid-debug). |
2649 |
*/ |
2650 |
#define _SUID_BIND_PATH "/etc/suid-bind-now/" |
2651 |
char _bind_now_check[100] = _SUID_BIND_PATH; |
2652 |
if (rtld_progname) { |
2653 |
size_t proglen = strlen(rtld_progname); |
2654 |
if (proglen + sizeof(_SUID_BIND_PATH) < sizeof(_bind_now_check)) |
2655 |
/* include the null byte in the copy */ |
2656 |
memcpy(_bind_now_check + sizeof(_SUID_BIND_PATH), rtld_progname, proglen+1); |
2657 |
} |
2658 |
if (!rtld_progname || __access(_bind_now_check, F_OK) != 0) |
2659 |
GLRO(dl_lazy) = 0; |
2660 |
} |
2661 |
|
2644 |
if (mode != normal) |
2662 |
if (mode != normal) |
2645 |
_exit (5); |
2663 |
_exit (5); |
2646 |
} |
2664 |
} |