dib: unset all temporary dirs envvars in fake-sudo

The real sudo does it as well, and leaving them when preserving the
environment (-E) maybe breaks the applications, as e.g. chroot will have
a TMPDIR path pointing outside of it.
This commit is contained in:
Pino Toscano
2017-02-20 09:44:34 +01:00
parent cc0b961b68
commit e4adfed804

View File

@@ -301,6 +301,11 @@ if [ -z \"$preserve_env\" ]; then
esac
done
fi
# TMPDIR needs to be unset, regardless of -E
unset TMPDIR
# ... and do that also to the other \"TMPDIR\"-like variables
unset TMP
unset TMP_DIR
cmd=$1
shift