diff options
Diffstat (limited to 'sys-apps/sandbox/files/sandbox-2.0-prefix.patch')
-rw-r--r-- | sys-apps/sandbox/files/sandbox-2.0-prefix.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys-apps/sandbox/files/sandbox-2.0-prefix.patch b/sys-apps/sandbox/files/sandbox-2.0-prefix.patch new file mode 100644 index 0000000..5e32912 --- /dev/null +++ b/sys-apps/sandbox/files/sandbox-2.0-prefix.patch @@ -0,0 +1,37 @@ +* heiko's way of getting this thing going +http://repo.or.cz/w/heikos-i-prolly-break-your-prefix-overlay.git?a=blob;f=sys-apps/sandbox/files/sandbox-2.0-prefix.patch;h=7b4f568679522682ba784853829a0f2b1272b21d;hb=HEAD + +diff --git a/libsbutil/get_sandbox_lib.c b/libsbutil/get_sandbox_lib.c +index b64a5ac..1cf4832 100644 +--- a/libsbutil/get_sandbox_lib.c ++++ b/libsbutil/get_sandbox_lib.c +@@ -22,6 +22,7 @@ + void get_sandbox_lib(char *path) + { + save_errno(); ++#ifndef GENTOO_PREFIX + strcpy(path, LIB_NAME); + if (strncmp("/usr/lib", LIBSANDBOX_PATH, 8)) { + void *hndl = dlopen(path, RTLD_LAZY); +@@ -30,5 +31,10 @@ void get_sandbox_lib(char *path) + else + dlclose(hndl); + } ++#else ++ /* Gentoo Prefix always needs the absolute path due to DT_R*PATH usage ++ * within dlopen(). */ ++ snprintf(path, SB_PATH_MAX, "%s/%s", LIBSANDBOX_PATH, LIB_NAME); ++#endif + restore_errno(); + } +--- a/etc/sandbox.d/00default.orig 2009-06-22 14:10:30.000000000 +0200 ++++ a/etc/sandbox.d/00default 2009-06-22 14:11:41.000000000 +0200 +@@ -14,7 +14,7 @@ + # Finally add current directory if interactive + SANDBOX_WRITE="${SANDBOX_WORKDIR}" + # Needed for configure tests +-SANDBOX_WRITE="/usr/tmp/conftest:/usr/lib/conftest:/usr/lib32/conftest:/usr/lib64/conftest:/usr/tmp/cf:/usr/lib/cf:/usr/lib32/cf:/usr/lib64/cf" ++SANDBOX_WRITE="@GENTOO_PORTAGE_EPREFIX@/usr/tmp/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/lib/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/lib32/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/lib64/conftest:@GENTOO_PORTAGE_EPREFIX@/usr/tmp/cf:@GENTOO_PORTAGE_EPREFIX@/usr/lib/cf:@GENTOO_PORTAGE_EPREFIX@/usr/lib32/cf:@GENTOO_PORTAGE_EPREFIX@/usr/lib64/cf" + + # Usually writes in /home should not cause violations + SANDBOX_PREDICT="${HOME}" |