zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Martijn Dekker <martijn@inlv.org>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] make sure internal temp files are user readable and writeable
Date: Mon, 26 Mar 2018 18:00:44 +0100	[thread overview]
Message-ID: <20180326170044.GA10044@chaz.gmail.com> (raw)
In-Reply-To: <581009fe-372c-641a-cf5f-87e6a2a68dbb@inlv.org>

2018-03-26 18:45:23 +0200, Martijn Dekker:
> Here-documents fail if the umask does not allow user reading.
> 
> $ zsh -c $'umask u-r; cat <<EOF\nEOF'
> zsh:1: can't create temp file for here document: permission denied
[...]
> +    mode_t old_umask = umask(0177);
[...]

Thanks. See also 42446
(https://www.zsh.org/mla/workers/2018/msg00252.html)
with other suggested options.

There I mentioned the potential need to block signals between
the time the umask is changed temporarily and when it's restored
(to avoid traps running with the wrong umask (0177 instead of
the user's requested one)).

-- 
Stephane


  reply	other threads:[~2018-03-26 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 16:45 Martijn Dekker
2018-03-26 17:00 ` Stephane Chazelas [this message]
2018-03-26 17:37   ` Martijn Dekker
2018-03-26 20:32     ` Martijn Dekker
2018-03-27  8:34       ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180326170044.GA10044@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=martijn@inlv.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).