[Pkg-utopia-commits] r1271 - in packages/unstable/gnome-volume-manager/debian: . patches

Sjoerd Simons sjoerd at alioth.debian.org
Wed Mar 14 16:15:03 CET 2007


Author: sjoerd
Date: 2007-03-14 15:15:02 +0000 (Wed, 14 Mar 2007)
New Revision: 1271

Added:
   packages/unstable/gnome-volume-manager/debian/patches/04_dont_unlock_unlocked_volumes.patch
Modified:
   packages/unstable/gnome-volume-manager/debian/changelog
Log:
* debian/patches/04_dont_unlock_unlocked_volumes.patch
  - Added. Don't ask the user to unlock already unlocked crypto volumes
  (Closes: #414417)

Modified: packages/unstable/gnome-volume-manager/debian/changelog
===================================================================
--- packages/unstable/gnome-volume-manager/debian/changelog	2007-03-14 14:10:53 UTC (rev 1270)
+++ packages/unstable/gnome-volume-manager/debian/changelog	2007-03-14 15:15:02 UTC (rev 1271)
@@ -1,3 +1,11 @@
+gnome-volume-manager (1.5.15-2) unstable; urgency=low
+
+  * debian/patches/04_dont_unlock_unlocked_volumes.patch
+    - Added. Don't ask the user to unlock already unlocked crypto volumes
+    (Closes: #414417)
+
+ -- Sjoerd Simons <sjoerd at debian.org>  Wed, 14 Mar 2007 15:42:24 +0100
+
 gnome-volume-manager (1.5.15-1) unstable; urgency=low
 
   * New upstream release 

Added: packages/unstable/gnome-volume-manager/debian/patches/04_dont_unlock_unlocked_volumes.patch
===================================================================
--- packages/unstable/gnome-volume-manager/debian/patches/04_dont_unlock_unlocked_volumes.patch	2007-03-14 14:10:53 UTC (rev 1270)
+++ packages/unstable/gnome-volume-manager/debian/patches/04_dont_unlock_unlocked_volumes.patch	2007-03-14 15:15:02 UTC (rev 1271)
@@ -0,0 +1,32 @@
+--- gnome-volume-manager-1.5.15/src/manager.c	2007-03-14 15:41:05.000000000 +0100
++++ gnome-volume-manager-1.5.15.patched/src/manager.c	2007-03-14 15:39:24.000000000 +0100
+@@ -1667,6 +1667,18 @@
+     free (udi);
+ }
+ 
++static gboolean
++crypto_unlocked(const char *udi) {
++	char **devices = NULL;
++	int num = 0;
++
++	devices = libhal_manager_find_device_string_match(hal_ctx,
++	              "volume.crypto_luks.clear.backing_volume",
++	              udi, &num, NULL);
++	libhal_free_string_array(devices);
++	return num > 0;
++}
++
+ /*
+  * gvm_device_mount_encrypted - create a passphrase dialog for an encrypted
+  * dialog and set up gvm_device_mount_encrypted_pwd_callback() as a callback.
+@@ -1678,6 +1691,10 @@
+ {
+     GksuuiDialog *dialog = GKSUUI_DIALOG (gksuui_dialog_new());
+     gtk_window_set_title (GTK_WINDOW(dialog), _("Encrypted volume detected"));
++    if (crypto_unlocked(udi)) {
++      dbg("Not trying to mount unlocked volume\n");
++      return;
++    }
+ 
+     /* if cryptsetup is not available, tell user about it */
+     if (access ("/sbin/cryptsetup", X_OK) < 0) {




More information about the Pkg-utopia-commits mailing list