Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Insecure tempfile creation
- X-seq: zsh-workers 34066
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Insecure tempfile creation
- Date: Sat, 27 Dec 2014 22:30:29 -0800
- In-reply-to: <20141222203624.GA24855@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20141222203624.GA24855@tarsus.local2>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author