After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309604 - xfer option to *not* preserve permission
xfer option to *not* preserve permission
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: File operations
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-06 15:30 UTC by Paolo Borelli
Modified: 2005-07-08 09:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.76 KB, patch)
2005-07-06 15:32 UTC, Paolo Borelli
accepted-commit_now Details | Review

Description Paolo Borelli 2005-07-06 15:30:48 UTC
Various program use vfs_xfer for file saving (save a local copy in /tmp and then
xfer it over), in that case we don't want the target file to have the same perms
of the source file in tmp (usually 600), but instead have the default perms of
the target directory.

The attached simple patch seems to do the trick, but:
 - GNOME_VFS_XFER_TARGET_DEFAULT_PERMS sucks as an option name... I couldn't
come up with anything better
 - the code in question seems a bit fishy in the first place: it looks like
currently xfer always creates the target with perms 0666 and then trys to modify
them at a later stage... wouldn't be more secure if the file was created with
the requested permissions from the beginning?
Comment 1 Paolo Borelli 2005-07-06 15:32:12 UTC
Created attachment 48726 [details] [review]
patch
Comment 2 Christian Kellner 2005-07-08 08:18:51 UTC
Looks good to me .. go ahead and commit it. 
Comment 3 Paolo Borelli 2005-07-08 09:29:37 UTC
done.