[gimp] Bug 578630 - File Creation Permission Bug Only for Some File Types: Creating as 644 (rw-r--r--) when
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Bug 578630 - File Creation Permission Bug Only for Some File Types: Creating as 644 (rw-r--r--) when
- Date: Mon, 15 Jun 2009 13:29:57 -0400 (EDT)
commit 6049768abf710fa78f4c87e426ef045d142bdd79
Author: Michael Natterer <mitch gimp org>
Date: Mon Jun 15 19:28:06 2009 +0200
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().
app/widgets/gimpwidgets-utils.c | 2 +-
plug-ins/common/file-gbr.c | 2 +-
plug-ins/common/file-gih.c | 2 +-
plug-ins/common/file-pat.c | 2 +-
plug-ins/common/file-pnm.c | 2 +-
plug-ins/common/file-tiff-save.c | 2 +-
tools/test-clipboard.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index d5491f1..b17fd07 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -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)
{
diff --git a/plug-ins/common/file-gbr.c b/plug-ins/common/file-gbr.c
index c4a8383..7d877cd 100644
--- a/plug-ins/common/file-gbr.c
+++ b/plug-ins/common/file-gbr.c
@@ -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)
{
diff --git a/plug-ins/common/file-gih.c b/plug-ins/common/file-gih.c
index c3617e0..f4116eb 100644
--- a/plug-ins/common/file-gih.c
+++ b/plug-ins/common/file-gih.c
@@ -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)
{
diff --git a/plug-ins/common/file-pat.c b/plug-ins/common/file-pat.c
index 0e1a8f7..a3f9fa3 100644
--- a/plug-ins/common/file-pat.c
+++ b/plug-ins/common/file-pat.c
@@ -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)
{
diff --git a/plug-ins/common/file-pnm.c b/plug-ins/common/file-pnm.c
index 73f1715..64b5aa5 100644
--- a/plug-ins/common/file-pnm.c
+++ b/plug-ins/common/file-pnm.c
@@ -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)
{
diff --git a/plug-ins/common/file-tiff-save.c b/plug-ins/common/file-tiff-save.c
index 85d0293..70d61a9 100644
--- a/plug-ins/common/file-tiff-save.c
+++ b/plug-ins/common/file-tiff-save.c
@@ -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)
{
diff --git a/tools/test-clipboard.c b/tools/test-clipboard.c
index daa2973..b6cefb8 100644
--- a/tools/test-clipboard.c
+++ b/tools/test-clipboard.c
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]