ext/gnomevfs/gstgnomevfssink.c: use 0666 mask when creating files so umask gets applied correctly. Fixes #331295.

Original commit message from CVS:
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_open_file):
use 0666 mask when creating files so umask gets applied
correctly. Fixes #331295.
This commit is contained in:
Wim Taymans 2006-02-19 14:32:35 +00:00
parent db7fbeb6bf
commit 5e42c46657
2 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2006-02-19 Wim Taymans <wim@fluendo.com>
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_open_file):
use 0666 mask when creating files so umask gets applied
correctly. Fixes #331295.
2006-02-19 Tim-Philipp Müller <tim at centricular dot net>
* gst/subparse/Makefile.am:

View file

@ -331,11 +331,13 @@ gst_gnome_vfs_sink_open_file (GstGnomeVFSSink * sink)
GnomeVFSResult result;
if (sink->uri) {
/* open the file */
/* open the file, all permissions, umask will apply */
result = gnome_vfs_create_uri (&(sink->handle), sink->uri,
GNOME_VFS_OPEN_WRITE, TRUE,
GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE
| GNOME_VFS_PERM_GROUP_READ);
GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE |
GNOME_VFS_PERM_GROUP_READ | GNOME_VFS_PERM_GROUP_WRITE |
GNOME_VFS_PERM_OTHER_READ | GNOME_VFS_PERM_OTHER_WRITE);
/* if the file existed and the property says to ask, then ask! */
if (result == GNOME_VFS_ERROR_FILE_EXISTS) {
gboolean erase_anyway = FALSE;
@ -346,8 +348,9 @@ gst_gnome_vfs_sink_open_file (GstGnomeVFSSink * sink)
if (erase_anyway) {
result = gnome_vfs_create_uri (&(sink->handle), sink->uri,
GNOME_VFS_OPEN_WRITE, FALSE,
GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE
| GNOME_VFS_PERM_GROUP_READ);
GNOME_VFS_PERM_USER_READ | GNOME_VFS_PERM_USER_WRITE |
GNOME_VFS_PERM_GROUP_READ | GNOME_VFS_PERM_GROUP_WRITE |
GNOME_VFS_PERM_OTHER_READ | GNOME_VFS_PERM_OTHER_WRITE);
}
}