bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Chet Ramey
Subject: Re: [minor] umask 400 causes here-{doc,string} failure
Date: Sun, 28 Oct 2018 21:30:00 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]