aboutsum
aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/aux-files/run-in-namespace.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/gnu/packages/aux-files/run-in-namespace.c b/gnu/packages/aux-files/run-in-namespace.c
index 436c0b6286..52a16a5362 100644
--- a/gnu/packages/aux-files/run-in-namespace.c
+++ b/gnu/packages/aux-files/run-in-namespace.c
@@ -405,6 +405,23 @@ relocated_search_path (const char *path[], const char *store)
return new_path;
}
+/* Concatenate PATH1 and PATH2 with a colon in between. The result is
+ potentially malloc'd. */
+static char *
+concat_paths (const char *path1, const char *path2)
+{
+ if (path1[0] == '\0')
+ return (char *) path2;
+ else
+ {
+ char *result = xmalloc (strlen (path1) + strlen (path2) + 2);
+ strcpy (result, path1);
+ strcat (result, ":");
+ strcat (result, path2);
+ return result;
+ }
+}
+
/* Execute the wrapped program by invoking the loader (ld.so) directly,
passing it the audit module and preloading libfakechroot.so. */
static void
@@ -421,9 +438,12 @@ exec_with_loader (const char *store, int argc, char *argv[])
loader_argv[2] = concat (store,
LOADER_AUDIT_MODULE + sizeof original_store);
- /* The audit module depends on libc.so and libgcc_s.so. */
+ /* The audit module depends on libc.so and libgcc_s.so so honor
+ AUDIT_LIBRARY_PATH. Additionally, honor $LD_LIBRARY_PATH if set. */
loader_argv[3] = "--library-path";
- loader_argv[4] = relocated_search_path (audit_library_path, store);
+ loader_argv[4] =
+ concat_paths (getenv ("LD_LIBRARY_PATH") ?: "",
+ relocated_search_path (audit_library_path, store));
loader_argv[5] = "--preload";
loader_argv[6] = concat (store,
te-sh /build-aux/missing /build-aux/test-driver /build-aux/texinfo.tex /config.status /configure /doc/*.1 /doc/.dirstamp /doc/contributing.*.texi /doc/guix*.aux /doc/guix*.cp /doc/guix*.cps /doc/guix*.fn /doc/guix*.fns /doc/guix*.html /doc/guix*.info /doc/guix*.info-[0-9] /doc/guix*.ky /doc/guix*.pg /doc/guix*.toc /doc/guix*.t2p /doc/guix*.tp /doc/guix*.vr /doc/guix*.vrs /doc/guix.*.texi /doc/guix-cookbook.*.texi /doc/guix.aux /doc/guix.cp /doc/guix.cps /doc/guix.fn /doc/guix.fns /doc/guix.html /doc/guix.info /doc/guix.info-[0-9] /doc/guix.ky /doc/guix.pg /doc/guix.toc /doc/guix.t2p /doc/guix.tp /doc/guix.vr /doc/guix.vrs /doc/os-config-bare-bones.texi /doc/os-config-desktop.texi /doc/stamp-vti /doc/version.texi /doc/version-*.texi /etc/committer.scm /etc/gnu-store.mount /etc/guix-daemon.cil /etc/guix-daemon.conf /etc/guix-daemon.service /etc/guix-publish.conf /etc/guix-publish.service /etc/guix-gc.service /etc/init.d/guix-daemon /etc/openrc/guix-daemon /guix-* /guix/config.scm /libformat.a /libstore.a /libutil.a /m4/* /m4/ChangeLog /m4/gettext.m4 /m4/iconv.m4 /m4/lib-ld.m4 /m4/lib-link.m4 /m4/lib-prefix.m4 /m4/nls.m4 /m4/po.m4 /m4/progtest.m4 /nix/config.h /nix/config.h.in /po/doc/*.mo /po/doc/*.pot /po/guix/*.gmo /po/guix/*.insert-header /po/guix/*.mo /po/guix/ChangeLog /po/guix/Makefile.in.in /po/guix/Makevars.template /po/guix/POTFILES /po/guix/Rules-quot /po/guix/boldquot.sed /po/guix/en@boldquot.* /po/guix/en@quot.* /po/guix/guix.pot /po/guix/insert-header.sin /po/guix/quot.sed /po/guix/remove-potcdate.sed /po/guix/remove-potcdate.sin /po/guix/stamp-po /po/packages/*.gmo /po/packages/*.insert-header /po/packages/*.mo /po/packages/ChangeLog /po/packages/Makefile.in.in /po/packages/Makevars.template /po/packages/POTFILES /po/packages/Rules-quot /po/packages/boldquot.sed /po/packages/en@boldquot.* /po/packages/en@quot.* /po/packages/guix-packages.pot /po/packages/insert-header.sin /po/packages/quot.sed /po/packages/remove-potcdate.sed /po/packages/remove-potcdate.sin /po/packages/stamp-po /pre-inst-env /release-* /scripts/guix /test-env /test-tmp /tests/*.trs /tests/services/*.trs GPATH GRTAGS GTAGS Makefile Makefile.in config.cache stamp-h[0-9] .dirstamp .deps tmp /doc/os-config-lightweight-desktop.texi /nix/scripts/download /.tarball-version /.version /doc/stamp-* /gnu/packages/bootstrap /gnu/packages/aux-files/guile-guile-launcher.o /guile