Skip to content

Commit

Permalink
Merge pull request #40 from cyberark/fix-install-tmpdir
Browse files Browse the repository at this point in the history
Fix temp directory usage for install script
  • Loading branch information
sgnn7 authored Sep 11, 2020
2 parents 0df955f + 32340ae commit c015d9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ if [ "${DISTRO}" != "linux" ] && [ "${DISTRO}" != "darwin" ]; then
error "This installer only supports Linux and OSX"
fi

tmp="/tmp"
if [ ! -z "$TMPDIR" ]; then
tmp="/tmp"
else
tmp=$TMPDIR
fi

# secure-ish temp dir creation without having mktemp available (DDoS-able but not exploitable)
tmp_dir="$tmp/install.sh.$$"
(umask 077 && mkdir $tmp_dir) || exit 1
Expand Down

0 comments on commit c015d9b

Please sign in to comment.