From 200accac63deae99eb9656b26363c85648bd6748 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sat, 27 Dec 2014 23:59:29 -0800 Subject: 34067: safe tempfile creation, part 1 --- Functions/Zftp/zftype | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Functions/Zftp/zftype') diff --git a/Functions/Zftp/zftype b/Functions/Zftp/zftype index 0cdf7e2aa..81f95dece 100644 --- a/Functions/Zftp/zftype +++ b/Functions/Zftp/zftype @@ -1,13 +1,11 @@ # function zftype { -local type zftmp=${TMPPREFIX}zftype$$ +local type [[ $curcontext = :zf* ]] || local curcontext=:zftype zfautocheck -d if (( $# == 0 )); then - zftp type >$zftmp - type=$(<$zftmp) - rm -f $zftmp + type=$(zftp type) if [[ $type = I ]]; then print "Current type is image (binary)" return 0 -- cgit 1.4.1