about summary refs log tree commit diff
path: root/elf/dl-tunables.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-tunables.c')
-rw-r--r--elf/dl-tunables.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c
index 03e1a68675..d3ccd2ecd4 100644
--- a/elf/dl-tunables.c
+++ b/elf/dl-tunables.c
@@ -223,6 +223,17 @@ parse_tunables_string (const char *valstring, struct tunable_toset_t *tunables)
 	    {
 	      tunables[ntunables++] =
 		(struct tunable_toset_t) { cur, value, p - value };
+
+	      /* Ignore tunables if enable_secure is set */
+	      if (tunable_is_name ("glibc.rtld.enable_secure", name))
+		{
+                  tunable_num_t val = (tunable_num_t) _dl_strtoul (value, NULL);
+		  if (val == 1)
+		    {
+		      __libc_enable_secure = 1;
+		      return 0;
+		    }
+		}
 	      break;
 	    }
 	}