rpms/gnome-mount/devel gnome-mount-no-passphrase-dialog-on-interface-locked.patch, NONE, 1.1 gnome-mount.spec, 1.39, 1.40

David Zeuthen (davidz) fedora-extras-commits at redhat.com
Mon Apr 7 17:05:21 UTC 2008


Author: davidz

Update of /cvs/pkgs/rpms/gnome-mount/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28346

Modified Files:
	gnome-mount.spec 
Added Files:
	gnome-mount-no-passphrase-dialog-on-interface-locked.patch 
Log Message:
* Mon Apr  7 2008 David Zeuthen <davidz at redhat.com> - 0.8-0.svn20080225.5%{?dist}
- don't show passprhase dialog for LUKS devices if HAL is locked (#437309)



gnome-mount-no-passphrase-dialog-on-interface-locked.patch:

--- NEW FILE gnome-mount-no-passphrase-dialog-on-interface-locked.patch ---
Index: src/gnome-mount.c
===================================================================
--- src/gnome-mount.c	(revision 163)
+++ src/gnome-mount.c	(working copy)
@@ -2258,7 +2258,7 @@
 		gnome_password_dialog_set_password (GNOME_PASSWORD_DIALOG (dialog), keyring_password);
 	}
 
-	gtk_widget_show (dialog);
+	gtk_window_present (GTK_WINDOW (dialog));
 
 	if (gnome_password_dialog_run_and_block (GNOME_PASSWORD_DIALOG (dialog)))
 	{
@@ -3051,15 +3051,28 @@
                                 if (opt_verbose)
                                         g_message (_("Crypto volume '%s' is already setup with clear volume '%s'"), 
                                                    udi, clear_udi);
-				
+
 				free (clear_udi);
 				goto out;
 			}
-			
+
+                        /* don't prompt for password if the device is locked
+                         * (e.g. https://bugzilla.redhat.com/show_bug.cgi?id=437309 )
+                         */
+                        if (libhal_device_is_locked_by_others (hal_ctx,
+                                                               libhal_volume_get_udi (volume),
+                                                               "org.freedesktop.Hal.Device.Storage",
+                                                               NULL)) {
+                                if (opt_verbose)
+                                        g_message (_("Crypto device %s is locked"),
+                                                   libhal_volume_get_udi (volume));
+                                goto out;
+                        }
+
 			g_debug ("Crypto volume - UDI '%s'", udi);
-			
+
 			setup_success = FALSE;
-			
+
 			/* we need this to catch when the cleartext device is added */
 			crypto_setup_backing_udi = udi;
 			libhal_ctx_set_device_added (hal_ctx, crypto_setup_device_added);


Index: gnome-mount.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-mount/devel/gnome-mount.spec,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- gnome-mount.spec	25 Feb 2008 22:55:48 -0000	1.39
+++ gnome-mount.spec	7 Apr 2008 17:04:18 -0000	1.40
@@ -1,7 +1,7 @@
 Summary: Mount replacement which uses HAL to do the mounting 
 Name: gnome-mount
 Version: 0.8
-Release: 0.svn20080225.4%{?dist} 
+Release: 0.svn20080225.5%{?dist} 
 License: GPLv2+
 Group: Applications/System
 Source: http://hal.freedesktop.org/releases/%{name}-%{version}.svn20080225.tar.gz
@@ -26,6 +26,8 @@
 Requires(post): GConf2 >= 2.14
 Requires(preun): GConf2 >= 2.14
 
+Patch: gnome-mount-no-passphrase-dialog-on-interface-locked.patch
+
 %description
 A replacement for the mount, umount and eject commands that
 uses HAL to do all the heavy lifting.
@@ -53,6 +55,7 @@
 rm -rf $RPM_BUILD_ROOT
 
 %setup -q 
+%patch0 -p0 -b .locked
 
 %build
 
@@ -106,6 +109,9 @@
 %{_libdir}/nautilus/extensions-2.0/libgnome-mount.so
 
 %changelog
+* Mon Apr  7 2008 David Zeuthen <davidz at redhat.com> - 0.8-0.svn20080225.5%{?dist}
+- don't show passprhase dialog for LUKS devices if HAL is locked (#437309)
+
 * Mon Feb 25 2008 David Zeuthen <davidz at redhat.com> - 0.8-0.svn20080225.4%{?dist}
 - Update Nautilus extension dir
 




More information about the scm-commits mailing list