Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14740

Re: [minor] umask 400 causes here-{doc,string} failure

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: [minor] umask 400 causes here-{doc,string} failure
Date 2018-10-28 21:30 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.2979.1540776612.1284.bug-bash@gnu.org> (permalink)
References <20180311151742.GB6450@chaz.gmail.com> <d86f6764-bc53-834b-0ce2-ad3155e108a8@iki.fi> <af58fa36-1444-964b-1de7-21b5abf4ffc3@inlv.org>

Show all headers | View raw


On 10/28/18 6:05 PM, Martijn Dekker wrote:

> Unless I'm missing something, there should be no reason for an internal
> temp file to have any permissions other than 0600 (user readable/writable),
> so it seems to me that an fchmod call straight after creating the file and
> before returning the fd is the simplest way of fixing the bug; this makes
> the permissions of internal temp files entirely independent of the umask.

That doesn't work for the same reason as discussed in
http://lists.gnu.org/archive/html/bug-bash/2018-03/msg00074.html.
It's unlikely that someone will set his umask to 400 and expect no ill
effects, but I suppose it's better not to fail in the face of that kind
of behavior.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [minor] umask 400 causes here-{doc,string} failure Chet Ramey <chet.ramey@case.edu> - 2018-10-28 21:30 -0400

csiph-web