Bug 578630 - File Creation Permission Bug Only for Some File Types: Creating as 644 (rw-r--r--) when should be 664 (rw-rw-r--)

Use 0666 as permissions instead of 0644 and let the user's umask care
about restricting, so creating a file with open() behaves the same way
as with fopen().
This commit is contained in:
Michael Natterer 2009-06-15 19:28:06 +02:00
parent efd6cd9bc3
commit 6049768abf
7 changed files with 7 additions and 7 deletions

View File

@ -947,7 +947,7 @@ gimp_text_buffer_save (GtkTextBuffer *buffer,
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
fd = g_open (filename, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
fd = g_open (filename, O_WRONLY | O_CREAT | O_APPEND, 0666);
if (fd == -1)
{

View File

@ -626,7 +626,7 @@ save_image (const gchar *filename,
}
}
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0666);
if (fd == -1)
{

View File

@ -1268,7 +1268,7 @@ gih_save_image (const gchar *filename,
imageh = gimp_image_height (image_ID);
gimp_tile_cache_size (gimp_tile_height () * imagew * 4);
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0666);
if (fd == -1)
{

View File

@ -453,7 +453,7 @@ save_image (const gchar *filename,
gint line;
GimpPixelRgn pixel_rgn;
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0666);
if (fd == -1)
{

View File

@ -968,7 +968,7 @@ save_image (const gchar *filename,
}
/* open the file */
fd = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC | _O_BINARY, 0644);
fd = g_open (filename, O_WRONLY | O_CREAT | O_TRUNC | _O_BINARY, 0666);
if (fd == -1)
{

View File

@ -675,7 +675,7 @@ save_image (const gchar *filename,
tile_height = gimp_tile_height ();
rowsperstrip = tile_height;
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0644);
fd = g_open (filename, O_CREAT | O_TRUNC | O_WRONLY | _O_BINARY, 0666);
if (fd == -1)
{

View File

@ -373,7 +373,7 @@ test_clipboard_paste (GtkClipboard *clipboard,
if (! strcmp (filename, "-"))
fd = 1;
else
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd < 0)
{