summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-01-13 15:59:00 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2015-01-13 15:59:00 +0100
commit86bcf135519742ebd9607f6f8208cb7d3319d0ee (patch)
treeaa242126096cb820edb75276a5d3bce5b93e84e8
parentbdec6a14c0d9805f84069c0d989feec2c751ec7c (diff)
Provide fallback for systems without ACL support
Some kernels or file systems (with --enable-fhs-media) don't support ACLs. If setting ACL fails, fall back to chowning the directory to the target user. https://bugs.freedesktop.org/show_bug.cgi?id=61162
-rw-r--r--src/udiskslinuxfilesystem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
index b7d71ae..1b9e0c4 100644
--- a/src/udiskslinuxfilesystem.c
+++ b/src/udiskslinuxfilesystem.c
@@ -823,12 +823,10 @@ add_acl (const gchar *path,
acl_calc_mask (&acl) == -1 ||
acl_set_file (path, ACL_TYPE_ACCESS, acl) == -1)
{
- g_set_error (error,
- G_IO_ERROR,
- g_io_error_from_errno (errno),
+ udisks_warning(
"Adding read ACL for uid %d to `%s' failed: %m",
(gint) uid, path);
- goto out;
+ chown(path, uid, -1);
}
ret = TRUE;