GNOME Bugzilla – Bug 309604
xfer option to *not* preserve permission
Last modified: 2005-07-08 09:29:37 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?
Created attachment 48726 [details] [review] patch
Looks good to me .. go ahead and commit it.
done.