From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7855 invoked by alias); 28 Dec 2014 06:31:06 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34066 Received: (qmail 2217 invoked from network); 28 Dec 2014 06:30:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Kc1larcG c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=d0SIzLVtvOZEpLHfrWEA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141227223029.ZM15959@torch.brasslantern.com> Date: Sat, 27 Dec 2014 22:30:29 -0800 In-reply-to: <20141222203624.GA24855@tarsus.local2> Comments: In reply to Daniel Shahaf "Insecure tempfile creation" (Dec 22, 8:36pm) References: <20141222203624.GA24855@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Insecure tempfile creation MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 22, 8:36pm, Daniel Shahaf wrote: } } Of course, once we decide what to do with edit-command-line, it would be } good to go through all the other instances and fix them too. Question related to this: Is there some reason the following does NOT work? Does zftp fail in the subshell? diff --git a/Functions/Zftp/zffcache b/Functions/Zftp/zffcache index 48afdcb..b609c21 100644 --- a/Functions/Zftp/zffcache +++ b/Functions/Zftp/zffcache @@ -19,8 +19,5 @@ fi if [[ $1 = -d ]]; then unset $fcache_name elif (( ${(P)#fcache_name} == 0 )); then - local tmpf=${TMPPREFIX}zffcache$$ - zftp ls >$tmpf - eval "$fcache_name=(\${(f)\"\$(<\$tmpf)\"})" - rm -f $tmpf + eval "$fcache_name=(\${(f)\"\$(zftp ls)\"})" fi