diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-20 10:57:15 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-20 10:57:15 +0000 |
commit | fcb002ade1337b067718ad926859383ab1603bd9 (patch) | |
tree | 0545a121ce9bbd6949b7545380199bc0e05d8d7e | |
parent | Fix for security bug #112968 (diff) | |
download | gentoo-2-fcb002ade1337b067718ad926859383ab1603bd9.tar.gz gentoo-2-fcb002ade1337b067718ad926859383ab1603bd9.tar.bz2 gentoo-2-fcb002ade1337b067718ad926859383ab1603bd9.zip |
use bash code to auto-export vars
(Portage version: 2.0.53_rc7)
-rw-r--r-- | app-shells/sandboxshell/files/sandboxshell.conf | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app-shells/sandboxshell/files/sandboxshell.conf b/app-shells/sandboxshell/files/sandboxshell.conf index e824bb985956..75df274ca688 100644 --- a/app-shells/sandboxshell/files/sandboxshell.conf +++ b/app-shells/sandboxshell/files/sandboxshell.conf @@ -1,7 +1,7 @@ #!/bin/bash # Written by vapier@gentoo.org # public-domain code ... z0r ... -# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell.conf,v 1.5 2005/11/20 07:54:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-shells/sandboxshell/files/sandboxshell.conf,v 1.6 2005/11/20 10:57:15 vapier Exp $ trap ":" INT QUIT TSTP @@ -31,10 +31,9 @@ if [[ ${PWD:0:${#sbs_pdir}} == "${sbs_pdir}" ]] ; then read env sbs_PREPWD=${PWD} if [[ ${env} == "y" ]] ; then - # First try to source variables and export them ... - eval $(sed -e '/^[[:alnum:]_-]*=/s:^:export :' -e '/^[[:alnum:]_-]* ()/Q' "${sbs_tmpenvfile}") 2>/dev/null - # Then grab everything (including functions) + set -a source "${sbs_tmpenvfile}" 2> /dev/null + set +a export SANDBOX_WRITE=${SANDBOX_WRITE}:${sbs_pdir}${sbs_bdir}:${sbs_pdir}/homedir fi PWD=${sbs_PREPWD} |