From d505cd46ea28f953301d017517739856e466f2fd Mon Sep 17 00:00:00 2001 From: Richard Penney Date: Mon, 2 Jan 2023 10:18:23 +0000 Subject: [PATCH] Rebased against release 6.2.0 (b00627e7) --- .gitignore | 1 + ChangeLog | 2 ++ RELNOTES | 28 +++++++++++++++-- configure.ac | 4 +-- cryptmount.spec | 10 +++--- debian/changelog | 7 +++++ debian/copyright | 2 +- debian/mkDebPkg | 2 +- dmutils.c | 21 ++++++++----- man/cryptmount-setup.8.in | 4 +-- man/cryptmount.8.in | 2 +- testing/mudslinger.in | 66 +++++++++++++++++++++++++++------------ 12 files changed, 108 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index 757b39d..74281c0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ man/*/Makefile po/Makefile po/Makefile.in +po/messages.mo po/POTFILES po/stamp-po po/*.gmo diff --git a/ChangeLog b/ChangeLog index a7f9a31..d243425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ ChangeLog for cryptmount (http://cryptmount.sourceforge.net) +07Jan23 - *** cryptmount-6.2 released + 02Jan23 - Enabled libudev by default 20Dec22 - Updated various maintainer URLs to point to github.com diff --git a/RELNOTES b/RELNOTES index 846631a..ab939f4 100644 --- a/RELNOTES +++ b/RELNOTES @@ -1,6 +1,6 @@ - Release notes for cryptmount-6.1.1 + Release notes for cryptmount-6.2 - RW Penney, December 2022 + RW Penney, January 2023 Introduction ============ @@ -26,6 +26,30 @@ control over the configuration and mounting of encrypted filesystems, especially within system start-up scripts. +Summary of new features in cryptmount-6.2 +========================================= + +This (stable) release offers the following improvements: + + * More robust handshaking on device setup using libudev + +It has been tested on the following systems: + + * Arch Linux (early-Jan-2023) (x86_64) + + * Debian GNU/Linux 12.x ("bookworm"/"testing", early-Jan-2023) (amd64) + + * Debian GNU/Linux 11.6 ("bullseye") (amd64) + + * Debian GNU/Linux 10.13 ("buster") (x86) + + * Fedora 37 (x86_64) + + * openSUSE Leap 15.4 (x86_64) + + * Ubuntu 22.10 ("kinetic") (x86_64) + + Summary of new features in cryptmount-6.1 ========================================= diff --git a/configure.ac b/configure.ac index 7c54637..89b3398 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,9 @@ dnl autoconf script for cryptmount -dnl (C)Copyright 2005-2022, RW Penney +dnl (C)Copyright 2005-2023, RW Penney dnl run 'aclocal; autoconf; automake -a -c -i; ./configure; make' -AC_INIT(cryptmount, 6.2-beta, cryptmount@rwpenney.uk) +AC_INIT(cryptmount, 6.2.0, cryptmount@rwpenney.uk) AC_PREREQ(2.59) test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc diff --git a/cryptmount.spec b/cryptmount.spec index c2b6524..96c20da 100644 --- a/cryptmount.spec +++ b/cryptmount.spec @@ -4,7 +4,7 @@ # Summary: Let ordinary users mount an encrypted file system Name: cryptmount -Version: 6.1.1 +Version: 6.2.0 Release: 1%{?dist} License: GPL URL: http://cryptmount.sourceforge.net @@ -13,7 +13,7 @@ Source0: http://sourceforge.net/projects/cryptmount/files/cryptmount-%{version}/ %if 0%{?fedora} #{ # Fedora -BuildRequires: cryptsetup-devel libgcrypt-devel +BuildRequires: cryptsetup-devel libgcrypt-devel systemd-devel Requires: cryptsetup-libs libgcrypt device-mapper #} %else @@ -22,7 +22,7 @@ Requires: cryptsetup-libs libgcrypt device-mapper #{ # RHEL, CentOS %if 0%{?rhl} >= 7 -BuildRequires: cryptsetup-devel libgcrypt-devel +BuildRequires: cryptsetup-devel libgcrypt-devel systemd-devel Requires: cryptsetup-libs libgcrypt device-mapper %else BuildRequires: cryptsetup-luks-devel libgcrypt-devel @@ -76,7 +76,7 @@ device-mapper and loopback devices before mounting. %files -f %{name}.lang %defattr(-, root, root, 0755) -%doc AUTHORS ChangeLog COPYING NEWS README* RELNOTES ToDo +%doc AUTHORS ChangeLog COPYING README* RELNOTES %doc %{_mandir}/man5/cmtab.5* %doc %{_mandir}/man8/cryptmount*.8* %doc %{_mandir}/*/man5/cmtab.5* @@ -100,6 +100,8 @@ fi %changelog +* Sat Jan 07 2023 RW Penney - 6.2 + -- Enabled libudev by default * Sat Oct 08 2022 RW Penney - 6.1 -- Refreshed installation documentation and inter-process locking * Sat Sep 03 2022 RW Penney - 6.0 diff --git a/debian/changelog b/debian/changelog index dc5214b..ab1d879 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +cryptmount (6.2.0-1) unstable; urgency=low + + * New upstream release + - migrated device-setup handshaking using libudev + + -- RW Penney Sat, 07 Jan 2023 09:15:00 +0000 + cryptmount (6.1.0-1) unstable; urgency=low * New upstream release diff --git a/debian/copyright b/debian/copyright index 0c84b00..4a04c79 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,7 +5,7 @@ Source: https://github.com/rwpenney/cryptmount License: GPL-2+ Files: * -Copyright: (C) 2005 - 2022 RW Penney +Copyright: (C) 2005 - 2023 RW Penney License: GPL-2+ Files: blowfish.c blowfish.h diff --git a/debian/mkDebPkg b/debian/mkDebPkg index 334c728..1d1b748 100755 --- a/debian/mkDebPkg +++ b/debian/mkDebPkg @@ -42,7 +42,7 @@ if [ -z "${PSEUDO_VERSION}" ]; then PSEUDO_VERSION="${VERSION}" fi -SRCPKG="${UPSDIR}/${PACKAGE}-${VERSION}.tar.gz" +SRCPKG=`realpath ${UPSDIR}`/"${PACKAGE}-${VERSION}.tar.gz" if [ ! -r "${SRCPKG}" ]; then echo "Upstream package ${SRCPKG} is not readable" exit 1 diff --git a/dmutils.c b/dmutils.c index 56cf66d..cc30c93 100644 --- a/dmutils.c +++ b/dmutils.c @@ -49,6 +49,8 @@ #include "dmutils.h" +#if !HAVE_LIBUDEV + struct udev_queue_loc { const char *path; int is_file; @@ -61,6 +63,8 @@ struct udev_queue_loc { int udev_queue_size(const char *path); int udev_active_dir(const char *path, time_t starttime, double timeout); +#endif // !HAVE_LIBUDEV + struct dm_task *devmap_prepare(int type, const char *ident) /*! Prepare device-mapper task structure */ @@ -248,19 +252,20 @@ int is_configured(const char *ident, struct dm_info *dminfo) int udev_settle() /*! Allow time for udev events to be processed */ -{ struct udev_queue_loc *udev_mode; - double totdelay = 0.0; +{ double totdelay = 0.0; time_t starttime; +#if HAVE_LIBUDEV + struct udev *udev_ctx; + struct udev_queue *udev_qu; +#else + struct udev_queue_loc *udev_mode; struct stat sbuff; +#endif #if HAVE_NANOSLEEP struct timespec delay; #endif int inc_ms = 250, settling = 1; const double timeout = 10.0; -#if HAVE_LIBUDEV - struct udev *udev_ctx; - struct udev_queue *udev_qu; -#endif /* This routine mitigates apparent race-conditions * between udev events which may temporarily take ownership of @@ -277,14 +282,14 @@ int udev_settle() udev_ctx = udev_new(); //udev_selinux_init(udev_ctx); udev_qu = udev_queue_new(udev_ctx); -#endif - +#else /* Try to find location and type of udev event queue: */ udev_mode = udev_queue_locations; while (udev_mode->is_file) { if (stat(udev_mode->path, &sbuff) == 0) break; ++udev_mode; } +#endif /* Keep waiting until there are no more queued udev events: */ do { diff --git a/man/cryptmount-setup.8.in b/man/cryptmount-setup.8.in index ce7f744..5cafe42 100644 --- a/man/cryptmount-setup.8.in +++ b/man/cryptmount-setup.8.in @@ -1,7 +1,7 @@ .\" cryptmount-setup manual page .\" (C)Copyright 2007-2023 RW Penney .\" -.TH CRYPTMOUNT-SETUP 8 "2018-01-18" "@PACKAGE_VERSION@" "User commands" +.TH CRYPTMOUNT-SETUP 8 "2023-01-07" "@PACKAGE_VERSION@" "User commands" .SH NAME cryptmount-setup \- setup a new encrypted filesystem @@ -21,7 +21,7 @@ an encrypted filesystem, to be managed by If run by the superuser, .B cryptmount-setup -will allow a basic encrypted filesystem to be created +will allow a basic LUKS-encrypted filesystem to be created within an ordinary file. The size, location, mount-point and ownership of the filesystem can be selected interactively. diff --git a/man/cryptmount.8.in b/man/cryptmount.8.in index 1589d2d..6678143 100644 --- a/man/cryptmount.8.in +++ b/man/cryptmount.8.in @@ -1,7 +1,7 @@ .\" cryptmount manual page .\" (C)Copyright 2005-2023 RW Penney .\" -.TH CRYPTMOUNT 8 "2022-09-03" "@PACKAGE_VERSION@" "User commands" +.TH CRYPTMOUNT 8 "2023-01-07" "@PACKAGE_VERSION@" "User commands" .SH NAME cryptmount \- mount/unmount/configure an encrypted filesystem diff --git a/testing/mudslinger.in b/testing/mudslinger.in index 37708e0..41304d9 100755 --- a/testing/mudslinger.in +++ b/testing/mudslinger.in @@ -18,9 +18,21 @@ DATEFMT="+%d%b%y-%H:%M:%S" function listLoopDevs() { # Find free loopback devices least likely to be selected by 'losetup -f' - ${LOSETUP} -f > /dev/null + + # Make sure device driver has at least two slots available: + dummy_lf="${TMPDIR}/dummy_loop" + ${DD} if=/dev/zero of="${dummy_lf}" bs=1M count=1 2>/dev/null + for i in 0 1; do + ${LOSETUP} -f "${dummy_lf}" + done + for lp in `${LOSETUP} -j "${dummy_lf}" -O NAME | sed '1d'`; do + ${LOSETUP} -d ${lp} + done + rm -f "${dummy_lf}" + ${LOSETUP} -l -O NAME | \ sed '1d' > ${TMPDIR}/usedLoops + ls /dev/loop[0-9]* | \ grep -v -x -f ${TMPDIR}/usedLoops | \ sort -r > ${TMPDIR}/availableLoops @@ -33,6 +45,20 @@ function dd_sync() { }; +function blank_mke2fs() { + # Preceed mke2fs with device-prefix zeroing to avoid valid-data tests + # BEWARE - this assumes we are certain we can safely reformat the given device + dev_arg="${@: -1}" + if [ -b "${dev_arg}" ]; then + ${DD} if=/dev/zero of="${dev_arg}" bs=1M count=1 2>/dev/null + mke2fs "$@" + else + echo "${dev_arg} is not a block device" + false + fi +}; + + # # Testing infrastructure # @@ -260,7 +286,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 16 target${idx} 2>&3; then true; else test_fail "key-generation"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi test_pass @@ -283,7 +309,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 16 target${idx} 2>&3; then true; else test_fail "key-generation"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi test_pass @@ -297,7 +323,7 @@ function test_setup_roloop() { mkdir ${TMPDIR}/romnt dd_sync if=/dev/zero of=${TMPDIR}/roloopfile bs=1M count=32 2>/dev/null ${LOSETUP} "${LOOPDEV2}" ${TMPDIR}/roloopfile - mke2fs -q "${LOOPDEV2}" + blank_mke2fs -q "${LOOPDEV2}" mount -t ext2 "${LOOPDEV2}" ${TMPDIR}/romnt dd_sync if=/dev/zero of=${TMPDIR}/romnt/lpfl bs=1M count=16 2>/dev/null cat < ${TMPDIR}/cmtab @@ -314,7 +340,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 16 target${idx} 2>&3; then true; else test_fail "key-generation" "${cleanup}"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail "prepare" "${cleanup}" ; return; fi - if mke2fs -q /dev/mapper/target${idx}; then true; else test_fail "mke2fs" "${cleanup}"; return; fi + if blank_mke2fs -q /dev/mapper/target${idx}; then true; else test_fail "mke2fs" "${cleanup}"; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail "release" "${cleanup}"; return; fi mount -o remount,ro ${TMPDIR}/romnt @@ -620,7 +646,7 @@ EOF if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 16 target${idx} 2>&3; then true; else test_fail "make-key"; return; fi if [ ! -f ${TMPDIR}/keyfile-root ]; then test_fail "missing key"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail "prepare"; return; fi - if mke2fs -q /dev/mapper/target${idx}; then true; else test_fail "mke2fs"; return; fi + if blank_mke2fs -q /dev/mapper/target${idx}; then true; else test_fail "mke2fs"; return; fi if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail "release"; return; fi for user in ${USER1} ${USER2}; do @@ -670,7 +696,7 @@ EOF if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare --all 2>&3; then true; else test_fail "prepare" "${cleanup}"; return; fi for tgt in ${tgtlist}; do dd_sync if=/dev/zero of=/dev/mapper/target${idx} bs=1M count=1 2>/dev/null - if mke2fs -q /dev/mapper/${tgt}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q /dev/mapper/${tgt}; then true; else test_fail mke2fs; return; fi done wait_udev for tgt in ${tgtlist}; do @@ -712,7 +738,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 16 target${idx} 2>&3; then true; else test_fail "key-generation"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi @@ -759,7 +785,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi dd_sync if=/dev/zero of=/dev/mapper/target${idx} bs=1M count=1 2>/dev/null - if mke2fs -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi wait_udev @@ -796,7 +822,7 @@ function test_ssl_algs() { EOF if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi dd_sync if=/dev/zero of=/dev/mapper/target${idx} bs=1M count=1 2>/dev/null - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi @@ -836,7 +862,7 @@ EOF if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 16 target${idx} 2>&3; then true; else test_fail "key-generation"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi dd_sync if=/dev/zero of=/dev/mapper/target${idx} bs=1M count=1 2>/dev/null - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi @@ -884,7 +910,7 @@ EOF # Configure filesystem with libgcrypt-openssl compatibility layer: if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi dd_sync if=/dev/zero of=/dev/mapper/target${idx} bs=1M count=1 2>/dev/null - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi @@ -925,7 +951,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --generate-key 32 --newpassword "${PASSWD}" target${idx} 2>&3; then true; else test_fail make-key; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi @@ -953,7 +979,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --generate-key 16 --newpassword "${PASSWD}" target${idx} 2>&3; then true; else test_fail make-key; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi @@ -1004,7 +1030,7 @@ EOF rm -f ${TMPDIR}/keyfile if ${CM} --config-dir ${TMPDIR} --generate-key 12 --newpassword "${PASSWD}" target${idx} 2>&3; then true; else test_fail make-key; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi for mntopt in "" "-m" "--mount" @@ -1094,7 +1120,7 @@ EOF zero) dd_sync if=/dev/zero of=${LOOPDEV} bs=1M count=4 2>/dev/null ;; blank) - mke2fs -q ${LOOPDEV} ;; + blank_mke2fs -q ${LOOPDEV} ;; rand) dd_sync if=/dev/urandom of=${LOOPDEV} bs=1M count=4 2>/dev/null ;; data) @@ -1257,7 +1283,7 @@ function test_cryptsetup_compat() { cs_size=`blockdev --getsize /dev/mapper/cstarget${idx}` dd_sync if=/dev/zero of=/dev/mapper/cstarget${idx} \ bs=16k count=16 2>/dev/null - mke2fs -q -j /dev/mapper/cstarget${idx} + blank_mke2fs -q -j /dev/mapper/cstarget${idx} wait_udev cryptsetup remove cstarget${idx} 2>&3 wait_udev @@ -1306,7 +1332,7 @@ function test_luks_loopdev() { EOF if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 32 target${idx} 2>&3; then true; else test_fail "key-generation"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail prepare; return; fi - if mke2fs -t ext3 -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -t ext3 -q /dev/mapper/target${idx}; then true; else test_fail mke2fs; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail release; return; fi wait_udev @@ -1341,7 +1367,7 @@ function test_luks_compat() { cryptsetup --key-file ${TMPDIR}/keymat luksOpen "${LOOPDEV}" "${TMPTGT}" 1>&3 2>&3 sync; wait_udev if [ ! -b /dev/mapper/${TMPTGT} ]; then test_fail "luksOpen"; return; fi - if mke2fs -q -j "/dev/mapper/${TMPTGT}"; then true; else test_fail mke2fs; return; fi + if blank_mke2fs -q -j "/dev/mapper/${TMPTGT}"; then true; else test_fail mke2fs; return; fi wait_udev cryptsetup luksClose "${TMPTGT}" 2>&3 sync; wait_udev; sleep 1 @@ -1392,7 +1418,7 @@ EOF sync if ${CM} --config-dir ${TMPDIR} --newpassword "${PASSWD}" --generate-key 32 target${idx} 1>&3 2>&3; then true; else test_fail "key-generation"; return; fi if ${CM} --config-dir ${TMPDIR} --password "${PASSWD}" --prepare target${idx} 2>&3; then true; else test_fail "prepare"; return; fi - if mke2fs -q /dev/mapper/target${idx}; then true; else test_fail "mke2fs"; return; fi + if blank_mke2fs -q /dev/mapper/target${idx}; then true; else test_fail "mke2fs"; return; fi wait_udev if ${CM} --config-dir ${TMPDIR} --release target${idx} 2>&3; then true; else test_fail "release"; return; fi wait_udev