1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-05 08:10:15 +02:00

(open_maybe_create): Don't pass 0666 to open; it's not needed and isn't

guaranteed to be portable.
This commit is contained in:
Jim Meyering
1999-04-26 12:47:33 +00:00
parent d0eeabbc32
commit ebb207dc5a
+2 -1
View File
@@ -115,7 +115,8 @@ open_maybe_create (const char *file, int *file_created)
while (1)
{
/* First, see if we can create a new FILE. */
fd = open (file, O_WRONLY | O_CREAT | O_EXCL, 0666);
fd = open (file, O_WRONLY | O_CREAT | O_EXCL,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (fd != -1)
*file_created = 1;