diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a0a0d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gvfs-1.36.2.tar.xz diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/admin-Add-query_info_on_read-write-functionality.patch b/admin-Add-query_info_on_read-write-functionality.patch new file mode 100644 index 0000000..b0a27e7 --- /dev/null +++ b/admin-Add-query_info_on_read-write-functionality.patch @@ -0,0 +1,127 @@ +From 5cd76d627f4d1982b6e77a0e271ef9301732d09e Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Thu, 23 May 2019 10:24:36 +0200 +Subject: [PATCH] admin: Add query_info_on_read/write functionality + +Admin backend doesn't implement query_info_on_read/write which might +potentially lead to some race conditions which aren't really wanted +especially in case of admin backend. Let's add this missing functionality. +--- + daemon/gvfsbackendadmin.c | 79 +++++++++++++++++++++++++++++++++------ + 1 file changed, 67 insertions(+), 12 deletions(-) + +diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c +index 65a979e7..23d16f16 100644 +--- a/daemon/gvfsbackendadmin.c ++++ b/daemon/gvfsbackendadmin.c +@@ -42,6 +42,8 @@ + #include "gvfsjobopenforwrite.h" + #include "gvfsjobqueryattributes.h" + #include "gvfsjobqueryinfo.h" ++#include "gvfsjobqueryinforead.h" ++#include "gvfsjobqueryinfowrite.h" + #include "gvfsjobread.h" + #include "gvfsjobseekread.h" + #include "gvfsjobseekwrite.h" +@@ -155,6 +157,19 @@ complete_job (GVfsJob *job, + g_vfs_job_succeeded (job); + } + ++static void ++fix_file_info (GFileInfo *info) ++{ ++ /* Override read/write flags, since the above call will use access() ++ * to determine permissions, which does not honor our privileged ++ * capabilities. ++ */ ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE); ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, TRUE); ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, TRUE); ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, TRUE); ++} ++ + static void + do_query_info (GVfsBackend *backend, + GVfsJobQueryInfo *query_info_job, +@@ -180,19 +195,57 @@ do_query_info (GVfsBackend *backend, + if (error != NULL) + goto out; + +- /* Override read/write flags, since the above call will use access() +- * to determine permissions, which does not honor our privileged +- * capabilities. +- */ +- g_file_info_set_attribute_boolean (real_info, +- G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE); +- g_file_info_set_attribute_boolean (real_info, +- G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, TRUE); +- g_file_info_set_attribute_boolean (real_info, +- G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, TRUE); +- g_file_info_set_attribute_boolean (real_info, +- G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, TRUE); ++ fix_file_info (real_info); ++ g_file_info_copy_into (real_info, info); ++ g_object_unref (real_info); ++ ++ out: ++ complete_job (job, error); ++} ++ ++static void ++do_query_info_on_read (GVfsBackend *backend, ++ GVfsJobQueryInfoRead *query_info_job, ++ GVfsBackendHandle handle, ++ GFileInfo *info, ++ GFileAttributeMatcher *matcher) ++{ ++ GVfsJob *job = G_VFS_JOB (query_info_job); ++ GFileInputStream *stream = handle; ++ GError *error = NULL; ++ GFileInfo *real_info; ++ ++ real_info = g_file_input_stream_query_info (stream, query_info_job->attributes, ++ job->cancellable, &error); ++ if (error != NULL) ++ goto out; ++ ++ fix_file_info (real_info); ++ g_file_info_copy_into (real_info, info); ++ g_object_unref (real_info); ++ ++ out: ++ complete_job (job, error); ++} ++ ++static void ++do_query_info_on_write (GVfsBackend *backend, ++ GVfsJobQueryInfoWrite *query_info_job, ++ GVfsBackendHandle handle, ++ GFileInfo *info, ++ GFileAttributeMatcher *matcher) ++{ ++ GVfsJob *job = G_VFS_JOB (query_info_job); ++ GFileOutputStream *stream = handle; ++ GError *error = NULL; ++ GFileInfo *real_info; ++ ++ real_info = g_file_output_stream_query_info (stream, query_info_job->attributes, ++ job->cancellable, &error); ++ if (error != NULL) ++ goto out; + ++ fix_file_info (real_info); + g_file_info_copy_into (real_info, info); + g_object_unref (real_info); + +@@ -868,6 +921,8 @@ g_vfs_backend_admin_class_init (GVfsBackendAdminClass * klass) + backend_class->mount = do_mount; + backend_class->open_for_read = do_open_for_read; + backend_class->query_info = do_query_info; ++ backend_class->query_info_on_read = do_query_info_on_read; ++ backend_class->query_info_on_write = do_query_info_on_write; + backend_class->read = do_read; + backend_class->create = do_create; + backend_class->append_to = do_append_to; +-- +2.23.0 + diff --git a/admin-Ensure-correct-ownership-when-moving-to-file-u.patch b/admin-Ensure-correct-ownership-when-moving-to-file-u.patch new file mode 100644 index 0000000..f5e483a --- /dev/null +++ b/admin-Ensure-correct-ownership-when-moving-to-file-u.patch @@ -0,0 +1,80 @@ +From d5dfd823c94045488aef8727c553f1e0f7666b90 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Fri, 24 May 2019 09:43:43 +0200 +Subject: [PATCH] admin: Ensure correct ownership when moving to file:// uri + +User and group is not restored properly when moving (or copying with +G_FILE_COPY_ALL_METADATA) from admin:// to file://, because it is handled +by GIO fallback code, which doesn't run with root permissions. Let's +handle this case with pull method to ensure correct ownership. +--- + daemon/gvfsbackendadmin.c | 46 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 46 insertions(+) + +diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c +index 32b51b1a..9a7e8295 100644 +--- a/daemon/gvfsbackendadmin.c ++++ b/daemon/gvfsbackendadmin.c +@@ -807,6 +807,51 @@ do_move (GVfsBackend *backend, + complete_job (job, error); + } + ++static void ++do_pull (GVfsBackend *backend, ++ GVfsJobPull *pull_job, ++ const char *source, ++ const char *local_path, ++ GFileCopyFlags flags, ++ gboolean remove_source, ++ GFileProgressCallback progress_callback, ++ gpointer progress_callback_data) ++{ ++ GVfsBackendAdmin *self = G_VFS_BACKEND_ADMIN (backend); ++ GVfsJob *job = G_VFS_JOB (pull_job); ++ GError *error = NULL; ++ GFile *src_file, *dst_file; ++ ++ /* Pull method is necessary when user/group needs to be restored, return ++ * G_IO_ERROR_NOT_SUPPORTED in other cases to proceed with the fallback code. ++ */ ++ if (!(flags & G_FILE_COPY_ALL_METADATA)) ++ { ++ g_vfs_job_failed_literal (G_VFS_JOB (job), G_IO_ERROR, ++ G_IO_ERROR_NOT_SUPPORTED, ++ _("Operation not supported")); ++ return; ++ } ++ ++ if (!check_permission (self, job)) ++ return; ++ ++ src_file = g_file_new_for_path (source); ++ dst_file = g_file_new_for_path (local_path); ++ ++ if (remove_source) ++ g_file_move (src_file, dst_file, flags, job->cancellable, ++ progress_callback, progress_callback_data, &error); ++ else ++ g_file_copy (src_file, dst_file, flags, job->cancellable, ++ progress_callback, progress_callback_data, &error); ++ ++ g_object_unref (src_file); ++ g_object_unref (dst_file); ++ ++ complete_job (job, error); ++} ++ + static void + do_query_settable_attributes (GVfsBackend *backend, + GVfsJobQueryAttributes *query_job, +@@ -927,6 +972,7 @@ g_vfs_backend_admin_class_init (GVfsBackendAdminClass * klass) + backend_class->set_attribute = do_set_attribute; + backend_class->delete = do_delete; + backend_class->move = do_move; ++ backend_class->pull = do_pull; + backend_class->query_settable_attributes = do_query_settable_attributes; + backend_class->query_writable_namespaces = do_query_writable_namespaces; + } +-- +2.23.0 + diff --git a/admin-Prevent-access-if-any-authentication-agent-isn.patch b/admin-Prevent-access-if-any-authentication-agent-isn.patch new file mode 100644 index 0000000..63b0c74 --- /dev/null +++ b/admin-Prevent-access-if-any-authentication-agent-isn.patch @@ -0,0 +1,42 @@ +From d8d0c8c40049cfd824b2b90d0cd47914052b9811 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Wed, 2 Jan 2019 17:13:27 +0100 +Subject: [PATCH] admin: Prevent access if any authentication agent isn't + available + +The backend currently allows to access and modify files without prompting +for password if any polkit authentication agent isn't available. This seems +isn't usually problem, because polkit agents are integral parts of +graphical environments / linux distributions. The agents can't be simply +disabled without root permissions and are automatically respawned. However, +this might be a problem in some non-standard cases. + +This affects only users which belong to wheel group (i.e. those who are +already allowed to use sudo). It doesn't allow privilege escalation for +users, who don't belong to that group. + +Let's return permission denied error also when the subject can't be +authorized by any polkit agent to prevent this behavior. + +Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/355 +--- + daemon/gvfsbackendadmin.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c +index ec0f2392..0f849008 100644 +--- a/daemon/gvfsbackendadmin.c ++++ b/daemon/gvfsbackendadmin.c +@@ -130,8 +130,7 @@ check_permission (GVfsBackendAdmin *self, + return FALSE; + } + +- is_authorized = polkit_authorization_result_get_is_authorized (result) || +- polkit_authorization_result_get_is_challenge (result); ++ is_authorized = polkit_authorization_result_get_is_authorized (result); + + g_object_unref (result); + +-- +2.20.1 + diff --git a/admin-Use-fsuid-to-ensure-correct-file-ownership.patch b/admin-Use-fsuid-to-ensure-correct-file-ownership.patch new file mode 100644 index 0000000..a911d1d --- /dev/null +++ b/admin-Use-fsuid-to-ensure-correct-file-ownership.patch @@ -0,0 +1,87 @@ +From d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Thu, 23 May 2019 10:33:30 +0200 +Subject: [PATCH] admin: Use fsuid to ensure correct file ownership + +Files created over admin backend should be owned by root, but they are +owned by the user itself. This is because the daemon drops the uid to +make dbus connection work. Use fsuid and euid to fix this issue. + +Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21 +--- + daemon/gvfsbackendadmin.c | 29 +++++++---------------------- + 1 file changed, 7 insertions(+), 22 deletions(-) + +diff --git a/daemon/gvfsbackendadmin.c b/daemon/gvfsbackendadmin.c +index a74d09cf..32b51b1a 100644 +--- a/daemon/gvfsbackendadmin.c ++++ b/daemon/gvfsbackendadmin.c +@@ -157,19 +157,6 @@ complete_job (GVfsJob *job, + g_vfs_job_succeeded (job); + } + +-static void +-fix_file_info (GFileInfo *info) +-{ +- /* Override read/write flags, since the above call will use access() +- * to determine permissions, which does not honor our privileged +- * capabilities. +- */ +- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE); +- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, TRUE); +- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, TRUE); +- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, TRUE); +-} +- + static void + do_query_info (GVfsBackend *backend, + GVfsJobQueryInfo *query_info_job, +@@ -195,7 +182,6 @@ do_query_info (GVfsBackend *backend, + if (error != NULL) + goto out; + +- fix_file_info (real_info); + g_file_info_copy_into (real_info, info); + g_object_unref (real_info); + +@@ -220,7 +206,6 @@ do_query_info_on_read (GVfsBackend *backend, + if (error != NULL) + goto out; + +- fix_file_info (real_info); + g_file_info_copy_into (real_info, info); + g_object_unref (real_info); + +@@ -245,7 +230,6 @@ do_query_info_on_write (GVfsBackend *backend, + if (error != NULL) + goto out; + +- fix_file_info (real_info); + g_file_info_copy_into (real_info, info); + g_object_unref (real_info); + +@@ -977,14 +961,15 @@ acquire_caps (uid_t uid) + struct __user_cap_header_struct hdr; + struct __user_cap_data_struct data; + +- /* Tell kernel not clear capabilities when dropping root */ +- if (prctl (PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) +- g_error ("prctl(PR_SET_KEEPCAPS) failed"); +- +- /* Drop root uid, but retain the required permitted caps */ +- if (setuid (uid) < 0) ++ /* Set euid to user to make dbus work */ ++ if (seteuid (uid) < 0) + g_error ("unable to drop privs"); + ++ /* Set fsuid to still behave like root when working with files */ ++ setfsuid (0); ++ if (setfsuid (-1) != 0) ++ g_error ("setfsuid failed"); ++ + memset (&hdr, 0, sizeof(hdr)); + hdr.version = _LINUX_CAPABILITY_VERSION; + +-- +2.23.0 + diff --git a/daemon-Handle-lockdown-option-to-disable-writing.patch b/daemon-Handle-lockdown-option-to-disable-writing.patch new file mode 100644 index 0000000..211c3ba --- /dev/null +++ b/daemon-Handle-lockdown-option-to-disable-writing.patch @@ -0,0 +1,385 @@ +From af4d0d88604af7c196e461a743f2d1e81239d76a Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Tue, 14 May 2019 09:31:37 +0200 +Subject: [PATCH 2/3] daemon: Handle lockdown option to disable writing + +Handle the new mount-removable-storage-devices-as-read-only option of +org.gnome.desktop.lockdown schema and present AFC, MTP, GPhoto2 devices +as read-only if enabled. +--- + daemon/gvfsbackend.c | 62 ++++++++++++++++++++++++++++++++-- + daemon/gvfsbackend.h | 6 ++++ + daemon/gvfsbackendafc.c | 2 ++ + daemon/gvfsbackendgphoto2.c | 1 + + daemon/gvfsbackendmtp.c | 1 + + daemon/gvfsjobcopy.c | 7 ++++ + daemon/gvfsjobdelete.c | 7 ++++ + daemon/gvfsjobmakedirectory.c | 7 ++++ + daemon/gvfsjobmakesymlink.c | 7 ++++ + daemon/gvfsjobmove.c | 7 ++++ + daemon/gvfsjobopenforwrite.c | 7 ++++ + daemon/gvfsjobpush.c | 7 ++++ + daemon/gvfsjobqueryfsinfo.c | 11 ++---- + daemon/gvfsjobsetattribute.c | 7 ++++ + daemon/gvfsjobsetdisplayname.c | 7 ++++ + daemon/gvfsjobtrash.c | 7 ++++ + 16 files changed, 143 insertions(+), 10 deletions(-) + +diff --git a/daemon/gvfsbackend.c b/daemon/gvfsbackend.c +index 4fd3455c..599733ef 100644 +--- a/daemon/gvfsbackend.c ++++ b/daemon/gvfsbackend.c +@@ -80,6 +80,9 @@ struct _GVfsBackendPrivate + char *default_location; + GMountSpec *mount_spec; + gboolean block_requests; ++ ++ GSettings *lockdown_settings; ++ gboolean readonly_lockdown; + }; + + +@@ -155,7 +158,9 @@ g_vfs_backend_finalize (GObject *object) + g_free (backend->priv->default_location); + if (backend->priv->mount_spec) + g_mount_spec_unref (backend->priv->mount_spec); +- ++ ++ g_clear_object (&backend->priv->lockdown_settings); ++ + if (G_OBJECT_CLASS (g_vfs_backend_parent_class)->finalize) + (*G_OBJECT_CLASS (g_vfs_backend_parent_class)->finalize) (object); + } +@@ -587,7 +592,29 @@ g_vfs_backend_add_auto_info (GVfsBackend *backend, + g_file_attribute_matcher_matches (matcher, + G_FILE_ATTRIBUTE_THUMBNAILING_FAILED))) + get_thumbnail_attributes (uri, info); +- ++ ++ if (backend->priv->readonly_lockdown) ++ { ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE); ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, FALSE); ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE); ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, FALSE); ++ } ++} ++ ++void ++g_vfs_backend_add_auto_fs_info (GVfsBackend *backend, ++ GFileAttributeMatcher *matcher, ++ GFileInfo *info) ++{ ++ const char *type; ++ ++ type = g_vfs_backend_get_backend_type (backend); ++ if (type) ++ g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_GVFS_BACKEND, type); ++ ++ if (backend->priv->readonly_lockdown) ++ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, TRUE); + } + + void +@@ -1047,3 +1074,34 @@ g_vfs_backend_force_unmount (GVfsBackend *backend) + (GAsyncReadyCallback) forced_unregister_mount_callback, + NULL); + } ++ ++static void ++lockdown_settings_changed (GSettings *settings, ++ gchar *key, ++ gpointer user_data) ++{ ++ GVfsBackend *backend = G_VFS_BACKEND (user_data); ++ ++ backend->priv->readonly_lockdown = g_settings_get_boolean (settings, ++ "mount-removable-storage-devices-as-read-only"); ++} ++ ++ ++void ++g_vfs_backend_handle_readonly_lockdown (GVfsBackend *backend) ++{ ++ backend->priv->lockdown_settings = g_settings_new ("org.gnome.desktop.lockdown"); ++ backend->priv->readonly_lockdown = g_settings_get_boolean (backend->priv->lockdown_settings, ++ "mount-removable-storage-devices-as-read-only"); ++ g_signal_connect_object (backend->priv->lockdown_settings, ++ "changed", ++ G_CALLBACK (lockdown_settings_changed), ++ backend, ++ 0); ++} ++ ++gboolean ++g_vfs_backend_get_readonly_lockdown (GVfsBackend *backend) ++{ ++ return backend->priv->readonly_lockdown; ++} +diff --git a/daemon/gvfsbackend.h b/daemon/gvfsbackend.h +index 9c7476cf..431dd290 100644 +--- a/daemon/gvfsbackend.h ++++ b/daemon/gvfsbackend.h +@@ -516,6 +516,9 @@ void g_vfs_backend_add_auto_info (GVfsBackend + GFileAttributeMatcher *matcher, + GFileInfo *info, + const char *uri); ++void g_vfs_backend_add_auto_fs_info (GVfsBackend *backend, ++ GFileAttributeMatcher *matcher, ++ GFileInfo *info); + + void g_vfs_backend_set_block_requests (GVfsBackend *backend, + gboolean value); +@@ -534,6 +537,9 @@ gboolean g_vfs_backend_invocation_first_handler (GVfsDBusMount *object, + GDBusMethodInvocation *invocation, + GVfsBackend *backend); + ++void g_vfs_backend_handle_readonly_lockdown (GVfsBackend *backend); ++gboolean g_vfs_backend_get_readonly_lockdown (GVfsBackend *backend); ++ + G_END_DECLS + + #endif /* __G_VFS_BACKEND_H__ */ +diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c +index b6e6a106..ce68aa45 100644 +--- a/daemon/gvfsbackendafc.c ++++ b/daemon/gvfsbackendafc.c +@@ -2760,6 +2760,8 @@ g_vfs_backend_afc_init (GVfsBackendAfc *self) + } + + g_mutex_init (&self->apps_lock); ++ ++ g_vfs_backend_handle_readonly_lockdown (G_VFS_BACKEND (self)); + } + + static void +diff --git a/daemon/gvfsbackendgphoto2.c b/daemon/gvfsbackendgphoto2.c +index 51e9a3bd..7e50194a 100644 +--- a/daemon/gvfsbackendgphoto2.c ++++ b/daemon/gvfsbackendgphoto2.c +@@ -614,6 +614,7 @@ g_vfs_backend_gphoto2_init (GVfsBackendGphoto2 *gphoto2_backend) + g_mutex_init (&gphoto2_backend->lock); + + g_vfs_backend_set_display_name (backend, "gphoto2"); ++ g_vfs_backend_handle_readonly_lockdown (G_VFS_BACKEND (backend)); + + mount_spec = g_mount_spec_new ("gphoto2"); + g_vfs_backend_set_mount_spec (backend, mount_spec); +diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c +index e3a25ef2..c4f1e855 100644 +--- a/daemon/gvfsbackendmtp.c ++++ b/daemon/gvfsbackendmtp.c +@@ -379,6 +379,7 @@ g_vfs_backend_mtp_init (GVfsBackendMtp *backend) + g_mutex_init (&backend->mutex); + g_vfs_backend_set_display_name (G_VFS_BACKEND (backend), "mtp"); + g_vfs_backend_set_icon_name (G_VFS_BACKEND (backend), "multimedia-player"); ++ g_vfs_backend_handle_readonly_lockdown (G_VFS_BACKEND (backend)); + + mount_spec = g_mount_spec_new ("mtp"); + g_vfs_backend_set_mount_spec (G_VFS_BACKEND (backend), mount_spec); +diff --git a/daemon/gvfsjobcopy.c b/daemon/gvfsjobcopy.c +index 785d7480..cf33da56 100644 +--- a/daemon/gvfsjobcopy.c ++++ b/daemon/gvfsjobcopy.c +@@ -141,6 +141,13 @@ try (GVfsJob *job) + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + gboolean res; + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_copy == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobdelete.c b/daemon/gvfsjobdelete.c +index 92892f15..8d5e5b8e 100644 +--- a/daemon/gvfsjobdelete.c ++++ b/daemon/gvfsjobdelete.c +@@ -120,6 +120,13 @@ try (GVfsJob *job) + GVfsJobDelete *op_job = G_VFS_JOB_DELETE (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_delete == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobmakedirectory.c b/daemon/gvfsjobmakedirectory.c +index 98bb28d5..56a9c42a 100644 +--- a/daemon/gvfsjobmakedirectory.c ++++ b/daemon/gvfsjobmakedirectory.c +@@ -120,6 +120,13 @@ try (GVfsJob *job) + GVfsJobMakeDirectory *op_job = G_VFS_JOB_MAKE_DIRECTORY (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_make_directory == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobmakesymlink.c b/daemon/gvfsjobmakesymlink.c +index 2c55e26b..2684b6fd 100644 +--- a/daemon/gvfsjobmakesymlink.c ++++ b/daemon/gvfsjobmakesymlink.c +@@ -124,6 +124,13 @@ try (GVfsJob *job) + GVfsJobMakeSymlink *op_job = G_VFS_JOB_MAKE_SYMLINK (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_make_symlink == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobmove.c b/daemon/gvfsjobmove.c +index cc4ad220..5903d17a 100644 +--- a/daemon/gvfsjobmove.c ++++ b/daemon/gvfsjobmove.c +@@ -141,6 +141,13 @@ try (GVfsJob *job) + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + gboolean res; + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_move == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobopenforwrite.c b/daemon/gvfsjobopenforwrite.c +index 68eae532..60ce64f9 100644 +--- a/daemon/gvfsjobopenforwrite.c ++++ b/daemon/gvfsjobopenforwrite.c +@@ -230,6 +230,13 @@ try (GVfsJob *job) + GVfsJobOpenForWrite *op_job = G_VFS_JOB_OPEN_FOR_WRITE (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (op_job->mode == OPEN_FOR_WRITE_CREATE) + { + if (class->try_create == NULL) +diff --git a/daemon/gvfsjobpush.c b/daemon/gvfsjobpush.c +index d7e48d86..a8df73a8 100644 +--- a/daemon/gvfsjobpush.c ++++ b/daemon/gvfsjobpush.c +@@ -146,6 +146,13 @@ try (GVfsJob *job) + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + gboolean res; + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_push == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobqueryfsinfo.c b/daemon/gvfsjobqueryfsinfo.c +index 898052ea..3363311a 100644 +--- a/daemon/gvfsjobqueryfsinfo.c ++++ b/daemon/gvfsjobqueryfsinfo.c +@@ -147,15 +147,10 @@ create_reply (GVfsJob *job, + GDBusMethodInvocation *invocation) + { + GVfsJobQueryFsInfo *op_job = G_VFS_JOB_QUERY_FS_INFO (job); +- const char *type; +- +- type = g_vfs_backend_get_backend_type (op_job->backend); +- +- if (type) +- g_file_info_set_attribute_string (op_job->file_info, +- G_FILE_ATTRIBUTE_GVFS_BACKEND, +- type); + ++ g_vfs_backend_add_auto_fs_info (op_job->backend, ++ op_job->attribute_matcher, ++ op_job->file_info); + g_file_info_set_attribute_mask (op_job->file_info, + op_job->attribute_matcher); + +diff --git a/daemon/gvfsjobsetattribute.c b/daemon/gvfsjobsetattribute.c +index 1efe7c94..ac7618a4 100644 +--- a/daemon/gvfsjobsetattribute.c ++++ b/daemon/gvfsjobsetattribute.c +@@ -146,6 +146,13 @@ try (GVfsJob *job) + GVfsJobSetAttribute *op_job = G_VFS_JOB_SET_ATTRIBUTE (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_set_attribute == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobsetdisplayname.c b/daemon/gvfsjobsetdisplayname.c +index badb10dd..e12ae879 100644 +--- a/daemon/gvfsjobsetdisplayname.c ++++ b/daemon/gvfsjobsetdisplayname.c +@@ -124,6 +124,13 @@ try (GVfsJob *job) + GVfsJobSetDisplayName *op_job = G_VFS_JOB_SET_DISPLAY_NAME (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_set_display_name == NULL) + return FALSE; + +diff --git a/daemon/gvfsjobtrash.c b/daemon/gvfsjobtrash.c +index 1738f8a2..5234ebf8 100644 +--- a/daemon/gvfsjobtrash.c ++++ b/daemon/gvfsjobtrash.c +@@ -119,6 +119,13 @@ try (GVfsJob *job) + GVfsJobTrash *op_job = G_VFS_JOB_TRASH (job); + GVfsBackendClass *class = G_VFS_BACKEND_GET_CLASS (op_job->backend); + ++ if (g_vfs_backend_get_readonly_lockdown (op_job->backend)) ++ { ++ g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, ++ _("Filesystem is read-only")); ++ return TRUE; ++ } ++ + if (class->try_trash == NULL) + return FALSE; + +-- +2.21.0 + diff --git a/daemon-Prevent-spawning-new-daemons-if-outgoing-oper.patch b/daemon-Prevent-spawning-new-daemons-if-outgoing-oper.patch new file mode 100644 index 0000000..305c7e5 --- /dev/null +++ b/daemon-Prevent-spawning-new-daemons-if-outgoing-oper.patch @@ -0,0 +1,99 @@ +From 396216f71abf6907efd1383ca0d1a597918cd83d Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Thu, 11 Oct 2018 17:47:59 +0200 +Subject: [PATCH] daemon: Prevent spawning new daemons if outgoing operation + exists + +A new daemon is always spawned if MountLocation method (or LookupMount for +automounted) is called and the respective mount isn't registered yet. This +is not usually an issue, because the redundant daemons are consequently +terminated. However, this is a problem if mount operations hang for some reason. +This may happen e.g. with trash backend due to stale NFS mounts. Consequently, +new and new daemons are spawned which may lead to system failures due to lack +of system resources. See the following downstream bug report: +https://bugzilla.redhat.com/show_bug.cgi?id=1632960 + +Let's fix that behavior simply by preventing spawning of new daemons if +respective outgoing mount operations exist. + +https://gitlab.gnome.org/GNOME/gvfs/merge_requests/19 +--- + daemon/mount.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/daemon/mount.c b/daemon/mount.c +index e242666d..33cae597 100644 +--- a/daemon/mount.c ++++ b/daemon/mount.c +@@ -73,6 +73,7 @@ typedef void (*MountCallback) (VfsMountable *mountable, + + static GList *mountables = NULL; + static GList *mounts = NULL; ++static GList *ongoing = NULL; + + static gboolean fuse_available; + +@@ -253,6 +254,7 @@ typedef struct { + char *obj_path; + gboolean spawned; + GVfsDBusSpawner *spawner; ++ GList *pending; /* MountData */ + } MountData; + + static void spawn_mount (MountData *data); +@@ -264,6 +266,7 @@ mount_data_free (MountData *data) + g_mount_spec_unref (data->mount_spec); + g_free (data->obj_path); + g_clear_object (&data->spawner); ++ g_list_free_full (data->pending, (GDestroyNotify) mount_data_free); + + g_free (data); + } +@@ -271,7 +274,17 @@ mount_data_free (MountData *data) + static void + mount_finish (MountData *data, GError *error) + { ++ GList *l; ++ ++ ongoing = g_list_remove (ongoing, data); ++ + data->callback (data->mountable, error, data->user_data); ++ for (l = data->pending; l != NULL; l = l->next) ++ { ++ MountData *pending_data = l->data; ++ pending_data->callback (pending_data->mountable, error, pending_data->user_data); ++ } ++ + mount_data_free (data); + } + +@@ -493,6 +506,7 @@ mountable_mount (VfsMountable *mountable, + gpointer user_data) + { + MountData *data; ++ GList *l; + + data = g_new0 (MountData, 1); + data->automount = automount; +@@ -502,6 +516,18 @@ mountable_mount (VfsMountable *mountable, + data->callback = callback; + data->user_data = user_data; + ++ for (l = ongoing; l != NULL; l = l->next) ++ { ++ MountData *ongoing_data = l->data; ++ if (g_mount_spec_equal (ongoing_data->mount_spec, mount_spec)) ++ { ++ ongoing_data->pending = g_list_append (ongoing_data->pending, data); ++ return; ++ } ++ } ++ ++ ongoing = g_list_append (ongoing, data); ++ + if (mountable->dbus_name == NULL) + spawn_mount (data); + else +-- +2.20.1 + diff --git a/goa-Add-support-for-certificate-prompts.patch b/goa-Add-support-for-certificate-prompts.patch new file mode 100644 index 0000000..fef2e61 --- /dev/null +++ b/goa-Add-support-for-certificate-prompts.patch @@ -0,0 +1,164 @@ +From bbc95d6716ac491489f059c68a6dd258e38aee79 Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Mon, 25 Nov 2019 16:53:31 +0100 +Subject: [PATCH] goa: Add support for certificate prompts + +Since commit f5ee590e, it is not possible to access Nextcloud/ownCloud +shares with self-signed (or invalid) certificates. This is because +the mount operation is handled by GOA volume monitor and the prompt +to accept certificate is not shown. Let's update the volume monitor +to handle just passwords and show the prompt to the client. + +Fixes: https://gitlab.gnome.org/GNOME/gvfs/issues/251 +--- + monitor/goa/goavolume.c | 98 ++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 96 insertions(+), 2 deletions(-) + +diff --git a/monitor/goa/goavolume.c b/monitor/goa/goavolume.c +index c077dd94..5e9097c6 100644 +--- a/monitor/goa/goavolume.c ++++ b/monitor/goa/goavolume.c +@@ -64,6 +64,7 @@ G_DEFINE_TYPE_EXTENDED (GVfsGoaVolume, g_vfs_goa_volume, G_TYPE_OBJECT, 0, + typedef struct + { + GMountOperation *mount_operation; ++ GMountOperation *mount_operation_orig; + gchar *passwd; + } MountOp; + +@@ -72,6 +73,13 @@ mount_op_free (MountOp *data) + { + g_clear_object (&data->mount_operation); + g_free (data->passwd); ++ ++ if (data->mount_operation_orig != NULL) ++ { ++ g_signal_handlers_disconnect_by_data (data->mount_operation_orig, data); ++ g_object_unref (data->mount_operation_orig); ++ } ++ + g_slice_free (MountOp, data); + } + +@@ -97,6 +105,88 @@ account_attention_needed_cb (GObject *_object, GParamSpec *pspec, gpointer user_ + + /* ---------------------------------------------------------------------------------------------------- */ + ++GType g_vfs_goa_mount_operation_get_type (void) G_GNUC_CONST; ++ ++typedef struct ++{ ++ GMountOperation parent_instance; ++} GVfsGoaMountOperation; ++ ++typedef struct ++{ ++ GMountOperationClass parent_class; ++} GVfsGoaMountOperationClass; ++ ++static GMountOperation * ++g_vfs_goa_mount_operation_new (void) ++{ ++ return G_MOUNT_OPERATION (g_object_new (g_vfs_goa_mount_operation_get_type (), NULL)); ++} ++ ++G_DEFINE_TYPE (GVfsGoaMountOperation, g_vfs_goa_mount_operation, G_TYPE_MOUNT_OPERATION) ++ ++static void ++g_vfs_goa_mount_operation_init (GVfsGoaMountOperation *mount_operation) ++{ ++} ++ ++static void ++g_vfs_goa_mount_operation_ask_question (GMountOperation *op, ++ const char *message, ++ const char *choices[]) ++{ ++ /* This is needed to prevent G_MOUNT_OPERATION_UNHANDLED reply in idle. */ ++} ++ ++static void ++g_vfs_goa_mount_operation_class_init (GVfsGoaMountOperationClass *klass) ++{ ++ GMountOperationClass *mount_op_class; ++ ++ mount_op_class = G_MOUNT_OPERATION_CLASS (klass); ++ mount_op_class->ask_question = g_vfs_goa_mount_operation_ask_question; ++} ++ ++/* ---------------------------------------------------------------------------------------------------- */ ++ ++static void ++ask_question_reply_cb (GMountOperation *op, ++ GMountOperationResult result, ++ gpointer user_data) ++{ ++ MountOp *data = g_task_get_task_data (user_data); ++ ++ g_mount_operation_set_choice (data->mount_operation, ++ g_mount_operation_get_choice (op)); ++ g_mount_operation_reply (data->mount_operation, result); ++} ++ ++static void ++mount_operation_ask_question_cb (GMountOperation *op, ++ gchar *message, ++ GStrv choices, ++ gpointer user_data) ++{ ++ MountOp *data = g_task_get_task_data (user_data); ++ ++ if (data->mount_operation_orig != NULL) ++ { ++ g_signal_connect (data->mount_operation_orig, ++ "reply", ++ G_CALLBACK (ask_question_reply_cb), ++ user_data); ++ g_signal_emit_by_name (data->mount_operation_orig, ++ "ask-question", ++ message, ++ choices); ++ } ++ else ++ { ++ g_mount_operation_reply (data->mount_operation, ++ G_MOUNT_OPERATION_UNHANDLED); ++ } ++} ++ + static void + mount_operation_ask_password_cb (GMountOperation *op, + gchar *message, +@@ -412,7 +502,7 @@ g_vfs_goa_volume_get_uuid (GVolume *_self) + static void + g_vfs_goa_volume_mount (GVolume *_self, + GMountMountFlags flags, +- GMountOperation *mount_operation, ++ GMountOperation *mount_operation_orig, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +@@ -423,6 +513,9 @@ g_vfs_goa_volume_mount (GVolume *_self, + GoaAccount *account; + + data = g_slice_new0 (MountOp); ++ if (mount_operation_orig != NULL) ++ data->mount_operation_orig = g_object_ref (mount_operation_orig); ++ + task = g_task_new (self, cancellable, callback, user_data); + g_task_set_source_tag (task, g_vfs_goa_volume_mount); + g_task_set_task_data (task, data, (GDestroyNotify) mount_op_free); +@@ -431,8 +524,9 @@ g_vfs_goa_volume_mount (GVolume *_self, + * monitor because it is set up to emit MountOpAskPassword on + * ask-password. + */ +- data->mount_operation = g_mount_operation_new (); ++ data->mount_operation = g_vfs_goa_mount_operation_new (); + g_signal_connect (data->mount_operation, "ask-password", G_CALLBACK (mount_operation_ask_password_cb), task); ++ g_signal_connect (data->mount_operation, "ask-question", G_CALLBACK (mount_operation_ask_question_cb), task); + + account = goa_object_peek_account (self->object); + goa_account_call_ensure_credentials (account, cancellable, ensure_credentials_cb, task); +-- +2.28.0 + diff --git a/gvfs.spec b/gvfs.spec new file mode 100644 index 0000000..d80d0ce --- /dev/null +++ b/gvfs.spec @@ -0,0 +1,1605 @@ +%define _unpackaged_files_terminate_build 0 + +%global avahi_version 0.6 +%global fuse_version 2.8.0 +%global gettext_version 0.19.4 +%global glib2_version 2.51.0 +%global goa_version 3.17.1 +%global gsettings_desktop_schemas_version 3.28.1-2 +%global gudev_version 147 +%global libarchive_version 3.0.22 +%global libcdio_paranoia_version 0.78.2 +%global libgcrypt_version 1.2.2 +%global libgdata_version 0.17.9 +%global libgphoto2_version 2.5.0 +%global libimobiledevice_version 1.2 +%global libmtp_version 1.1.12 +%global libnfs_version 1.9.8 +%global libplist_version 0.15 +%global libsmbclient_version 3.4.0 +%global libsoup_version 2.42.0 +%global libusb_version 1.0.21 +%global systemd_version 206 +%global talloc_version 1.3.0 +%global udisks2_version 1.97 + +Name: gvfs +Version: 1.36.2 +Release: 11%{?dist} +Summary: Backends for the gio framework in GLib + +License: GPLv3 and LGPLv2+ and BSD and MPLv2.0 +URL: https://wiki.gnome.org/Projects/gvfs +Source0: https://download.gnome.org/sources/gvfs/1.36/gvfs-%{version}.tar.xz + +# https://bugzilla.redhat.com/show_bug.cgi?id=1673888 +Patch0: admin-Prevent-access-if-any-authentication-agent-isn.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1662193 +Patch1: udisks2-Handle-lockdown-option-to-disable-writing.patch +Patch2: daemon-Handle-lockdown-option-to-disable-writing.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1729885 +Patch3: gvfsdaemon-Check-that-the-connecting-client-is-the-s.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1739117 +Patch4: daemon-Prevent-spawning-new-daemons-if-outgoing-oper.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1739116 +Patch5: smbbrowse-Force-NT1-protocol-version-for-workgroup-s.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1754506 +Patch6: admin-Add-query_info_on_read-write-functionality.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1752926 +Patch7: admin-Use-fsuid-to-ensure-correct-file-ownership.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1753972 +Patch8: admin-Ensure-correct-ownership-when-moving-to-file-u.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1759075 +Patch9: udisks2-Fix-crashes-caused-by-missing-source-tag.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1569868 +Patch10: smb-Improve-enumeration-performance.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1889411 +Patch11: goa-Add-support-for-certificate-prompts.patch + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(dbus-glib-1) +BuildRequires: pkgconfig(gcr-3) +BuildRequires: /usr/bin/ssh +BuildRequires: pkgconfig(libcdio_paranoia) >= %{libcdio_paranoia_version} +BuildRequires: pkgconfig(gudev-1.0) >= %{gudev_version} +BuildRequires: pkgconfig(libsoup-2.4) >= %{libsoup_version} +BuildRequires: pkgconfig(avahi-client) >= %{avahi_version} +BuildRequires: pkgconfig(avahi-glib) >= %{avahi_version} +BuildRequires: pkgconfig(libsecret-1) +BuildRequires: gettext-devel >= %{gettext_version} +BuildRequires: pkgconfig(udisks2) >= %{udisks2_version} +%if ! 0%{?rhel} +BuildRequires: pkgconfig(libbluray) +%endif +BuildRequires: systemd-devel >= %{systemd_version} +BuildRequires: pkgconfig(libxslt) +BuildRequires: docbook-style-xsl +BuildRequires: pkgconfig(polkit-gobject-1) +BuildRequires: pkgconfig(libcap) + +BuildRequires: automake autoconf +BuildRequires: libtool + +Requires: %{name}-client%{?_isa} = %{version}-%{release} +Requires: glib2%{?_isa} >= %{glib2_version} +Requires: udisks2 >= %{udisks2_version} +Requires: gsettings-desktop-schemas >= %{gsettings_desktop_schemas_version} + +# for file triggers +Requires(post): desktop-file-utils >= 0.22-6 +Requires(postun): desktop-file-utils >= 0.22-6 + +Obsoletes: gnome-mount <= 0.8 +Obsoletes: gnome-mount-nautilus-properties <= 0.8 +Obsoletes: gvfs-obexftp < 1.17.91-2 + +%description +The gvfs package provides backend implementations for the gio +framework in GLib. It includes ftp, sftp, cifs. + + +%package client +Summary: Client modules of backends for the gio framework in GLib +Conflicts: %{name} < 1.25.2-2 + +%description client +The gvfs package provides client modules of backend implementations for the gio +framework in GLib. + + +%package devel +Summary: Development files for gvfs +Requires: %{name}-client%{?_isa} = %{version}-%{release} + +%description devel +The gvfs-devel package contains headers and other files that are +required to develop applications using gvfs. + + +%package fuse +Summary: FUSE support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: pkgconfig(fuse) >= %{fuse_version} +Requires: fuse >= %{fuse_version} + +%description fuse +This package provides support for applications not using gio +to access the gvfs filesystems. + + +%package smb +Summary: Windows fileshare support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: libsmbclient-devel >= %{libsmbclient_version} +BuildRequires: pkgconfig(talloc) >= %{talloc_version} + +%description smb +This package provides support for reading and writing files on windows +shares (SMB) to applications using gvfs. + + +%package archive +Summary: Archiving support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: pkgconfig(libarchive) >= %{libarchive_version} + +%description archive +This package provides support for accessing files inside Zip and Tar archives, +as well as ISO images, to applications using gvfs. + + +%package gphoto2 +Summary: gphoto2 support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: pkgconfig(libgphoto2) >= %{libgphoto2_version} +BuildRequires: libexif-devel + +%description gphoto2 +This package provides support for reading and writing files on +PTP based cameras (Picture Transfer Protocol) and MTP based +media players (Media Transfer Protocol) to applications using gvfs. + + +%ifnarch s390 s390x +%package afc +Summary: AFC support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +Requires: usbmuxd +BuildRequires: pkgconfig(libimobiledevice-1.0) >= %{libimobiledevice_version} +BuildRequires: pkgconfig(libplist) >= %{libplist_version} + +%description afc +This package provides support for reading files on mobile devices +including phones and music players to applications using gvfs. +%endif + + +%package afp +Summary: AFP support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: libgcrypt-devel >= %{libgcrypt_version} +# this should ensure having this new subpackage installed on upgrade from older versions +Obsoletes: %{name} < 1.9.4-1 + +%description afp +This package provides support for reading and writing files on +Mac OS X and original Mac OS network shares via Apple Filing Protocol +to applications using gvfs. + + +%package mtp +Summary: MTP support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: pkgconfig(libmtp) >= %{libmtp_version} +BuildRequires: pkgconfig(libusb-1.0) >= %{libusb_version} + +%description mtp +This package provides support for reading and writing files on +MTP based devices (Media Transfer Protocol) to applications using gvfs. + + +%if ! 0%{?rhel} +%package nfs +Summary: NFS support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: pkgconfig(libnfs) >= %{libnfs_version} + +%description nfs +This package provides support for reading and writing files on +NFS network shares (Network File System) to applications using gvfs. +%endif + + +%package goa +Summary: GOA support for gvfs +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-client%{?_isa} = %{version}-%{release} +BuildRequires: pkgconfig(goa-1.0) >= %{goa_version} +BuildRequires: pkgconfig(libgdata) >= %{libgdata_version} +Requires: libgdata%{?_isa} >= %{libgdata_version} + +%description goa +This package provides seamless integration with gnome-online-accounts +file services. + +%package tests +Summary: Tests for the gvfs package +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tests +The gvfs-tests package contains tests that can be used to verify +the functionality of the installed gvfs package. + +%prep +%autosetup -p1 + +autoreconf -fi + +%build +%configure \ + --disable-gdu \ + --enable-udisks2 \ + --enable-keyring \ + --enable-installed-tests \ +%if 0%{?rhel} + --disable-nfs \ + --disable-bluray \ +%endif + %{nil} +make %{?_smp_mflags} V=1 + +%install +%make_install + +rm $RPM_BUILD_ROOT%{_libdir}/gvfs/*.la +rm $RPM_BUILD_ROOT%{_libdir}/gio/modules/*.la + +# trashlib is GPLv3, include the license +cp -p daemon/trashlib/COPYING COPYING.GPL3 + +%find_lang gvfs + +%post +# Reload .mount files: +killall -USR1 gvfsd >&/dev/null || : + +# Reload .mount files when single subpackage is installed: +%post smb +killall -USR1 gvfsd >&/dev/null || : +%post gphoto2 +killall -USR1 gvfsd >&/dev/null || : +%post mtp +killall -USR1 gvfsd >&/dev/null || : +%post goa +killall -USR1 gvfsd >&/dev/null || : +%ifnarch s390 s390x +%post afc +killall -USR1 gvfsd >&/dev/null || : +%endif + +%post archive +killall -USR1 gvfsd >&/dev/null || : +%if ! 0%{?rhel} +%post nfs +killall -USR1 gvfsd >&/dev/null || : +%endif +%post afp +killall -USR1 gvfsd >&/dev/null || : + + +%files +%dir %{_datadir}/gvfs +%dir %{_datadir}/gvfs/mounts +%{_datadir}/gvfs/mounts/admin.mount +%{_datadir}/gvfs/mounts/sftp.mount +%{_datadir}/gvfs/mounts/trash.mount +%{_datadir}/gvfs/mounts/cdda.mount +%{_datadir}/gvfs/mounts/computer.mount +%{_datadir}/gvfs/mounts/dav.mount +%{_datadir}/gvfs/mounts/dav+sd.mount +%{_datadir}/gvfs/mounts/http.mount +%{_datadir}/gvfs/mounts/localtest.mount +%{_datadir}/gvfs/mounts/burn.mount +%{_datadir}/gvfs/mounts/dns-sd.mount +%{_datadir}/gvfs/mounts/network.mount +%{_datadir}/gvfs/mounts/ftp.mount +%{_datadir}/gvfs/mounts/ftps.mount +%{_datadir}/gvfs/mounts/recent.mount +%{_datadir}/dbus-1/services/org.gtk.vfs.Daemon.service +%{_datadir}/dbus-1/services/org.gtk.vfs.Metadata.service +%{_datadir}/dbus-1/services/org.gtk.vfs.UDisks2VolumeMonitor.service +%dir %{_datadir}/gvfs/remote-volume-monitors +%{_datadir}/gvfs/remote-volume-monitors/udisks2.monitor +%{_datadir}/GConf/gsettings/*.convert +%{_datadir}/glib-2.0/schemas/*.xml +%{_datadir}/polkit-1/actions/org.gtk.vfs.file-operations.policy +%{_datadir}/polkit-1/rules.d/org.gtk.vfs.file-operations.rules +%{_libdir}/gvfs/libgvfsdaemon.so +%{_libexecdir}/gvfsd +%{_libexecdir}/gvfsd-admin +%{_libexecdir}/gvfsd-ftp +%{_libexecdir}/gvfsd-sftp +%{_libexecdir}/gvfsd-trash +%{_libexecdir}/gvfsd-cdda +%{_libexecdir}/gvfsd-computer +%{_libexecdir}/gvfsd-dav +%{_libexecdir}/gvfsd-http +%{_libexecdir}/gvfsd-localtest +%{_libexecdir}/gvfsd-burn +%{_libexecdir}/gvfsd-dnssd +%{_libexecdir}/gvfsd-network +%{_libexecdir}/gvfsd-metadata +%{_libexecdir}/gvfs-udisks2-volume-monitor +%{_libexecdir}/gvfsd-recent +%{_mandir}/man1/gvfsd.1* +%{_mandir}/man1/gvfsd-metadata.1* +%{_userunitdir}/gvfs-daemon.service +%{_userunitdir}/gvfs-metadata.service +%{_userunitdir}/gvfs-udisks2-volume-monitor.service + +%files client -f gvfs.lang +%{!?_licensedir:%global license %%doc} +%license COPYING COPYING.GPL3 +%doc AUTHORS NEWS README +%dir %{_libdir}/gvfs +%{_libdir}/gvfs/libgvfscommon.so +%{_libdir}/gio/modules/libgioremote-volume-monitor.so +%{_libdir}/gio/modules/libgvfsdbus.so +%{_mandir}/man7/gvfs.7* + +%files devel +%dir %{_includedir}/gvfs-client +%dir %{_includedir}/gvfs-client/gvfs +%{_includedir}/gvfs-client/gvfs/gvfsurimapper.h +%{_includedir}/gvfs-client/gvfs/gvfsuriutils.h + + +%files fuse +%{_libexecdir}/gvfsd-fuse +%{_mandir}/man1/gvfsd-fuse.1* +%{_tmpfilesdir}/gvfsd-fuse-tmpfiles.conf + +%files smb +%{_libexecdir}/gvfsd-smb +%{_libexecdir}/gvfsd-smb-browse +%{_datadir}/gvfs/mounts/smb-browse.mount +%{_datadir}/gvfs/mounts/smb.mount + + +%files archive +%{_libexecdir}/gvfsd-archive +%{_datadir}/gvfs/mounts/archive.mount + + +%files gphoto2 +%{_libexecdir}/gvfsd-gphoto2 +%{_datadir}/gvfs/mounts/gphoto2.mount +%{_libexecdir}/gvfs-gphoto2-volume-monitor +%{_datadir}/dbus-1/services/org.gtk.vfs.GPhoto2VolumeMonitor.service +%{_datadir}/gvfs/remote-volume-monitors/gphoto2.monitor +%{_userunitdir}/gvfs-gphoto2-volume-monitor.service + +%ifnarch s390 s390x +%files afc +%{_libexecdir}/gvfsd-afc +%{_datadir}/gvfs/mounts/afc.mount +%{_libexecdir}/gvfs-afc-volume-monitor +%{_datadir}/dbus-1/services/org.gtk.vfs.AfcVolumeMonitor.service +%{_datadir}/gvfs/remote-volume-monitors/afc.monitor +%{_userunitdir}/gvfs-afc-volume-monitor.service +%endif + +%files afp +%{_libexecdir}/gvfsd-afp +%{_libexecdir}/gvfsd-afp-browse +%{_datadir}/gvfs/mounts/afp.mount +%{_datadir}/gvfs/mounts/afp-browse.mount + +%files mtp +%{_libexecdir}/gvfsd-mtp +%{_datadir}/gvfs/mounts/mtp.mount +%{_libexecdir}/gvfs-mtp-volume-monitor +%{_datadir}/dbus-1/services/org.gtk.vfs.MTPVolumeMonitor.service +%{_datadir}/gvfs/remote-volume-monitors/mtp.monitor +%{_userunitdir}/gvfs-mtp-volume-monitor.service + +%if ! 0%{?rhel} +%files nfs +%{_libexecdir}/gvfsd-nfs +# for privileged ports +%caps(cap_net_bind_service=ep) %{_libexecdir}/gvfsd-nfs +%{_datadir}/gvfs/mounts/nfs.mount +%endif + +%files goa +%{_libexecdir}/gvfs-goa-volume-monitor +%{_datadir}/dbus-1/services/org.gtk.vfs.GoaVolumeMonitor.service +%{_datadir}/gvfs/remote-volume-monitors/goa.monitor +%{_datadir}/gvfs/mounts/google.mount +%{_libexecdir}/gvfsd-google +%{_userunitdir}/gvfs-goa-volume-monitor.service + +%files tests +%dir %{_libexecdir}/installed-tests +%{_libexecdir}/installed-tests/gvfs +%{_datadir}/installed-tests + +%changelog +* Tue Nov 03 2020 Ondrej Holy - 1.36.2-11 +- Add support for certificates prompts for GOA mounts (rhbz#1889411) + +* Wed Aug 05 2020 Ondrej Holy - 1.36.2-10 +- Fix libusb(x) requirements (rhbz#1866332) + +* Wed Jun 17 2020 Ondrej Holy - 1.36.2-9 +- Improve enumeration performance of smb backend (rhbz#1569868) + +* Tue Oct 8 2019 Ondrej Holy - 1.36.2-8 +- Fix udisks2 volume monitor crashes when stopping drive (rhbz#1759075) + +* Thu Sep 19 2019 Ondrej Holy - 1.36.2-7 +- Remove libbluray support (#1747972) +- CVE-2019-12448: Add query_info_on_read/write functionality (rhbz#1754506) +- CVE-2019-12447: Use fsuid to ensure correct file ownership (rhbz#1752926) +- CVE-2019-12449: Ensure correct ownership when moving to file:// uri (rhbz#1753972) + +* Fri Aug 09 2019 Ondrej Holy - 1.36.2-6 +- Prevent spawning new daemons if outgoing operation exists (#1739117) +- Force NT1 protocol version for workgroup support (#1739116) + +* Thu Aug 08 2019 Ondrej Holy - 1.36.2-5 +- CVE-2019-12795 Check that the connecting client is the same user (#1729885) + +* Thu May 16 2019 Ondrej Holy - 1.36.2-4 +- Handle lockdown option to disable writing (#1662193) + +* Mon Apr 01 2019 Ondrej Holy - 1.36.2-3 +- CVE-2019-3827: Prevent access if any authentication agent isn't available (#1673888) + +* Fri Dec 14 2018 Ray Strode - 1.36.2-2 +- rebuild + +* Tue Jun 12 2018 Ondrej Holy - 1.36.2-1 +- Update to 1.36.2 +- Remove mount-archive.desktop helper +- Remove obsolete gvfs utils +- Disable nfs support + +* Mon Apr 09 2018 Kalev Lember - 1.36.1-1 +- Update to 1.36.1 + +* Mon Mar 12 2018 Kalev Lember - 1.36.0-1 +- Update to 1.36.0 + +* Mon Mar 05 2018 Kalev Lember - 1.35.92-1 +- Update to 1.35.92 + +* Wed Feb 28 2018 Ondrej Holy - 1.35.91-1 +- Update to 1.35.91 + +* Wed Feb 07 2018 Fedora Release Engineering - 1.35.90-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Feb 05 2018 Kalev Lember - 1.35.90-1 +- Update to 1.35.90 +- Drop ldconfig scriptlets + +* Thu Jan 25 2018 Adrian Reber - 1.35.3-2 +- Rebuilt for libcdio-2.0.0 + +* Tue Dec 19 2017 Ondrej Holy - 1.35.3-1 +- Update to 1.35.3 + +* Thu Nov 02 2017 Kalev Lember - 1.35.1-1 +- Update to 1.35.1 + +* Fri Oct 06 2017 Kalev Lember - 1.34.1-1 +- Update to 1.34.1 + +* Mon Sep 11 2017 Kalev Lember - 1.34.0-1 +- Update to 1.34.0 + +* Tue Sep 05 2017 Kalev Lember - 1.33.92-1 +- Update to 1.33.92 + +* Mon Aug 28 2017 Kalev Lember - 1.33.91-1 +- Update to 1.33.91 + +* Wed Aug 09 2017 Ondrej Holy - 1.33.90-1 +- Update to 1.33.90 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.33.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.33.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Jul 24 2017 Ondrej Holy - 1.33.3-3 +- gdaemonfileenumerator: Fix crashes in synchronous enumerator code (rhbz#1472819) + +* Wed Jul 19 2017 Ondrej Holy - 1.33.3-2 +- goa: Fix password-based authentication (rhbz#1461066) + +* Sun Jun 25 2017 Kalev Lember - 1.33.3-1 +- Update to 1.33.3 + +* Wed May 10 2017 Ondrej Holy - 1.33.1-1 +- Update to 1.33.1 +- Drop gtk+ dependency + +* Tue Apr 11 2017 Kalev Lember - 1.32.1-1 +- Update to 1.32.1 + +* Tue Mar 21 2017 Kalev Lember - 1.32.0-1 +- Update to 1.32.0 + +* Fri Mar 17 2017 Kalev Lember - 1.31.92-2 +- Rebuilt for libbluray soname bump + +* Thu Mar 16 2017 Kalev Lember - 1.31.92-1 +- Update to 1.31.92 + +* Tue Feb 28 2017 Richard Hughes - 1.31.91-1 +- Update to 1.31.91 + +* Tue Feb 14 2017 Richard Hughes - 1.31.90-1 +- Update to 1.31.90 + +* Fri Feb 10 2017 Fedora Release Engineering - 1.31.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Nov 28 2016 Ray Strode - 1.31.2-1 +- Update to 1.31.2 + Related: https://bugzilla.gnome.org/show_bug.cgi?id=768707 + +* Mon Nov 14 2016 Adrian Reber - 1.31.1-2 +- Rebuilt for libcdio-0.94 + +* Sun Oct 30 2016 Kalev Lember - 1.31.1-1 +- Update to 1.31.1 + +* Mon Oct 17 2016 Ondrej Holy - 1.30.1.1-1 +- Update to 1.30.1.1 + +* Wed Oct 12 2016 Kalev Lember - 1.30.1-1 +- Update to 1.30.1 + +* Mon Sep 19 2016 Kalev Lember - 1.30.0-1 +- Update to 1.30.0 + +* Tue Sep 13 2016 Kalev Lember - 1.29.92-1 +- Update to 1.29.92 + +* Tue Aug 30 2016 Kalev Lember - 1.29.91-1 +- Update to 1.29.91 + +* Fri Aug 12 2016 Kalev Lember - 1.29.90-1 +- Update to 1.29.90 + +* Mon Jul 18 2016 Richard Hughes - 1.29.4-1 +- Update to 1.29.4 + +* Wed Jun 22 2016 Richard Hughes - 1.29.3-1 +- Update to 1.29.3 + +* Tue May 03 2016 Kalev Lember - 1.29.1-1 +- Update to 1.29.1 + +* Wed Apr 13 2016 Kalev Lember - 1.28.1-1 +- Update to 1.28.1 + +* Tue Mar 22 2016 Kalev Lember - 1.28.0-1 +- Update to 1.28.0 + +* Mon Mar 14 2016 Richard Hughes - 1.27.92-1 +- Update to 1.27.92 + +* Tue Mar 01 2016 Richard Hughes - 1.27.91-1 +- Update to 1.27.91 + +* Tue Feb 16 2016 Richard Hughes - 1.27.90-1 +- Update to 1.27.90 + +* Wed Feb 03 2016 Fedora Release Engineering - 1.27.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jan 20 2016 Kalev Lember - 1.27.4-1 +- Update to 1.27.4 + +* Mon Dec 14 2015 Kalev Lember - 1.27.3-1 +- Update to 1.27.3 + +* Tue Nov 10 2015 Kalev Lember - 1.26.2-1 +- Update to 1.26.2 + +* Fri Oct 23 2015 poma - 1.26.1.1-3 +- Accept XDG_RUNTIME_DIR/bus as a valid D-Bus session/user bus + +* Fri Oct 23 2015 Ondrej Holy - 1.26.1.1-2 +- google: Fail in-fs copy/move if it leads to display name loss + +* Thu Oct 15 2015 Kalev Lember - 1.26.1.1-1 +- Update to 1.26.1.1 + +* Thu Oct 15 2015 Kalev Lember - 1.26.1-2 +- file monitor: Fix invalid read + +* Mon Oct 12 2015 Kalev Lember - 1.26.1-1 +- Update to 1.26.1 + +* Mon Sep 21 2015 Kalev Lember - 1.26.0-1 +- Update to 1.26.0 + +* Wed Sep 16 2015 Ondrej Holy - 1.25.92-3 +- Move Google Drive backend into the goa subpackage + +* Mon Sep 14 2015 Kalev Lember - 1.25.92-2 +- Build Google Drive backend + +* Mon Sep 14 2015 Kalev Lember - 1.25.92-1 +- Update to 1.25.92 + +* Tue Sep 01 2015 Kalev Lember - 1.25.91-1 +- Update to 1.25.91 + +* Thu Aug 20 2015 Ondrej Holy - 1.25.90-3 +- Add NFS backend + +* Thu Aug 20 2015 Ondrej Holy - 1.25.90-2 +- Rely on file triggers for schemas and desktop files + +* Mon Aug 17 2015 Kalev Lember - 1.25.90-1 +- Update to 1.25.90 +- Use make_install macro + +* Fri Jul 24 2015 Ondrej Holy - 1.25.4.1-1 +- Update to 1.25.4.1 + +* Fri Jul 24 2015 Ondrej Holy - 1.25.4-1 +- Update to 1.25.4 + +* Tue Jun 30 2015 Kalev Lember - 1.25.3-1 +- Update to 1.25.3 + +* Wed Jun 17 2015 Fedora Release Engineering - 1.25.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Jun 8 2015 Ondrej Holy - 1.25.2-2 +- Move client libs into the own subpackage +- Move gvfs tools into the own subpackage +- Move gvfsd-fuse-tmpfiles.conf into fuse subpackage +- Remove obsoleted expat-devel dependency +- Remove obsoleted Group tags +- Fix bogus dates + +* Sun May 31 2015 Kalev Lember - 1.25.2-1 +- Update to 1.25.2 + +* Fri May 01 2015 Kalev Lember - 1.25.1-1 +- Update to 1.25.1 + +* Tue Apr 14 2015 Kalev Lember - 1.24.1-1 +- Update to 1.24.1 + +* Mon Mar 23 2015 Kalev Lember - 1.24.0-1 +- Update to 1.24.0 + +* Mon Mar 16 2015 Kalev Lember - 1.23.92-1 +- Update to 1.23.92 + +* Sat Feb 21 2015 Till Maas - 1.23.90-2 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Fri Feb 13 2015 Richard Hughes - 1.23.90-1 +- Update to 1.23.90 + +* Wed Feb 11 2015 Peter Robinson 1.23.4-5 +- Rebuild (libimobiledevice) +- Use %%license + +* Wed Jan 21 2015 Peter Robinson 1.23.4-4 +- Rebuild (libgpohoto2) + +* Tue Jan 20 2015 Richard Hughes - 1.23.4-1 +- Update to 1.23.4 + +* Fri Dec 19 2014 Richard Hughes - 1.23.3-1 +- Update to 1.23.3 + +* Tue Nov 25 2014 Kalev Lember - 1.23.2-1 +- Update to 1.23.2 + +* Wed Nov 12 2014 Vadim Rutkovsky - 1.22.2-3 +- Build installed tests + +* Tue Nov 11 2014 Adrian Reber - 1.22.2-2 +- Rebuilt for libcdio-0.93 + +* Mon Nov 10 2014 Kalev Lember - 1.22.2-1 +- Update to 1.22.2 + +* Wed Oct 15 2014 Peter Robinson 1.22.1-2 +- Rebuild for libimobiledevice 1.1.6 + +* Mon Oct 13 2014 Kalev Lember - 1.22.1-1 +- Update to 1.22.1 + +* Sun Sep 21 2014 Kalev Lember - 1.22.0-1 +- Update to 1.22.0 + +* Mon Sep 15 2014 Kalev Lember - 1.21.92-1 +- Update to 1.21.92 + +* Sat Aug 30 2014 Kalev Lember - 1.21.91-1 +- Update to 1.21.91 + +* Sat Aug 16 2014 Kalev Lember - 1.21.90-1 +- Update to 1.21.90 + +* Sat Aug 16 2014 Fedora Release Engineering - 1.21.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jul 18 2014 Kalev Lember - 1.21.4-1 +- Update to 1.21.4 + +* Tue Jun 24 2014 Richard Hughes - 1.21.3-1 +- Update to 1.21.3 + +* Sat Jun 07 2014 Fedora Release Engineering - 1.21.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat May 24 2014 Kalev Lember - 1.21.2-1 +- Update to 1.21.2 + +* Mon May 5 2014 Peter Robinson 1.21.1-2 +- Rebuild for libimobiledevice 1.1.6 + +* Mon Apr 28 2014 Richard Hughes - 1.21.1-1 +- Update to 1.21.1 + +* Fri Apr 11 2014 Richard Hughes - 1.20.1-1 +- Update to 1.20.1 + +* Fri Mar 21 2014 Kalev Lember - 1.20.0-1 +- Update to 1.20.0 + +* Tue Feb 18 2014 Richard Hughes - 1.19.90-1 +- Update to 1.19.90 + +* Thu Feb 06 2014 Ondrej Holy - 1.19.5-2 +- Fix license field + +* Mon Feb 03 2014 Richard Hughes - 1.19.5-1 +- Update to 1.19.5 + +* Tue Jan 28 2014 Dan Horák - 1.19.4-2 +- fix the BR: libarchive-devel condition for recent rpmbuild + +* Mon Jan 13 2014 Richard Hughes - 1.19.4-1 +- Update to 1.19.4 + +* Tue Dec 17 2013 Richard Hughes - 1.19.3-1 +- Update to 1.19.3 + +* Mon Dec 16 2013 Adrian Reber - 1.19.2-2 +- Rebuilt for libcdio-0.92 + +* Mon Nov 18 2013 Richard Hughes - 1.19.2-1 +- Update to 1.19.2 + +* Tue Oct 29 2013 Richard Hughes - 1.19.1-1 +- Update to 1.19.1 + +* Thu Oct 3 2013 Ondrej Holy - 1.18.2-1 +- Update to 1.18.2 + +* Thu Sep 26 2013 Kalev Lember - 1.18.1-1 +- Update to 1.18.1 + +* Thu Sep 26 2013 Rex Dieter 1.18.0-2 +- add explicit avahi build deps, move autofoo to %%prep + +* Wed Sep 25 2013 Kalev Lember - 1.18.0-1 +- Update to 1.18.0 + +* Wed Sep 18 2013 Kalev Lember - 1.17.91-3 +- Obsolete the removed obexftp subpackage + +* Wed Sep 18 2013 Matthias Clasen - 1.17.91-2 +- Drop obexftp subpackage + +* Tue Sep 03 2013 Kalev Lember - 1.17.91-1 +- Update to 1.17.91 + +* Thu Aug 22 2013 Kalev Lember - 1.17.90-1 +- Update to 1.17.90 + +* Fri Aug 09 2013 Kalev Lember - 1.17.3-1 +- Update to 1.17.3 + +* Sat Aug 03 2013 Fedora Release Engineering - 1.17.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Jun 20 2013 Bastien Nocera 1.17.2-2 +- Fix gvfs-afc crashes due to new libimobiledevice (#951731) + +* Fri Jun 14 2013 Kalev Lember - 1.17.2-1 +- Update to 1.17.2 + +* Sun Jun 02 2013 Kalev Lember - 1.17.1-1 +- Update to 1.17.1 + +* Wed May 22 2013 Kalev Lember - 1.17.0-2 +- gvfs-archive: Add the update-desktop-database rpm scriptlets (#954214) + +* Sat May 04 2013 Kalev Lember - 1.17.0-1 +- Update to 1.17.0 + +* Tue Apr 16 2013 Richard Hughes - 1.16.1-1 +- Update to 1.16.1 + +* Thu Mar 28 2013 Tomas Bzatek - 1.16.0-1 +- Update to 1.16.0 + +* Wed Mar 20 2013 Peter Robinson 1.15.4-2 +- Rebuild for new libimobiledevice + +* Mon Mar 04 2013 Richard Hughes - 1.15.4-1 +- Update to 1.15.4 + +* Wed Feb 6 2013 Tomas Bzatek - 1.15.3-2 +- Install systemd tmpfiles.d exclusion file for gvfs-fuse (#902743) + +* Tue Feb 5 2013 Tomas Bzatek - 1.15.3-1 +- Update to 1.15.3 + +* Tue Jan 15 2013 Tomas Bzatek - 1.15.2-1 +- Update to 1.15.2 + +* Mon Jan 07 2013 Adrian Reber - 1.15.1-3 +- Rebuilt for libcdio-0.90 + +* Wed Dec 19 2012 Tomas Bzatek - 1.15.1-2 +- Rebuilt for new udisks + +* Tue Dec 18 2012 Tomas Bzatek - 1.15.1-1 +- Update to 1.15.1 + +* Fri Dec 7 2012 Tomas Bzatek - 1.15.0-3 +- Enable verbose build messages +- Remove deprecated Encoding key from mount-archive.desktop + +* Tue Nov 6 2012 Tomas Bzatek - 1.15.0-2 +- Clarify licensing +- Explicitly disable HAL + +* Mon Oct 29 2012 Tomas Bzatek - 1.15.0-1 +- Update to 1.15.0 + +* Tue Sep 25 2012 Tomas Bzatek - 1.14.0-1 +- Update to 1.14.0 + +* Tue Sep 18 2012 Matthias Clasen - 1.13.9-1 +- Update to 1.13.9 + +* Wed Sep 5 2012 Tomas Bzatek - 1.13.8-1 +- Update to 1.13.8 + +* Wed Aug 29 2012 Tomas Bzatek - 1.13.7-3 +- Bring archive mounter back + +* Mon Aug 27 2012 Cosimo Cecchi - 1.13.7-2 +- Make sure keyring integration is enabled + +* Tue Aug 21 2012 Richard Hughes - 1.13.7-1 +- Update to 1.13.7 + +* Tue Aug 07 2012 Richard Hughes - 1.13.4-1 +- Update to 1.13.4 + +* Tue Aug 7 2012 Jindrich Novy - 1.13.3-4 +- add BR: docbook-style-xsl so that gvfs actually builds + +* Sun Aug 5 2012 Jindrich Novy - 1.13.3-3 +- add patch to fix gvfs build against libgphoto2 (inspired by SUSE) + +* Fri Jul 27 2012 Fedora Release Engineering - 1.13.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 16 2012 Tomas Bzatek - 1.13.3-1 +- Update to 1.13.3 + +* Mon Jul 16 2012 Nils Philippsen - 1.13.2-2 +- rebuild for new libgphoto2 + +* Tue Jun 26 2012 Tomas Bzatek - 1.13.2-1 +- Update to 1.13.2 + +* Mon Jun 4 2012 Tomas Bzatek - 1.13.1-1 +- Update to 1.13.1 + +* Wed May 2 2012 Tomas Bzatek - 1.13.0-1 +- Update to 1.13.0 + +* Fri Apr 27 2012 Tomas Bzatek - 1.12.2-1 +- Update to 1.12.2 +- Backport multiseat patches from master + +* Tue Apr 24 2012 Kalev Lember - 1.12.1-3 +- Silence rpm scriptlet output + +* Wed Apr 18 2012 Kalev Lember - 1.12.1-2 +- Rebuild again for new libimobiledevice and usbmuxd + +* Tue Apr 17 2012 Tomas Bzatek - 1.12.1-1 +- Update to 1.12.1 + +* Thu Apr 12 2012 Peter Robinson - 1.12.0-2 +- Rebuild for new libimobiledevice and usbmuxd + +* Mon Mar 26 2012 Tomas Bzatek - 1.12.0-1 +- Update to 1.12.0 + +* Tue Mar 20 2012 Tomas Bzatek - 1.11.5-1 +- Update to 1.11.5 + +* Fri Feb 24 2012 Tomas Bzatek - 1.11.4-1 +- Update to 1.11.4 + +* Tue Feb 7 2012 Tomas Bzatek - 1.11.3-1 +- Update to 1.11.3 + +* Fri Feb 3 2012 Tomas Bzatek - 1.11.3-0.4.20120120 +- Exclude the obexftp package from s390 builds + +* Wed Jan 25 2012 Tomas Bzatek - 1.11.3-0.3.20120120 +- Rebuilt for new libarchive + +* Tue Jan 24 2012 Tomas Bzatek - 1.11.3-0.2.20120120 +- Add udisks2 runtime Requires + +* Fri Jan 20 2012 Matthias Clasen - 1.11.3-0.1.20120120-1 +- Prelease that works with udisks2 + +* Wed Jan 18 2012 Tomas Bzatek - 1.11.2-1 +- Update to 1.11.2 + +* Fri Jan 13 2012 Fedora Release Engineering - 1.11.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 20 2011 Matthias Clasen - 1.11.1-1 +- Update to 1.11.1 + +* Tue Dec 13 2011 Tomas Bzatek - 1.11.0-5 +- Rebuilt for new libbluray + +* Sun Nov 20 2011 Adrian Reber - 1.11.0-4 +- Rebuild for libcdio-0.83 + +* Wed Nov 16 2011 Adam Jackson 1.11.0-3 +- Rebuild for new libarchive + +* Wed Oct 26 2011 Fedora Release Engineering - 1.11.0-2 +- Rebuilt for glibc bug#747377 + +* Wed Oct 26 2011 Tomas Bzatek - 1.11.0-1 +- Update to 1.11.0 + +* Mon Oct 17 2011 Tomas Bzatek - 1.10.1-1 +- Update to 1.10.1 + +* Tue Sep 27 2011 Ray - 1.10.0-1 +- Update to 1.10.0 + +* Mon Sep 5 2011 Matthias Clasen - 1.9.5-1 +- Update to 1.9.5 + +* Tue Aug 30 2011 Tomas Bzatek - 1.9.4-1 +- Update to 1.9.4 +- New AFP backend in separate subpackage + +* Tue Aug 16 2011 Matthias Clasen - 1.9.3-1 +- Update to 1.9.3 +- Drop obsolete patches +- Clean up spec a bit + +* Wed Jul 27 2011 Tomas Bzatek - 1.9.2-1 +- Update to 1.9.2 +- Enable real statfs calls in the fuse daemon + +* Wed Jun 15 2011 Tomas Bzatek - 1.9.1-1 +- Update to 1.9.1 + +* Mon May 09 2011 Tomas Bzatek - 1.9.0-1 +- Update to 1.9.0 + +* Sat May 07 2011 Christopher Aillon - 1.8.1-2 +- Update gsettings scriptlet + +* Tue Apr 26 2011 Tomas Bzatek - 1.8.1-1 +- Update to 1.8.1 + +* Fri Apr 22 2011 Tomas Bzatek - 1.8.0-3 +- Build without HAL -> expect obexftp breakage. + +* Mon Apr 18 2011 Tomas Bzatek - 1.8.0-2 +- Fix threadsafety of closing channels +- Fix d-bus messages leaks +- Fix /dev symlink checks in gdu volume monitor + +* Mon Apr 4 2011 Matthias Clasen - 1.8.0-1 +- Update to 1.8.0 + +* Mon Mar 21 2011 Matthias Clasen - 1.7.3-1 +- Update to 1.7.3 + +* Wed Feb 09 2011 Fedora Release Engineering - 1.7.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 1 2011 Tomas Bzatek - 1.7.2-1 +- Update to 1.7.2 + +* Sun Dec 26 2010 Bastien Nocera 1.7.1-1 +- Update to 1.7.1 + +* Thu Dec 2 2010 Tomas Bzatek - 1.7.0-1 +- Update to 1.7.0 + +* Mon Nov 1 2010 Matthias Clasen - 1.6.5-1 +- Update to 1.6.5 +- Drop upstreamed patches + +* Mon Nov 1 2010 Tomas Bzatek - 1.6.4-4 +- Use correct "usb:" address for GPhoto mounts with gudev (#642836) + +* Wed Oct 13 2010 Tomas Bzatek - 1.6.4-3 +- FUSE: Add O_TRUNC support for open() + +* Mon Oct 4 2010 Tomas Bzatek - 1.6.4-2 +- Fix sftp poll timeout + +* Wed Sep 29 2010 Matthias Clasen - 1.6.4-1 +- Update to 1.6.4 + +* Wed Sep 8 2010 Tomas Bzatek - 1.6.3-3 +- Fix smb daemons deadlock due to GConf initialization + +* Mon Jul 12 2010 Dan Horák - 1.6.3-2 +- s390(x) machines can't connect mobile phones or players + +* Mon Jul 12 2010 Matthias Clasen - 1.6.3-1 +- Update to 1.6.3 + +* Thu May 27 2010 Tomas Bzatek - 1.6.2-1 +- Update to 1.6.2 + +* Tue May 4 2010 Tomas Bzatek - 1.6.1-3 +- Fix Nautilus 100% CPU after trashing a file with an emblem (#584784) + +* Mon Apr 26 2010 Tomas Bzatek - 1.6.1-2 +- Explicitly require minimal glib2 version (#585912) + +* Mon Apr 26 2010 Tomas Bzatek - 1.6.1-1 +- Update to 1.6.1 + +* Mon Apr 19 2010 Matthias Clasen - 1.6.0-2 +- Use update-gio-modules + +* Mon Mar 29 2010 Tomas Bzatek - 1.6.0-1 +- Update to 1.6.0 + +* Mon Mar 22 2010 Bastien Nocera 1.5.5-3 +- Fix build with new libimobiledevice +- Don't mount both gphoto and AFC mounts on AFC devices + +* Sun Mar 21 2010 Peter Robinson 1.5.5-2 +- Rebuild for new stable libimobiledevice + +* Mon Mar 8 2010 Tomas Bzatek - 1.5.5-1 +- Update to 1.5.5 + +* Thu Feb 25 2010 Matthias Clasen - 1.5.4-2 +- Re-add missing service files + +* Mon Feb 22 2010 Matthias Clasen - 1.5.4-1 +- Update to 1.5.4 + +* Mon Feb 15 2010 Tomas Bzatek - 1.5.3-2 +- sftp: fix crash on unmount + +* Tue Feb 9 2010 Tomas Bzatek - 1.5.3-1 +- Update to 1.5.3 + +* Mon Feb 8 2010 Tomas Bzatek - 1.5.2-5 +- ftp: backport several PASV/EPSV fixes from master (#542205, #555033) + +* Fri Feb 5 2010 Tomas Bzatek - 1.5.2-4 +- AFC: Use new libimobiledevice library + +* Tue Jan 26 2010 Tomas Bzatek - 1.5.2-3 +- Fix AFC build against new libiphone + +* Mon Jan 25 2010 Matthias Clasen - 1.5.2-2 +- Update the GIO module cache + +* Mon Jan 25 2010 Tomas Bzatek - 1.5.2-1 +- Update to 1.5.2 + +* Fri Jan 22 2010 Adrian Reber - 1.5.1-6 +- Rebuild for libcdio-0.82 + +* Mon Jan 18 2010 Tomas Bzatek - 1.5.1-5 +- Avoid crash on race to mount gvfstrash (#555337) +- Nuke HAL volume monitor + +* Tue Jan 12 2010 Tomas Bzatek - 1.5.1-4 +- Don't leak mount job operation (#552842) +- Recognize gphoto2 cameras which don't implement get storageinfo (#552856) +- ObexFTP: Use a private D-Bus connection for obex-data-server (#539347) + +* Tue Dec 15 2009 Tomas Bzatek - 1.5.1-3 +- Rebuilt against new libiphone + +* Mon Nov 30 2009 Tomas Bzatek - 1.5.1-2 +- Metadata fixes +- SMB: Fix free space calculation for older samba servers +- fuse: Fix setting timestamps + +* Wed Nov 18 2009 Tomas Bzatek - 1.5.1-1 +- Update to 1.5.1 +- AFC: temporarily disable setting file modification times + +* Thu Nov 12 2009 Matthias Clasen 1.4.1-6 +- Add obsoletes for gnome-mount + +* Thu Nov 12 2009 Bastien Nocera 1.4.1-5 +- Add obsoletes for gnome-vfs2-obexftp + +* Tue Nov 10 2009 Tomas Bzatek - 1.4.1-4 +- SMB: Support querying filesystem size and free space + +* Tue Nov 3 2009 Tomas Bzatek - 1.4.1-3 +- gdu-volume-monitor: don't crash on NULL devices (#529982) + +* Mon Nov 2 2009 Tomas Bzatek - 1.4.1-2 +- Reload .mount files when single package is installed + +* Tue Oct 20 2009 Tomas Bzatek - 1.4.1-1 +- Update to 1.4.1 + +* Fri Oct 16 2009 Tomas Bzatek - 1.4.0-7 +- HTTP: Support g_file_input_stream_query_info() +- HTTP: Use libsoup header parsing function +- Set correct MIME type for MTP music players + +* Wed Oct 14 2009 Bastien Nocera 1.4.0-6 +- Fix crasher in ObexFTP (#528181) + +* Fri Oct 9 2009 Tomas Bzatek - 1.4.0-5 +- Don't always overwrite on trash restore +- Separate "Safely Remove Drive" from "Eject" +- Don't advertise can_poll for drives not using removable media +- Disallow mounting empty drives +- Disallow ejecting empty drives +- Silently drop eject error messages when detaching drive + +* Thu Oct 8 2009 Tomas Bzatek - 1.4.0-4 +- Fix Nautilus not displaying friendly icons for SSH-connected system (#526892) +- Actually apply the logical partitions patch + +* Thu Oct 1 2009 Matthias Clasen - 1.4.0-3 +- Consider logical partitions when deciding if a drive should be ignored + +* Tue Sep 29 2009 Matthias Clasen - 1.4.0-2 +- Fix the lack of icons in the http backend + +* Mon Sep 21 2009 Tomas Bzatek - 1.4.0-1 +- Update to 1.4.0 + +* Thu Sep 17 2009 Peter Lemenkov - 1.3.6-2 +- Rebuilt with new fuse + +* Mon Sep 7 2009 Tomas Bzatek - 1.3.6-1 +- Update to 1.3.6 + +* Wed Aug 26 2009 Matthias Clasen - 1.3.5-2 +- Don't mount interactively during login + +* Mon Aug 24 2009 Matthias Clasen - 1.3.5-1 +- Update to 1.3.5 + +* Mon Aug 17 2009 Tomas Bzatek - 1.3.4-7 +- Fix Nautilus can't create "untitled folder" on sftp mounts (#512611) + +* Fri Aug 14 2009 Bastien Nocera 1.3.4-6 +- Update AFC patch + +* Thu Aug 13 2009 Tomas Bzatek - 1.3.4-5 +- More complete fix for DAV mount path prefix issues + +* Tue Aug 11 2009 Bastien Nocera 1.3.4-4 +- Fix crash on startup for the afc volume monitor + +* Tue Aug 11 2009 Bastien Nocera 1.3.4-3 +- libgudev-devel is required for the gphoto2 monitor + +* Tue Aug 11 2009 Bastien Nocera 1.3.4-2 +- Add AFC backend + +* Mon Aug 10 2009 Matthias Clasen - 1.3.4-1 +- Update to 1.3.4 + +* Fri Aug 7 2009 Tomas Bzatek - 1.3.3-3 +- Fix bad mount prefix stripping (part of #509612) +- Fix gvfsd-sftp segfault when asking a question +- Enable tar+xz in the archive mounter + +* Tue Aug 4 2009 Tomas Bzatek - 1.3.3-2 +- Fix gedit crashed with SEGV in strlen() +- Fix SMB protocol not handled when opening from a bookmark (#509832) + +* Wed Jul 29 2009 Matthias Clasen - 1.3.3-1 +- Update to 1.3.3 + +* Mon Jul 27 2009 Matthias Clasen - 1.3.2-3 +- Rebuild + +* Fri Jul 24 2009 Fedora Release Engineering - 1.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Jul 13 2009 Matthias Clasen - 1.3.2-1 +- Update to 1.3.2 +- Drop upstreamed patches + +* Mon Jun 22 2009 Tomas Bzatek - 1.3.1-2 +- Bump version requirements +- Backport FTP and Computer backend patches from master + +* Mon Jun 15 2009 Matthias Clasen - 1.3.1-1 +- Update to 1.3.1 +- Drop obsolete patches + +* Fri Jun 12 2009 Tomas Bzatek - 1.2.3-3 +- Move bash-completion out of profile.d (#466883) + +* Mon Jun 8 2009 Tomas Bzatek - 1.2.3-2 +- SFTP: Increase timeout (#504339) + +* Mon May 18 2009 Tomas Bzatek - 1.2.3-1 +- Update to 1.2.3 +- Prevent deadlocks in dnssd resolver (#497631) + +* Tue May 12 2009 Tomas Bzatek - 1.2.2-5 +- Require separate libtalloc to fix libsmbclient +- Ref the infos in next_files_finish (gnome #582195) +- FTP: parse file sizes > 4GB correctly (#499286) +- CDDA: allow query well-formed filenames only (#499266) + +* Sat May 02 2009 David Zeuthen - 1.2.2-4 +- Don't show drives that are supposed to be hidden (#498649) +- Only automount if media or drive was just inserted - this fixes + a problem with spurious automounts when partitioning/formatting + +* Wed Apr 15 2009 David Zeuthen - 1.2.2-3 +- Sync with the gdu-volume-monitor branch + +* Mon Apr 13 2009 Alexander Larsson - 1.2.2-2 +- Add ssh-auth-sock patch from svn + +* Mon Apr 13 2009 Matthias Clasen - 1.2.2-1 +- Update to 1.2.2 +- Allow eject even on non-ejectable devices + +* Sat Apr 11 2009 David Zeuthen - 1.2.1-5 +- Don't show drives in computer:/// if media is available but + no volumes are recognized (#495152) + +* Sat Apr 11 2009 Matthias Clasen - 1.2.1-4 +- No need for bash completion to be executable + +* Thu Apr 9 2009 David Zeuthen - 1.2.1-3 +- Clean up gdu patches and bump BR for gdu to 0.3 +- Avoiding showing volume for ignored mounts (#495033) + +* Thu Apr 9 2009 David Zeuthen - 1.2.1-2 +- Avoid automounting device-mapper devices and similar (#494144) + +* Thu Apr 2 2009 Matthias Clasen - 1.2.1-1 +- Update to 1.2.1 + +* Wed Mar 18 2009 David Zeuthen - 1.2.0-2 +- GNOME #575728 - crash in Open Folder: mounting a crypto volume + +* Mon Mar 16 2009 Tomas Bzatek - 1.2.0-1 +- Update to 1.2.0 + +* Wed Mar 11 2009 Tomas Bzatek - 1.1.8-2 +- Fix 100% cpu usage when connecting to a ssh key and denying key access +- Fix monitors leak + +* Tue Mar 10 2009 Tomas Bzatek - 1.1.8-1 +- Update to 1.1.8 + +* Mon Mar 9 2009 Tomas Bzatek - 1.1.7-5 +- Expose device file attribute for all items in computer:// + +* Fri Mar 6 2009 Tomas Bzatek - 1.1.7-4 +- Fix volume lists not filled correctly + +* Wed Mar 4 2009 David Zeuthen - 1.1.7-3 +- Update GVfs gdu patch to fix mount detection confusion (#488399) + +* Mon Mar 2 2009 Matthias Clasen - 1.1.7-2 +- Port to DeviceKit-disks + +* Mon Mar 2 2009 Tomas Bzatek - 1.1.7-1 +- Update to 1.1.7 + +* Tue Feb 24 2009 Fedora Release Engineering - 1.1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 16 2009 Tomas Bzatek - 1.1.6-1 +- Update to 1.1.6 + +* Mon Feb 2 2009 Tomas Bzatek - 1.1.5-1 +- Update to 1.1.5 + +* Wed Jan 28 2009 - Bastien Nocera - 1.1.4-2 +- ObexFTP write support + +* Tue Jan 20 2009 Tomas Bzatek - 1.1.4-1 +- Update to 1.1.4 + +* Tue Jan 13 2009 Adrian Reber - 1.1.3-4 +- Rebuild for libcdio-0.81 + +* Mon Jan 12 2009 Matthias Clasen - 1.1.3-3 +- Fix dav+sd.mount + +* Fri Jan 9 2009 Matthias Clasen - 1.1.3-2 +- Support moving files in the burn backend + +* Tue Jan 6 2009 Tomas Bzatek - 1.1.3-1 +- Update to 1.1.3 + +* Wed Dec 17 2008 Tomas Bzatek - 1.1.2-2 +- Update the smb-browse auth patch + +* Tue Dec 16 2008 Matthias Clasen - 1.1.2-1 +- Update to 1.1.2 + +* Fri Dec 12 2008 Tomas Bzatek - 1.1.1-5 +- FTP: Fix PASV connections + +* Tue Dec 9 2008 Tomas Bzatek - 1.1.1-4 +- Add support for .tar.lzma archives in archive mounter + +* Fri Dec 5 2008 Tomas Bzatek - 1.1.1-3 +- Added experimental smb-browse auth patch + +* Wed Dec 3 2008 Matthias Clasen - 1.1.1-2 +- Update file lists to include the dav+sd backend + +* Tue Dec 2 2008 Tomas Bzatek - 1.1.1-1 +- Update to 1.1.1 + +* Mon Dec 1 2008 Tomas Bzatek - 1.0.3-1 +- Update to 1.0.3 + +* Fri Nov 7 2008 Tomas Bzatek - 1.0.2-4 +- SMB: timestamp setting support (#461505) + +* Tue Nov 4 2008 Tomas Bzatek - 1.0.2-3 +- Return an empty array on success when no content type + matches (#468946) + +* Fri Oct 24 2008 Alexander Larsson - 1.0.2-2 +- Don't return generic fallback icons for files, + as this means custom mimetypes don't work (from svn) + +* Mon Oct 20 2008 Tomas Bzatek - 1.0.2-1 +- Update to 1.0.2 + +* Tue Oct 7 2008 Tomas Bzatek - 1.0.1-5 +- Don't make warnings fatal (resolves #465693) + +* Wed Oct 1 2008 David Zeuthen - 1.0.1-4 +- Add patch for reverse mapping FUSE paths (bgo #530654) + +* Mon Sep 29 2008 Matthias Clasen - 1.0.1-3 +- Fix mounting + +* Mon Sep 29 2008 - Bastien Nocera - 1.0.1-2 +- Update obexftp patch from upstream + +* Wed Sep 24 2008 Matthias Clasen - 1.0.1-1 +- Update to 1.0.1 + +* Mon Sep 22 2008 Matthias Clasen - 1.0.0-2 +- Update to 1.0.0 + +* Fri Sep 19 2008 - Bastien Nocera - 0.99.8-6 +- Update patch for missing file + +* Fri Sep 19 2008 - Bastien Nocera - 0.99.8-5 +- Updated patch, fixed deadlock whilst mounting + +* Wed Sep 17 2008 Tomas Bzatek - 0.99.8-4 +- Actually apply the kerberos patch + +* Tue Sep 16 2008 Tomas Bzatek - 0.99.8-3 +- SMB: Fix kerberos authentication + +* Mon Sep 15 2008 Matthias Clasen - 0.99.8-2 +- Update to 0.99.8 + +* Mon Sep 15 2008 - Bastien Nocera - 0.99.7.1-4 +- Update for BlueZ and obex-data-server D-Bus API changes + +* Thu Sep 11 2008 Matthias Clasen - 0.99.7.1-3 +- Rebuild + +* Tue Sep 09 2008 - Bastien Nocera - 0.99.7.1-2 +- Somebody made the build system be obnoxious and point out my + errors in obvious ways + +* Tue Sep 09 2008 - Bastien Nocera - 0.99.7.1-1 +- Update to 0.99.7.1 + +* Tue Sep 2 2008 Tomas Bzatek - 0.99.6-1 +- Update to 0.99.6 + +* Thu Aug 28 2008 Matthias Clasen - 0.99.5-3 +- Add a comma + +* Wed Aug 27 2008 - Bastien Nocera - 0.99.5-2 +- Update some descriptions + +* Wed Aug 20 2008 Tomas Bzatek - 0.99.5-1 +- Update to 0.99.5 + +* Mon Aug 4 2008 Matthias Clasen - 0.99.4-1 +- Update to 0.99.4 + +* Sun Jul 27 2008 Matthias Clasen - 0.99.3-2 +- Use standard icon names + +* Wed Jul 23 2008 Matthias Clasen - 0.99.3-1 +- Update to 0.99.3 + +* Tue Jul 22 2008 Tomas Bzatek - 0.99.2-1 +- Update to 0.99.2 +- Split out backends to separate packages + +* Tue Jun 24 2008 Tomas Bzatek - 0.99.1-3 +- gvfsd-trash: Skip autofs mounts + +* Thu Jun 12 2008 Tomas Bzatek - 0.99.1-2 +- Fix transfer of whole directories from FTP (#448560) + +* Tue Jun 3 2008 Matthias Clasen - 0.99.1-1 +- Update to 0.99.1 + +* Tue May 27 2008 Tomas Bzatek - 0.2.4-1 +- Update to 0.2.4 + +* Thu Apr 24 2008 Matthias Clasen - 0.2.3-10 +- Add application/zip to the supported mime types for the archive + backend (launchpad #211697) + +* Sat Apr 19 2008 David Zeuthen - 0.2.3-9 +- Ensure archive mounts are read-only and turn on thumbnailing on them +- Update fuse threading patch + +* Fri Apr 18 2008 Matthias Clasen - 0.2.3-8 +- Fix thread-safety issues in gvfs-fuse-daemon +- Prevent dbus from shutting us down unexpectedly + +* Thu Apr 17 2008 David Zeuthen - 0.2.3-7 +- Put X-Gnome-Vfs-System=gio into mount-archarive.desktop (See #442835) + +* Wed Apr 16 2008 Matthias Clasen - 0.2.3-6 +- Reenable gphoto automounting +- Support unmounting all mounts for a scheme + +* Wed Apr 16 2008 Matthias Clasen - 0.2.3-5 +- Fix hangs when unmounting gphoto mounts + +* Wed Apr 16 2008 David Zeuthen - 0.2.3-4 +- Only show mounts in /media and inside $HOME (#442189) + +* Mon Apr 14 2008 Matthias Clasen - 0.2.3-3 +- Fix a bug that causes application crashes (#441084) + +* Fri Apr 11 2008 Matthias Clasen - 0.2.3-2 +- Fix a crash of the fuse daemon on 64bit + +* Mon Apr 7 2008 Matthias Clasen - 0.2.3-1 +- Update to 0.2.3 + +* Fri Mar 28 2008 Tomas Bzatek - 0.2.2-1 +- Update to 0.2.2 + +* Tue Mar 25 2008 Tomas Bzatek - 0.2.1-4 +- Moved fuse stuff to a dedicated package + +* Thu Mar 20 2008 Alexander Larsson - 0.2.1-3 +- Add patch with simple archive backend UI integration + +* Wed Mar 19 2008 Tomas Bzatek - 0.2.1-2 +- Added libarchive dependency for archive backend +- Require new libsmbclient in order to get smb backend working again + +* Tue Mar 18 2008 Tomas Bzatek - 0.2.1-1 +- Update to 0.2.1 (archive backend temporarily disabled) + +* Mon Mar 17 2008 Matthias Clasen - 0.2.0.1-2 +- Silence %%post + +* Mon Mar 10 2008 Matthias Clasen - 0.2.0.1-1 +- Update to 0.2.0.1 + +* Thu Mar 6 2008 Tomas Bzatek - 0.1.11-2 +- Add patch that fixes a deadlock when foreign volume is removed + +* Tue Mar 4 2008 Matthias Clasen - 0.1.11-1 +- Update to 0.1.11 + +* Tue Mar 04 2008 Tomas Bzatek - 0.1.10-1 +- Update to 0.1.10 + +* Mon Feb 25 2008 Alexander Larsson - 0.1.8-1 +- Update to 0.1.8 + +* Thu Feb 14 2008 Alexander Larsson - 0.1.7-3 +- Add patch that fixes a smb bug that can cause short reads when copying files + +* Tue Feb 12 2008 Alexander Larsson - 0.1.7-2 +- Fix double free in hal volume monitor +- Ensure gconf module is built by adding build dep + +* Mon Feb 11 2008 Matthias Clasen - 0.1.7-1 +- Update to 0.1.7 + +* Tue Jan 29 2008 Matthias Clasen - 0.1.6-1 +- Update to 0.1.6 + +* Mon Jan 28 2008 Matthias Clasen - 0.1.5-1 +- Update to 0.1.5 +- Reenable http/dav + +* Mon Jan 21 2008 Alexander Larsson - 0.1.4-2 +- Remove the http/dav stuff for now, as we don't have the latest libsoup + +* Mon Jan 21 2008 Alexander Larsson - 0.1.4-1 +- Update to 0.1.4 +- Send USR1 in post to reload config + +* Mon Jan 14 2008 Matthias Clasen 0.1.2-1 +- Update to 0.1.2 + +* Tue Jan 8 2008 Matthias Clasen 0.1.1-1 +- Update to 0.1.1 + +* Thu Dec 20 2007 Matthias Clasen 0.1.0-1 +- Initial packaging diff --git a/gvfsdaemon-Check-that-the-connecting-client-is-the-s.patch b/gvfsdaemon-Check-that-the-connecting-client-is-the-s.patch new file mode 100644 index 0000000..cebad56 --- /dev/null +++ b/gvfsdaemon-Check-that-the-connecting-client-is-the-s.patch @@ -0,0 +1,92 @@ +From e3808a1b4042761055b1d975333a8243d67b8bfe Mon Sep 17 00:00:00 2001 +From: Simon McVittie +Date: Wed, 5 Jun 2019 13:33:38 +0100 +Subject: [PATCH] gvfsdaemon: Check that the connecting client is the same user + +Otherwise, an attacker who learns the abstract socket address from +netstat(8) or similar could connect to it and issue D-Bus method +calls. + +Signed-off-by: Simon McVittie +--- + daemon/gvfsdaemon.c | 36 +++++++++++++++++++++++++++++++++++- + 1 file changed, 35 insertions(+), 1 deletion(-) + +diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c +index 406d4f8e..be148a7b 100644 +--- a/daemon/gvfsdaemon.c ++++ b/daemon/gvfsdaemon.c +@@ -79,6 +79,7 @@ struct _GVfsDaemon + + gint mount_counter; + ++ GDBusAuthObserver *auth_observer; + GDBusConnection *conn; + GVfsDBusDaemon *daemon_skeleton; + GVfsDBusMountable *mountable_skeleton; +@@ -171,6 +172,8 @@ g_vfs_daemon_finalize (GObject *object) + } + if (daemon->conn != NULL) + g_object_unref (daemon->conn); ++ if (daemon->auth_observer != NULL) ++ g_object_unref (daemon->auth_observer); + + g_hash_table_destroy (daemon->registered_paths); + g_hash_table_destroy (daemon->client_connections); +@@ -236,6 +239,35 @@ name_vanished_handler (GDBusConnection *connection, + daemon->lost_main_daemon = TRUE; + } + ++/* ++ * Authentication observer signal handler that authorizes connections ++ * from the same uid as this process. This matches the behaviour of a ++ * libdbus DBusServer/DBusConnection when no DBusAllowUnixUserFunction ++ * has been set, but is not the default in GDBus. ++ */ ++static gboolean ++authorize_authenticated_peer_cb (GDBusAuthObserver *observer, ++ G_GNUC_UNUSED GIOStream *stream, ++ GCredentials *credentials, ++ G_GNUC_UNUSED gpointer user_data) ++{ ++ gboolean authorized = FALSE; ++ ++ if (credentials != NULL) ++ { ++ GCredentials *own_credentials; ++ ++ own_credentials = g_credentials_new (); ++ ++ if (g_credentials_is_same_user (credentials, own_credentials, NULL)) ++ authorized = TRUE; ++ ++ g_object_unref (own_credentials); ++ } ++ ++ return authorized; ++} ++ + static void + g_vfs_daemon_init (GVfsDaemon *daemon) + { +@@ -265,6 +297,8 @@ g_vfs_daemon_init (GVfsDaemon *daemon) + + daemon->conn = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); + g_assert (daemon->conn != NULL); ++ daemon->auth_observer = g_dbus_auth_observer_new (); ++ g_signal_connect (daemon->auth_observer, "authorize-authenticated-peer", G_CALLBACK (authorize_authenticated_peer_cb), NULL); + + daemon->daemon_skeleton = gvfs_dbus_daemon_skeleton_new (); + g_signal_connect (daemon->daemon_skeleton, "handle-get-connection", G_CALLBACK (handle_get_connection), daemon); +@@ -876,7 +910,7 @@ handle_get_connection (GVfsDBusDaemon *object, + server = g_dbus_server_new_sync (address1, + G_DBUS_SERVER_FLAGS_NONE, + guid, +- NULL, /* GDBusAuthObserver */ ++ daemon->auth_observer, + NULL, /* GCancellable */ + &error); + g_free (guid); +-- +2.21.0 + diff --git a/smb-Improve-enumeration-performance.patch b/smb-Improve-enumeration-performance.patch new file mode 100644 index 0000000..9019b0a --- /dev/null +++ b/smb-Improve-enumeration-performance.patch @@ -0,0 +1,115 @@ +diff --git a/configure.ac b/configure.ac +index daeee728..689667e5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -551,6 +551,11 @@ if test "x$enable_samba" != "xno"; then + AC_DEFINE(HAVE_SMBC_SETOPTIONPROTOCOLS, 1, [Define to 1 if smbc_setOptionProtocols() is available]), + [] + ) ++ ++ AC_CHECK_LIB(smbclient, smbc_readdirplus2, ++ AC_DEFINE(HAVE_SMBC_READDIRPLUS2, 1, [Define to 1 if smbc_readdirplus2() is available]), ++ [] ++ ) + fi + fi + +diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c +index 9571fa0d..ce151648 100644 +--- a/daemon/gvfsbackendsmb.c ++++ b/daemon/gvfsbackendsmb.c +@@ -1738,25 +1738,34 @@ do_enumerate (GVfsBackend *backend, + GFileQueryInfoFlags flags) + { + GVfsBackendSmb *op_backend = G_VFS_BACKEND_SMB (backend); +- struct stat st; +- int res; ++ struct stat st = { 0 }; + GError *error; + SMBCFILE *dir; +- char dirents[1024*4]; +- struct smbc_dirent *dirp; + GFileInfo *info; + GString *uri; +- int uri_start_len; + smbc_opendir_fn smbc_opendir; ++ smbc_closedir_fn smbc_closedir; ++#ifndef HAVE_SMBC_READDIRPLUS2 ++ int res; ++ char dirents[1024*4]; ++ struct smbc_dirent *dirp; ++ int uri_start_len; + smbc_getdents_fn smbc_getdents; + smbc_stat_fn smbc_stat; +- smbc_closedir_fn smbc_closedir; ++#else ++ smbc_readdirplus2_fn smbc_readdirplus2; ++ const struct libsmb_file_info *exstat; ++#endif + + uri = create_smb_uri_string (op_backend->server, op_backend->port, op_backend->share, filename); + + smbc_opendir = smbc_getFunctionOpendir (op_backend->smb_context); ++#ifndef HAVE_SMBC_READDIRPLUS2 + smbc_getdents = smbc_getFunctionGetdents (op_backend->smb_context); + smbc_stat = smbc_getFunctionStat (op_backend->smb_context); ++#else ++ smbc_readdirplus2 = smbc_getFunctionReaddirPlus2 (op_backend->smb_context); ++#endif + smbc_closedir = smbc_getFunctionClosedir (op_backend->smb_context); + + dir = smbc_opendir (op_backend->smb_context, uri->str); +@@ -1776,6 +1785,8 @@ do_enumerate (GVfsBackend *backend, + + if (uri->str[uri->len - 1] != '/') + g_string_append_c (uri, '/'); ++ ++#ifndef HAVE_SMBC_READDIRPLUS2 + uri_start_len = uri->len; + + while (TRUE) +@@ -1827,9 +1838,27 @@ do_enumerate (GVfsBackend *backend, + dirp = (struct smbc_dirent *) (((char *)dirp) + dirlen); + res -= dirlen; + } ++ } ++#else ++ while ((exstat = smbc_readdirplus2 (op_backend->smb_context, dir, &st)) != NULL) ++ { ++ if ((S_ISREG (st.st_mode) || ++ S_ISDIR (st.st_mode) || ++ S_ISLNK (st.st_mode)) && ++ g_strcmp0 (exstat->name, ".") != 0 && ++ g_strcmp0 (exstat->name, "..") != 0) ++ { ++ info = g_file_info_new (); ++ set_info_from_stat (op_backend, info, &st, exstat->name, matcher); ++ g_vfs_job_enumerate_add_info (job, info); ++ g_object_unref (info); ++ } ++ ++ memset (&st, 0, sizeof (struct stat)); + } +- +- res = smbc_closedir (op_backend->smb_context, dir); ++#endif ++ ++ smbc_closedir (op_backend->smb_context, dir); + + g_vfs_job_enumerate_done (job); + +diff --git a/meson.build b/meson.build +index 6ae768d9..d3f59457 100644 +--- a/meson.build ++++ b/meson.build +@@ -418,6 +418,7 @@ if enable_samba + smbclient_dep = dependency('smbclient') + + config_h.set('HAVE_SMBC_SETOPTIONPROTOCOLS', cc.has_function('smbc_setOptionProtocols', dependencies: smbclient_dep)) ++ config_h.set('HAVE_SMBC_READDIRPLUS2', cc.has_function('smbc_readdirplus2', dependencies: smbclient_dep)) + endif + + # *** Check for libarchive *** +-- +2.26.2 + diff --git a/smbbrowse-Force-NT1-protocol-version-for-workgroup-s.patch b/smbbrowse-Force-NT1-protocol-version-for-workgroup-s.patch new file mode 100644 index 0000000..4bf9934 --- /dev/null +++ b/smbbrowse-Force-NT1-protocol-version-for-workgroup-s.patch @@ -0,0 +1,89 @@ +diff --git a/configure.ac b/configure.ac +index 3b5836ff..daeee728 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -546,6 +546,11 @@ if test "x$enable_samba" != "xno"; then + if test "x$msg_samba" = "xyes"; then + PKG_CHECK_MODULES([SAMBA], [smbclient]) + AC_DEFINE([HAVE_SAMBA], 1, [Define to 1 if you have the samba libraries]) ++ ++ AC_CHECK_LIB(smbclient, smbc_setOptionProtocols, ++ AC_DEFINE(HAVE_SMBC_SETOPTIONPROTOCOLS, 1, [Define to 1 if smbc_setOptionProtocols() is available]), ++ [] ++ ) + fi + fi + +diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c +index f08d2988..3b11883e 100644 +--- a/daemon/gvfsbackendsmbbrowse.c ++++ b/daemon/gvfsbackendsmbbrowse.c +@@ -45,6 +45,7 @@ + #include "gvfskeyring.h" + #include "gmounttracker.h" + #include "gvfsbackendsmbprivate.h" ++#include "gvfsutils.h" + + #include + +@@ -847,6 +848,47 @@ do_mount (GVfsBackend *backend, + else + op_backend->server = g_strdup (op_backend->mounted_server); + ++#ifdef HAVE_SMBC_SETOPTIONPROTOCOLS ++ /* Force NT1 protocol version if server can't be resolved (i.e. is not ++ * hostname, nor IP address). This is needed for workgroup support, because ++ * "client max protocol" has been changed from NT1 to SMB3 in recent samba ++ * versions. ++ */ ++ ++ if (op_backend->server != NULL) ++ { ++ GResolver *resolver; ++ GList *addresses; ++ GError *error = NULL; ++ gchar *server; ++ ++ resolver = g_resolver_get_default (); ++ ++ /* IPv6 server includes brackets in GMountSpec, GResolver doesn't */ ++ if (gvfs_is_ipv6 (op_backend->server)) ++ server = g_strndup (op_backend->server + 1, strlen (op_backend->server) - 2); ++ else ++ server = g_strdup (op_backend->server); ++ ++ addresses = g_resolver_lookup_by_name (resolver, server, NULL, &error); ++ if (addresses == NULL) ++ { ++ if (error != NULL) ++ { ++ g_debug ("%s\n", error->message); ++ g_error_free (error); ++ } ++ ++ g_debug ("Forcing NT1 protocol version\n"); ++ smbc_setOptionProtocols (smb_context, "NT1", "NT1"); ++ } ++ ++ g_resolver_free_addresses (addresses); ++ g_object_unref (resolver); ++ g_free (server); ++ } ++#endif ++ + icon = NULL; + symbolic_icon = NULL; + if (op_backend->server == NULL) +diff --git a/meson.build b/meson.build +index 34600188..3a876172 100644 +--- a/meson.build ++++ b/meson.build +@@ -416,6 +416,8 @@ config_h.set10('HAVE_LIBUSB', enable_libusb) + enable_samba = get_option('smb') + if enable_samba + smbclient_dep = dependency('smbclient') ++ ++ config_h.set('HAVE_SMBC_SETOPTIONPROTOCOLS', cc.has_function('smbc_setOptionProtocols', dependencies: smbclient_dep)) + endif + + # *** Check for libarchive *** diff --git a/sources b/sources new file mode 100644 index 0000000..bc23b49 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gvfs-1.36.2.tar.xz) = c5ffc3d36ad1f438c245877d94924aa22c4edf9d89be0a990ad03897d462459229e576064797e53a62063f4aaf91ad30870f0b57df3731a69951f4ceb61db0db diff --git a/udisks2-Fix-crashes-caused-by-missing-source-tag.patch b/udisks2-Fix-crashes-caused-by-missing-source-tag.patch new file mode 100644 index 0000000..07c0c97 --- /dev/null +++ b/udisks2-Fix-crashes-caused-by-missing-source-tag.patch @@ -0,0 +1,29 @@ +From 38831e4ea149a0b4731d123c63d8b493d30ad0be Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Sat, 26 May 2018 08:16:02 +0200 +Subject: [PATCH] udisks2: Fix crashes caused by missing source tag + +GAsyncReadyCallback is never called from g_drive_stop, because +source_tag is not set, but checked. This obviously causes issues +for client applications. Add missing source_tag. + +Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/1 +--- + monitor/udisks2/gvfsudisks2drive.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/monitor/udisks2/gvfsudisks2drive.c b/monitor/udisks2/gvfsudisks2drive.c +index 52e9b75e..87656688 100644 +--- a/monitor/udisks2/gvfsudisks2drive.c ++++ b/monitor/udisks2/gvfsudisks2drive.c +@@ -915,6 +915,7 @@ gvfs_udisks2_drive_stop (GDrive *_drive, + GTask *task; + + task = g_task_new (drive, cancellable, callback, user_data); ++ g_task_set_source_tag (task, gvfs_udisks2_drive_stop); + + /* This information is needed in GVfsDdisks2Volume when apps have + * open files on the device ... we need to know if the button should +-- +2.23.0 + diff --git a/udisks2-Handle-lockdown-option-to-disable-writing.patch b/udisks2-Handle-lockdown-option-to-disable-writing.patch new file mode 100644 index 0000000..deb4da3 --- /dev/null +++ b/udisks2-Handle-lockdown-option-to-disable-writing.patch @@ -0,0 +1,128 @@ +From 9fdd59cfda93b508e76770146a8295d0a26b175d Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Tue, 14 May 2019 08:46:48 +0200 +Subject: [PATCH 1/3] udisks2: Handle lockdown option to disable writing + +Handle the new mount-removable-storage-devices-as-read-only option of +org.gnome.desktop.lockdown schema and mount removable devices as read-only +if enabled. +--- + monitor/udisks2/gvfsudisks2volume.c | 8 +++++ + monitor/udisks2/gvfsudisks2volumemonitor.c | 34 ++++++++++++++++++++++ + monitor/udisks2/gvfsudisks2volumemonitor.h | 1 + + 3 files changed, 43 insertions(+) + +diff --git a/monitor/udisks2/gvfsudisks2volume.c b/monitor/udisks2/gvfsudisks2volume.c +index a509b5dd..b2545058 100644 +--- a/monitor/udisks2/gvfsudisks2volume.c ++++ b/monitor/udisks2/gvfsudisks2volume.c +@@ -1093,6 +1093,7 @@ do_mount (GTask *task) + { + MountData *data = g_task_get_task_data (task); + GVariantBuilder builder; ++ GVfsUDisks2Volume *volume = g_task_get_source_object (task); + + g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); + if (data->mount_operation == NULL) +@@ -1101,6 +1102,13 @@ do_mount (GTask *task) + "{sv}", + "auth.no_user_interaction", g_variant_new_boolean (TRUE)); + } ++ if (gvfs_udisks2_volume_monitor_get_readonly_lockdown (volume->monitor)) ++ { ++ g_variant_builder_add (&builder, ++ "{sv}", ++ "options", g_variant_new_string ("ro")); ++ ++ } + udisks_filesystem_call_mount (data->filesystem_to_mount, + g_variant_builder_end (&builder), + g_task_get_cancellable (task), +diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c +index 0a5ce96e..37c81fcf 100644 +--- a/monitor/udisks2/gvfsudisks2volumemonitor.c ++++ b/monitor/udisks2/gvfsudisks2volumemonitor.c +@@ -65,6 +65,9 @@ struct _GVfsUDisks2VolumeMonitor + /* we keep volumes/mounts for blank and audio discs separate to handle e.g. mixed discs properly */ + GList *disc_volumes; + GList *disc_mounts; ++ ++ GSettings *lockdown_settings; ++ gboolean readonly_lockdown; + }; + + static UDisksClient *get_udisks_client_sync (GError **error); +@@ -140,6 +143,8 @@ gvfs_udisks2_volume_monitor_finalize (GObject *object) + g_list_free_full (monitor->disc_volumes, g_object_unref); + g_list_free_full (monitor->disc_mounts, g_object_unref); + ++ g_clear_object (&monitor->lockdown_settings); ++ + G_OBJECT_CLASS (gvfs_udisks2_volume_monitor_parent_class)->finalize (object); + } + +@@ -304,6 +309,17 @@ gvfs_udisks2_volume_monitor_constructor (GType type, + return ret; + } + ++static void ++lockdown_settings_changed (GSettings *settings, ++ gchar *key, ++ gpointer user_data) ++{ ++ GVfsUDisks2VolumeMonitor *monitor = GVFS_UDISKS2_VOLUME_MONITOR (user_data); ++ ++ monitor->readonly_lockdown = g_settings_get_boolean (settings, ++ "mount-removable-storage-devices-as-read-only"); ++} ++ + static void + gvfs_udisks2_volume_monitor_init (GVfsUDisks2VolumeMonitor *monitor) + { +@@ -325,6 +341,15 @@ gvfs_udisks2_volume_monitor_init (GVfsUDisks2VolumeMonitor *monitor) + G_CALLBACK (mountpoints_changed), + monitor); + ++ monitor->lockdown_settings = g_settings_new ("org.gnome.desktop.lockdown"); ++ monitor->readonly_lockdown = g_settings_get_boolean (monitor->lockdown_settings, ++ "mount-removable-storage-devices-as-read-only"); ++ g_signal_connect_object (monitor->lockdown_settings, ++ "changed", ++ G_CALLBACK (lockdown_settings_changed), ++ monitor, ++ 0); ++ + update_all (monitor, FALSE, TRUE); + } + +@@ -388,6 +413,15 @@ gvfs_udisks2_volume_monitor_get_gudev_client (GVfsUDisks2VolumeMonitor *monitor) + + /* ---------------------------------------------------------------------------------------------------- */ + ++gboolean ++gvfs_udisks2_volume_monitor_get_readonly_lockdown (GVfsUDisks2VolumeMonitor *monitor) ++{ ++ g_return_val_if_fail (GVFS_IS_UDISKS2_VOLUME_MONITOR (monitor), FALSE); ++ return monitor->readonly_lockdown; ++} ++ ++/* ---------------------------------------------------------------------------------------------------- */ ++ + void + gvfs_udisks2_volume_monitor_update (GVfsUDisks2VolumeMonitor *monitor) + { +diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.h b/monitor/udisks2/gvfsudisks2volumemonitor.h +index 7f0215dc..751a0236 100644 +--- a/monitor/udisks2/gvfsudisks2volumemonitor.h ++++ b/monitor/udisks2/gvfsudisks2volumemonitor.h +@@ -49,6 +49,7 @@ GVolumeMonitor *gvfs_udisks2_volume_monitor_new (void); + UDisksClient *gvfs_udisks2_volume_monitor_get_udisks_client (GVfsUDisks2VolumeMonitor *monitor); + void gvfs_udisks2_volume_monitor_update (GVfsUDisks2VolumeMonitor *monitor); + GUdevClient *gvfs_udisks2_volume_monitor_get_gudev_client (GVfsUDisks2VolumeMonitor *monitor); ++gboolean gvfs_udisks2_volume_monitor_get_readonly_lockdown (GVfsUDisks2VolumeMonitor *monitor); + + G_END_DECLS + +-- +2.21.0 +