Package: cryptkeeper Version: 0.9.5-5.1 Severity: normal Tags: patch Dear Maintainer,
cryptkeeper does not unmount volumes when exiting. It just leaves them mounted and the user has to unmount them manually using 'fusermount -u'. I've included a patch (my first one, I hope it's right) to solve this issue. Thanks! -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.10-2-amd64 (SMP w/4 CPU cores) Locale: LANG=es_ES.utf8, LC_CTYPE=es_ES.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages cryptkeeper depends on: ii encfs 1.7.4-2.4+b2 ii fuse 2.9.2-4 ii gconf-service 3.2.6-1 ii libatk1.0-0 2.8.0-2 ii libc6 2.17-92+b1 ii libcairo2 1.12.14-4 ii libfontconfig1 2.10.2-2 ii libfreetype6 2.4.9-1.1 ii libgcc1 1:4.8.1-10 ii libgconf-2-4 3.2.6-1 ii libgdk-pixbuf2.0-0 2.28.2-1 ii libglib2.0-0 2.36.4-1 ii libgtk2.0-0 2.24.20-1 ii libpango1.0-0 1.32.5-5+b1 ii libstdc++6 4.8.1-10 ii libx11-6 2:1.6.1-1 ii zenity 3.8.0-1 cryptkeeper recommends no packages. cryptkeeper suggests no packages. -- no debconf information
diff -Nru cryptkeeper-0.9.5/debian/changelog cryptkeeper-0.9.5/debian/changelog --- cryptkeeper-0.9.5/debian/changelog 2012-05-15 17:10:31.000000000 +0200 +++ cryptkeeper-0.9.5/debian/changelog 2013-09-22 11:32:50.000000000 +0200 @@ -1,3 +1,10 @@ +cryptkeeper (0.9.5-5.2) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix not unmounting of encrypted volumes when exiting. + + -- Eugenio M. Vigo <emv...@gmail.com> Sun, 22 Sep 2013 11:31:53 +0200 + cryptkeeper (0.9.5-5.1) unstable; urgency=low * Non-maintainer upload. diff -Nru cryptkeeper-0.9.5/debian/patches/fix-unmount.patch cryptkeeper-0.9.5/debian/patches/fix-unmount.patch --- cryptkeeper-0.9.5/debian/patches/fix-unmount.patch 1970-01-01 01:00:00.000000000 +0100 +++ cryptkeeper-0.9.5/debian/patches/fix-unmount.patch 2013-09-22 11:42:14.000000000 +0200 @@ -0,0 +1,103 @@ +Index: cryptkeeper-0.9.5/src/main.cpp +=================================================================== +--- cryptkeeper-0.9.5.orig/src/main.cpp 2013-09-22 11:35:23.946721564 +0200 ++++ cryptkeeper-0.9.5/src/main.cpp 2013-09-22 11:41:55.870705082 +0200 +@@ -149,7 +149,7 @@ + static bool unmount_cryptpoint (int idx) + { + CryptPoint *cp = &cryptPoints[idx]; +- ++ + if (cp->GetIsMounted () == false) return true; + + int result = !encfs_stash_unmount (cp->GetMountDir ()); +@@ -455,8 +455,48 @@ + gtk_widget_destroy (dialog); + } + ++static void on_exit () ++{ ++ int i = 0; ++ std::vector<CryptPoint>::iterator it; ++ for (it = cryptPoints.begin (); it != cryptPoints.end (); ++it, ++i) { ++ if (it->GetIsMounted()){ ++ if (!unmount_cryptpoint (i)) { ++ moan_cant_unmount (it->GetMountDir()); ++ } ++ } ++ } ++ gtk_main_quit(); ++} ++ ++static void update_mounted() ++{ ++ int i = 0; ++ std::vector<CryptPoint>::iterator it; ++ // find out which ones are mounted ++ for (it = cryptPoints.begin (); it != cryptPoints.end (); ++it, i++) { ++ struct stat s; ++ ++ (*it).SetIsMounted (false); ++ (*it).SetIsAvailable (false); ++ ++ if (stat ((*it).GetCryptDir (), &s) != -1) { ++ if (S_ISDIR (s.st_mode)) (*it).SetIsAvailable (true); ++ } ++ ++ // to get rid of festering mount points ++ if (!config_keep_mountpoints) rmdir ((*it).GetMountDir ()); ++ ++ if (is_mounted((*it).GetMountDir())) { ++ if (S_ISDIR (s.st_mode)) (*it).SetIsMounted (true); ++ } ++ } ++} ++ + static void sico_right_button_activated () + { ++ update_mounted(); ++ + GtkWidget *menu = gtk_menu_new (); + + GtkWidget *mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_PREFERENCES, NULL); +@@ -468,7 +508,7 @@ + gtk_menu_append (GTK_MENU (menu), mi); + + mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT, NULL); +- g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (gtk_exit), NULL); ++ g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (on_exit), NULL); + gtk_menu_append (GTK_MENU (menu), mi); + + gtk_widget_show_all (menu); +@@ -488,28 +528,10 @@ + gtk_widget_set_sensitive (mi, FALSE); + gtk_menu_append (stashes_popup_menu, mi); + +- int i = 0; +- std::vector<CryptPoint>::iterator it; +- // find out which ones are mounted +- for (it = cryptPoints.begin (); it != cryptPoints.end (); ++it, i++) { +- struct stat s; +- +- (*it).SetIsMounted (false); +- (*it).SetIsAvailable (false); +- +- if (stat ((*it).GetCryptDir (), &s) != -1) { +- if (S_ISDIR (s.st_mode)) (*it).SetIsAvailable (true); +- } +- +- // to get rid of festering mount points +- if (!config_keep_mountpoints) rmdir ((*it).GetMountDir ()); +- +- if (is_mounted((*it).GetMountDir())) { +- if (S_ISDIR (s.st_mode)) (*it).SetIsMounted (true); +- } +- } ++ update_mounted(); + +- i = 0; ++ int i = 0; ++ std::vector<CryptPoint>::iterator it; + for (it = cryptPoints.begin (); it != cryptPoints.end (); ++it, i++) { + mi = gtk_check_menu_item_new (); + char buf[256]; diff -Nru cryptkeeper-0.9.5/debian/patches/series cryptkeeper-0.9.5/debian/patches/series --- cryptkeeper-0.9.5/debian/patches/series 2012-05-15 17:09:01.000000000 +0200 +++ cryptkeeper-0.9.5/debian/patches/series 2013-09-22 11:38:47.000000000 +0200 @@ -3,3 +3,4 @@ binutils-gold.diff kfreebsd.patch fix-ftbfs-gcc-4.7-672010.patch +fix-unmount.patch