]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Add comments on how LD_AUDIT and LD_PRELOAD handle __libc_enable_secure
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 6 Nov 2023 20:25:50 +0000 (17:25 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 21 Nov 2023 19:15:42 +0000 (16:15 -0300)
To make explicit why __libc_enable_secure is not checked.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
elf/rtld.c

index 7d4c843e7edac01d9c6d7c2a37ba972463ffbad4..0553c05edb0cf837e8661ddb55c31049d54b4a72 100644 (file)
@@ -2561,6 +2561,10 @@ process_envvars (struct dl_main_state *state)
              process_dl_debug (state, &envline[6]);
              break;
            }
+         /* For __libc_enable_secure mode, audit pathnames containing slashes
+            are ignored.  Also, shared audit objects are only loaded only from
+            the standard search directories and only if they have set-user-ID
+            mode bit enabled.  */
          if (memcmp (envline, "AUDIT", 5) == 0)
            audit_list_add_string (&state->audit_list, &envline[6]);
          break;
@@ -2573,7 +2577,10 @@ process_envvars (struct dl_main_state *state)
              break;
            }
 
-         /* List of objects to be preloaded.  */
+         /* For __libc_enable_secure mode, preload pathnames containing slashes
+            are ignored.  Also, shared objects are only preloaded from the
+            standard search directories and only if they have set-user-ID mode
+            bit enabled.  */
          if (memcmp (envline, "PRELOAD", 7) == 0)
            {
              state->preloadlist = &envline[8];