mirror of https://github.com/GNOME/gimp.git
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:
parent
efd6cd9bc3
commit
6049768abf
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue