]> git.wh0rd.org - patches.git/blob - ldso-safe-runpath.patch
initial import
[patches.git] / ldso-safe-runpath.patch
1 Index: dl-elf.c
2 ===================================================================
3 --- dl-elf.c (revision 10603)
4 +++ dl-elf.c (working copy)
5 @@ -174,6 +174,9 @@
6 _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
7 _dl_strcat(mylibname, "/");
8 _dl_strcat(mylibname, name);
9 +#ifdef __LDSO_SAFE_RUNPATHS__
10 + if (*mylibname == '/')
11 +#endif
12 if ((tpnt = _dl_load_elf_shared_library(secure, rpnt, mylibname)) != NULL)
13 return tpnt;
14 path_n = path+1;