~psusi/ubuntu/utopic/udisks2/fix-standby

« back to all changes in this revision

Viewing changes to debian/patches/unsupported_acls.patch

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2012-11-23 07:31:03 UTC
  • Revision ID: package-import@ubuntu.com-20121123073103-wi1b5eodw8v36bae
Tags: 2.0.0-3
Add unsupported_acls.patch: Some file systems, such as ext2/ext3 that were
created a few years ago, do not support ACLs. As long as we do not have
/media on a tmpfs, ignore failures to set the ACL on /media/<user> and
fall back to chowning the directory to the target user. (LP: #1048059)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Some file systems, such as ext2/ext3 that were created a few years ago, do not support ACLs. As long as we do not have /media on a tmpfs, ignore failures to set the ACL on /media/<user> and fall back to chowning the directory to the target user.
 
2
Bug-Ubuntu: https://launchpad.net/bugs/1048059
 
3
 
 
4
Index: udisks2/src/udiskslinuxfilesystem.c
 
5
===================================================================
 
6
--- udisks2.orig/src/udiskslinuxfilesystem.c    2012-11-23 07:10:50.492659403 +0100
 
7
+++ udisks2/src/udiskslinuxfilesystem.c 2012-11-23 07:11:45.068662045 +0100
 
8
@@ -801,12 +801,10 @@
 
9
       acl_calc_mask (&acl) == -1 ||
 
10
       acl_set_file (path, ACL_TYPE_ACCESS, acl) == -1)
 
11
     {
 
12
-      g_set_error (error,
 
13
-                   G_IO_ERROR,
 
14
-                   g_io_error_from_errno (errno),
 
15
+      udisks_warning(
 
16
                    "Adding read ACL for uid %d to `%s' failed: %m",
 
17
                    (gint) uid, path);
 
18
-      goto out;
 
19
+      chown(path, uid, -1);
 
20
     }
 
21
 
 
22
   ret = TRUE;