diff options
author | maximilian attems <maks@debian.org> | 2008-12-16 15:52:32 +0100 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2008-12-16 15:52:32 +0100 |
commit | 54c28b9c9a7ed7b97db9161cd047735ae160d319 (patch) | |
tree | 8ebe37c2e632fc2c4d12c02f6c1fd383cffb555f /init | |
parent | bda6f1ad11516683dc6cac2bc1196c590bd38806 (diff) | |
download | initramfs-tools-54c28b9c9a7ed7b97db9161cd047735ae160d319.tar.gz initramfs-tools-54c28b9c9a7ed7b97db9161cd047735ae160d319.zip |
init: Don't leak initramfs-tools exported variables.
no need to check if the string of the corresponding variable exists,
just unset all of them, but 2 that we need to pass on for calling init.
Diffstat (limited to 'init')
-rwxr-xr-x | init | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -204,10 +204,23 @@ if [ ! -x "${rootmnt}${init}" ]; then panic "No init found. Try passing init= bootarg." fi -# Confuses /etc/init.d/rc -if [ -n ${debug} ]; then - unset debug -fi +# don't leak too much of env - some init(8) don't clear it +# (keep init, rootmnt) +unset debug +unset MODPROBE_OPTIONS +unset DPKG_ARCH +unset ROOTFLAGS +unset ROOTFSTYPE +unset ROOTDELAY +unset ROOT +unset blacklist +unset break +unset noresume +unset panic +unset quiet +unset readonly +unset resume +unset resume_offset # Chain to real filesystem maybe_break init |