Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] make sure internal temp files are user readable and writeable



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



Messages sorted by: Reverse Date, Date, Thread, Author