summaryrefslogtreecommitdiff
path: root/cross/mips64el-unknown-linux-gnu-glibc/glibc-2.12.2-ignore-origin-of-privileged-program.patch
blob: deee38ed8f55d6b59327b1905d708daa5be065ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/elf/dl-object.c b/elf/dl-object.c
index 22a1635..7674d49 100644
--- a/elf/dl-object.c
+++ b/elf/dl-object.c
@@ -214,6 +214,9 @@ _dl_new_object (char *realname, const char *libname, int type,
     out:
       new->l_origin = origin;
     }
+  else if (INTUSE(__libc_enable_secure) && type == lt_executable)
+    /* The origin of a privileged program cannot be trusted.  */
+    new->l_origin = (char *) -1;
 
   return new;
 }
--