mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user