--- udiskslinuxfilesystem.c.orig 2012-12-05 17:21:57.000000000 +0100 +++ udiskslinuxfilesystem.c 2013-02-20 12:32:54.251828861 +0100 @@ -792,7 +792,12 @@ acl_entry_t entry; acl_permset_t permset; - acl = acl_get_file(path, ACL_TYPE_ACCESS); + acl = acl_get_file (path, ACL_TYPE_ACCESS); + + /* Don't set error if ACLs are not supported */ + if (acl == NULL && errno == ENOTSUP) + return ret; + if (acl == NULL || acl_create_entry (&acl, &entry) == -1 || acl_set_tag_type (entry, ACL_USER) == -1 || @@ -894,13 +899,19 @@ { if (rmdir (mount_dir) != 0) udisks_warning ("Error calling rmdir() on %s: %m", mount_dir); - goto out; + /* Fallback to default way if there was no error, that + * means ACLs are not supported + */ + if (*error != NULL) + goto out; } } } /* otherwise fall back to mounting in /media */ - if (mount_dir == NULL) - mount_dir = g_strdup ("/media"); + if (mount_dir != NULL) + g_free(mount_dir); + + mount_dir = g_strdup ("/media"); /* NOTE: UTF-8 has the nice property that valid UTF-8 strings only contains * the byte 0x2F if it's for the '/' character (U+002F SOLIDUS).