This commit is contained in:
rfm 2024-02-16 14:26:41 +00:00
parent 6052d4e8ae
commit d988153800
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2024-02-16 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSData.m: fix for #361
2024-02-13 Richard Frith-Macdonald <rfm@gnu.org> 2024-02-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFileHandle.m: * Source/GSFileHandle.m:

View file

@ -2011,9 +2011,13 @@ failure:
NSWarnMLog(@"mkstemp (%s) failed - %@", thePath, [NSError _last]); NSWarnMLog(@"mkstemp (%s) failed - %@", thePath, [NSError _last]);
goto failure; goto failure;
} }
/* Created writable files are supposed to only have read and/or
* write set (no execute) according to Apple documentation.
* They should honor the setting specified by umask though.
*/
mask = umask(0); mask = umask(0);
umask(mask); umask(mask);
fchmod(desc, 0644 & ~mask); fchmod(desc, 0666 & ~mask);
if ((theFile = fdopen(desc, "w")) == 0) if ((theFile = fdopen(desc, "w")) == 0)
{ {
close(desc); close(desc);