From 86bcf135519742ebd9607f6f8208cb7d3319d0ee Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 13 Jan 2015 15:59:00 +0100 Subject: 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 --- src/udiskslinuxfilesystem.c | 6 ++---- 1 file 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; -- cgit v1.2.3