From e4adfed804ca6195a109a00e11094d16042292be Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 20 Feb 2017 09:44:34 +0100 Subject: [PATCH] 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. --- dib/dib.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dib/dib.ml b/dib/dib.ml index df83ba1e3..d15cd1991 100644 --- a/dib/dib.ml +++ b/dib/dib.ml @@ -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