Copy permissions with file on copy (#514084) This is what cp does and
authorAlexander Larsson <alexl@redhat.com>
Thu, 14 Feb 2008 11:00:09 +0000 (11:00 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Thu, 14 Feb 2008 11:00:09 +0000 (11:00 +0000)
2008-02-14  Alexander Larsson  <alexl@redhat.com>

        * glocalfile.c:
Copy permissions with file on copy (#514084)
This is what cp does and makes sure e.g. the
exec permissions are kept.
Its kinda weird in that it keeps the permission bits
the same while the uid and gid are different. However
the new uid is the user so its not a security issue,
and I've heard no complaints about cp on this issue.

svn path=/trunk/; revision=6514

gio/ChangeLog
gio/glocalfile.c

index c792fb0cae927453e9c456de1f137678ded90588..ebb1f880017946c51d248e64fe2d117da7b15127 100644 (file)
@@ -1,3 +1,14 @@
+2008-02-14  Alexander Larsson  <alexl@redhat.com>
+
+        * glocalfile.c:
+       Copy permissions with file on copy (#514084)
+       This is what cp does and makes sure e.g. the
+       exec permissions are kept.
+       Its kinda weird in that it keeps the permission bits
+       the same while the uid and gid are different. However
+       the new uid is the user so its not a security issue,
+       and I've heard no complaints about cp on this issue.
+
 2008-02-13  Ryan Lortie  <desrt@desrt.ca>
 
        * gfileinfo.h: add G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
index b2933637816500e16f0486d88b42f6465ce83063..66535b4e6caabf7f3216d076a2cdfce1c71a511b 100644 (file)
@@ -143,6 +143,7 @@ g_local_file_class_init (GLocalFileClass *klass)
   g_file_attribute_info_list_add (list,
                                  G_FILE_ATTRIBUTE_UNIX_MODE,
                                  G_FILE_ATTRIBUTE_TYPE_UINT32,
+                                 G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE |
                                  G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED);
   
 #ifdef HAVE_CHOWN