From 5bcc223e95abf7025f131b5aade44eb412ebd214 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 13 Jun 2017 10:51:23 +0200 Subject: [PATCH] zprofile: Use non-random static TMPDIR Closes #1319 --- runcoms/zprofile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runcoms/zprofile b/runcoms/zprofile index 052d5f98..e5efb205 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -65,9 +65,14 @@ fi # # Temporary Files # +# +if [[ -z "$TMPDIR" ]]; then + export TMPDIR="/tmp/zsh-$UID" +fi if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="$(mktemp -d)" + mkdir "$TMPDIR" + chmod 700 "$TMPDIR" fi TMPPREFIX="${TMPDIR%/}/zsh"