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 c...@case.edu http://tiswww.cwru.edu/~chet/