]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/dl-tunables.c
rtld: Add glibc.rtld.enable_secure tunable.
[thirdparty/glibc.git] / elf / dl-tunables.c
index 03e1a68675d65224f5334a1e64be0ed0898aa4ca..d3ccd2ecd4e2e1cdc4f6a9ac55637afda97ab97a 100644 (file)
@@ -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;
            }
        }