From 80b9da29c3c84a8f0a12a81ba614e0de3bf88dfd93914ce01656b19cf322cfc6 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 10 Aug 2011 11:02:28 +0000 Subject: [PATCH] bnc#671276 - call umount.crypt directly OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/pam_mount?expand=0&rev=30 --- 2f8daad-call-umount-crypt-directly.diff | 41 +++++++++++++++++++++++++ eb20a26-utab-explain.diff | 31 +++++++++++++++++++ pam_mount.changes | 8 +++++ pam_mount.spec | 4 ++- 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 2f8daad-call-umount-crypt-directly.diff create mode 100644 eb20a26-utab-explain.diff diff --git a/2f8daad-call-umount-crypt-directly.diff b/2f8daad-call-umount-crypt-directly.diff new file mode 100644 index 0000000..428cb09 --- /dev/null +++ b/2f8daad-call-umount-crypt-directly.diff @@ -0,0 +1,41 @@ +parent eb20a2681362520a9728038a9ff3bdbba58eb1cb (v2.11-1-geb20a26) +commit 2f8daad6ee71bade802f78e5072410e46bfd74c1 +Author: Jan Engelhardt +Date: Wed Aug 10 12:48:49 2011 +0200 + +config: default to calling umount.crypt directly + +As long as utab (no mtab or ro mtab) is not supported, at least try to +get the user's volumes unmounted on logout. +--- + doc/changelog.txt | 1 + + src/rdconf1.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/doc/changelog.txt b/doc/changelog.txt +index d14828f..d99e52f 100644 +--- a/doc/changelog.txt ++++ b/doc/changelog.txt +@@ -3,6 +3,7 @@ For details, see the history as recorded in the git repository. + + HEAD + ==== ++config: default to calling umount.crypt directly + + + v2.11 (2011-08-07) +diff --git a/src/rdconf1.c b/src/rdconf1.c +index 37b465c..e64df06 100644 +--- a/src/rdconf1.c ++++ b/src/rdconf1.c +@@ -1367,7 +1367,7 @@ static const struct pmt_command default_command[] = { + {CMD_NFSMOUNT, "nfs4"}, + {CMD_LCLMOUNT, NULL, {"mount", "-p0", "%(if %(OPTIONS),-o%(OPTIONS))", "-t%(FSTYPE)", "%(VOLUME)", "%(MNTPT)", NULL}}, + {CMD_CRYPTMOUNT, "crypt", {"mount", "-t", "crypt", "%(if %(CIPHER),-ocipher=%(CIPHER))", "%(if %(FSKEYCIPHER),-ofsk_cipher=%(FSKEYCIPHER))", "%(if %(FSKEYHASH),-ofsk_hash=%(FSKEYHASH))", "%(if %(FSKEYPATH),-okeyfile=%(FSKEYPATH))", "%(if %(OPTIONS),-o%(OPTIONS))", "%(VOLUME)", "%(MNTPT)", NULL}}, +- {CMD_CRYPTUMOUNT, "crypt", {"umount", "%(MNTPT)", NULL}}, ++ {CMD_CRYPTUMOUNT, "crypt", {"umount.crypt", "%(MNTPT)", NULL}}, + {CMD_UMOUNT, NULL, {"umount", "%(MNTPT)", NULL}}, + {CMD_FSCK, NULL, {"fsck", "-p", "%(FSCKTARGET)", NULL}}, + {CMD_PMVARRUN, NULL, {"pmvarrun", "-u", "%(USER)", "-o", "%(OPERATION)", NULL}}, +-- +# Created with git-export-patch diff --git a/eb20a26-utab-explain.diff b/eb20a26-utab-explain.diff new file mode 100644 index 0000000..2b391ef --- /dev/null +++ b/eb20a26-utab-explain.diff @@ -0,0 +1,31 @@ +parent ebeca48d6740cc18dcb4bac15f19b5808c67ae72 (v2.11) +commit eb20a2681362520a9728038a9ff3bdbba58eb1cb +Author: Jan Engelhardt +Date: Wed Aug 10 12:48:44 2011 +0200 + +mount.crypt: clarify situation about current absence of utab support +--- + src/mtcrypt.c | 8 +++++--- + 1 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/mtcrypt.c b/src/mtcrypt.c +index b416dc3..d74a07c 100644 +--- a/src/mtcrypt.c ++++ b/src/mtcrypt.c +@@ -674,9 +674,11 @@ int main(int argc, const char **argv) + int ret; + + if (stat("/etc/mtab", &sb) == 0 && (sb.st_mode & S_IWUGO) == 0) +- fprintf(stderr, "BIG FAT WARNING: This version of mount.crypt " +- "does not support unmounting crypto volumes through " +- "umount(8) on systems with read-only mtab yet.\n"); ++ fprintf(stderr, "NOTE: mount.crypt does not support utab " ++ "(systems with no mtab or read-only mtab) yet. This " ++ "means that you will temporarily need to call " ++ "umount.crypt(8) rather than umount(8) to get crypto " ++ "volumes unmounted.\n"); + + ret = HX_init(); + if (ret <= 0) { +-- +# Created with git-export-patch diff --git a/pam_mount.changes b/pam_mount.changes index 44d5e5f..810842a 100644 --- a/pam_mount.changes +++ b/pam_mount.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 10 11:00:29 UTC 2011 - jengelh@medozas.de + +- Add commit 2f8daad from upstream - call umount.crypt directly + from pam_mount.so while mount.crypt is having no support for + utab (bnc#671276); also add commit eb20a26 for better wording of + this situation. + ------------------------------------------------------------------- Sun Aug 7 00:09:17 UTC 2011 - jengelh@medozas.de diff --git a/pam_mount.spec b/pam_mount.spec index 34926c6..f4e3034 100644 --- a/pam_mount.spec +++ b/pam_mount.spec @@ -42,6 +42,8 @@ Source2: convert_keyhash.pl Source3: mount.crypt Source5: baselibs.conf Patch1: pam_mount-0.47-enable-logout-kill.dif +Patch2: eb20a26-utab-explain.diff +Patch3: 2f8daad-call-umount-crypt-directly.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://pam-mount.sf.net/ Requires(post): coreutils, perl-XML-Writer, perl-XML-Parser @@ -63,7 +65,7 @@ Author(s): %prep %setup -q -%patch1 -p1 +%patch -P 1 -P 2 -P 3 -p1 %build %configure --with-slibdir=/%_lib %{?_with_selinux:--with-selinux}