rpms/gvfs/devel gvfs-non-interactive-mounts.patch, NONE, 1.1 gvfs.spec, 1.152, 1.153
Matthias Clasen
mclasen at fedoraproject.org
Thu Aug 27 02:45:17 UTC 2009
- Previous message (by thread): rpms/koffice-langpack/devel .cvsignore, 1.17, 1.18 koffice-langpack.spec, 1.23, 1.24 sources, 1.18, 1.19
- Next message (by thread): rpms/alexandria/F-10 alexandria-0.6.5-deastore-author-missing.patch, NONE, 1.1 alexandria.spec, 1.29, 1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/pkgs/rpms/gvfs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21439
Modified Files:
gvfs.spec
Added Files:
gvfs-non-interactive-mounts.patch
Log Message:
don't mount interactively during login
gvfs-non-interactive-mounts.patch:
configure.ac | 2 -
monitor/gdu/ggduvolume.c | 75 +++++++++++++----------------------------------
2 files changed, 22 insertions(+), 55 deletions(-)
--- NEW FILE gvfs-non-interactive-mounts.patch ---
diff --git a/configure.ac b/configure.ac
index 9bfb8ad..887cf95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,7 +236,7 @@ AC_ARG_ENABLE(gdu, [ --disable-gdu build without GDU volume monitor])
msg_gdu=no
GDU_LIBS=
GDU_CFLAGS=
-GDU_REQUIRED=0.4
+GDU_REQUIRED=0.5
if test "x$enable_gdu" != "xno"; then
PKG_CHECK_EXISTS([gdu >= $GDU_REQUIRED], msg_gdu=yes)
diff --git a/monitor/gdu/ggduvolume.c b/monitor/gdu/ggduvolume.c
index a20b0bb..865a7b7 100644
--- a/monitor/gdu/ggduvolume.c
+++ b/monitor/gdu/ggduvolume.c
@@ -337,51 +337,12 @@ update_volume (GGduVolume *volume)
volume->should_automount = FALSE;
}
- /* Avoid automounting volumes from
- *
- * 1. drives on a 'virtual' or unset bus
- * 2. volumes without a drive
- *
- * This is to avoid interference with things like Fedora's
- * livecd-tools that use device-mapper to set up images. See
- * https://bugzilla.redhat.com/show_bug.cgi?id=494144 for more
- * background.
- *
- * In the future we might want to relax 1. so automounting
- * things like Linux MD and LVM2 devices work.
+ /* Respect the presentation hint for whether the volume should be automounted - normally
+ * nopolicy is only FALSE for "physical" devices - e.g. only "physical" devices will
+ * be set to be automounted.
*/
- if (volume->drive != NULL)
- {
- GduPresentable *drive_presentable;
- drive_presentable = g_gdu_drive_get_presentable (volume->drive);
- if (drive_presentable != NULL)
- {
- GduDevice *drive_device;
- drive_device = gdu_presentable_get_device (drive_presentable);
- if (drive_device != NULL)
- {
- const gchar *bus;
- bus = gdu_device_drive_get_connection_interface (drive_device);
- if (bus == NULL || strlen (bus) == 0 || g_strcmp0 (bus, "virtual") == 0)
- {
- volume->should_automount = FALSE;
- }
- g_object_unref (drive_device);
- }
- else
- {
- volume->should_automount = FALSE;
- }
- }
- else
- {
- volume->should_automount = FALSE;
- }
- }
- else
- {
- volume->should_automount = FALSE;
- }
+ if (gdu_device_get_presentation_nopolicy (device))
+ volume->should_automount = FALSE;
g_free (activation_uri);
}
@@ -650,22 +611,28 @@ g_gdu_volume_get_mount (GVolume *volume)
/* ---------------------------------------------------------------------------------------------------- */
static gchar **
-get_mount_options (GduDevice *device)
+get_mount_options (GduDevice *device,
+ gboolean allow_user_interaction)
{
- gchar **ret;
+ GPtrArray *p;
+
+ p = g_ptr_array_new ();
/* one day we might read this from user settings */
if (g_strcmp0 (gdu_device_id_get_usage (device), "filesystem") == 0 &&
g_strcmp0 (gdu_device_id_get_type (device), "vfat") == 0)
{
- ret = g_new0 (gchar *, 2);
- ret[0] = g_strdup ("flush");
- ret[1] = NULL;
+ g_ptr_array_add (p, g_strdup ("flush"));
}
- else
- ret = NULL;
- return ret;
+ if (!allow_user_interaction)
+ {
+ g_ptr_array_add (p, g_strdup ("auth_no_user_interaction"));
+ }
+
+ g_ptr_array_add (p, NULL);
+
+ return (gchar **) g_ptr_array_free (p, FALSE);
}
/* ---------------------------------------------------------------------------------------------------- */
@@ -787,7 +754,7 @@ mount_cleartext_device (MountOpData *data,
else
{
gchar **mount_options;
- mount_options = get_mount_options (data->device_to_mount);
+ mount_options = get_mount_options (data->device_to_mount, data->mount_operation != NULL);
gdu_device_op_filesystem_mount (data->device_to_mount, mount_options, mount_cb, data);
g_strfreev (mount_options);
}
@@ -1205,7 +1172,7 @@ g_gdu_volume_mount (GVolume *_volume,
{
gchar **mount_options;
data->device_to_mount = g_object_ref (device);
- mount_options = get_mount_options (data->device_to_mount);
+ mount_options = get_mount_options (data->device_to_mount, data->mount_operation != NULL);
gdu_device_op_filesystem_mount (data->device_to_mount, mount_options, mount_cb, data);
g_strfreev (mount_options);
}
Index: gvfs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gvfs/devel/gvfs.spec,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -p -r1.152 -r1.153
--- gvfs.spec 24 Aug 2009 22:46:44 -0000 1.152
+++ gvfs.spec 27 Aug 2009 02:45:16 -0000 1.153
@@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.3.5
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -38,6 +38,8 @@ Patch1: gvfs-archive-integration.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=591005
Patch10: 0001-Add-AFC-backend.patch
+Patch11: gvfs-non-interactive-mounts.patch
+
%description
The gvfs package provides backend implementations for the gio
framework in GLib. It includes ftp, sftp, cifs.
@@ -130,6 +132,7 @@ and iPod Touches to applications using g
%setup -q
%patch1 -p1 -b .archive-integration
%patch10 -p1 -b .afc
+%patch11 -p1 -b .non-interactive-mounts
%build
@@ -283,7 +286,10 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
%changelog
-* Mon Aug 24 2009 Matthias Clasne <mclasen at redhat.com> - 1.3.5-1
+* Wed Aug 26 2009 Matthias Clasen <mclasen at redhat.com> - 1.3.5-2
+- Don't mount interactively during login
+
+* Mon Aug 24 2009 Matthias Clasen <mclasen at redhat.com> - 1.3.5-1
- Update to 1.3.5
* Mon Aug 17 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.3.4-7
- Previous message (by thread): rpms/koffice-langpack/devel .cvsignore, 1.17, 1.18 koffice-langpack.spec, 1.23, 1.24 sources, 1.18, 1.19
- Next message (by thread): rpms/alexandria/F-10 alexandria-0.6.5-deastore-author-missing.patch, NONE, 1.1 alexandria.spec, 1.29, 1.30
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list