Hello community,
here is the log from the commit of package cryptsetup for openSUSE:Factory
checked in at Mon Mar 9 00:18:34 CET 2009.
--------
--- cryptsetup/cryptsetup.changes 2009-03-04 09:57:00.000000000 +0100
+++ /mounts/work_src_done/STABLE/cryptsetup/cryptsetup.changes 2009-03-06 13:02:43.000000000 +0100
@@ -1,0 +2,12 @@
+Fri Mar 6 13:01:44 CET 2009 - lnussel@suse.de
+
+- boot.crypto:
+ * print dm name instead of physdev (bnc#456664)
+ * make prompt work with infinite timeout (bnc#466405)
+ * implement pre-stop hook (bnc#481870)
+ * remove hardcoded loop device number limit (bnc#481872)
+ * Warn if using a non-absolute path for physdev in crypttab
+- hashalot: compute hash of empty passphrase if not interactive
+ (bnc#475135)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
boot.crypto-0_200903031625.tar.bz2
New:
----
boot.crypto-0_200903061252.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cryptsetup.spec ++++++
--- /var/tmp/diff_new_pack.W20502/_old 2009-03-09 00:18:02.000000000 +0100
+++ /var/tmp/diff_new_pack.W20502/_new 2009-03-09 00:18:02.000000000 +0100
@@ -25,12 +25,12 @@
# hashalot version
%define haver 0.3
# boot.crypto version
-%define bcver 0_200903031625
+%define bcver 0_200903061252
License: BSD 3-Clause; GPL v2 only; GPL v2 or later
Group: System/Base
AutoReqProv: on
Version: 1.0.5_SVNr46
-Release: 61
+Release: 62
Summary: Set Up dm-crypt Based Encrypted Block Devices
Source: cryptsetup-%{version}.tar.bz2
Source1: hashalot-%haver.tar.bz2
@@ -161,6 +161,7 @@
#
# boot.crypto
make -C ../boot.crypto-* install DESTDIR=$RPM_BUILD_ROOT
+ln -s /etc/init.d/boot.crypto $RPM_BUILD_ROOT/sbin/rccrypto
#
%find_lang %name --all-name
@@ -204,6 +205,7 @@
/lib/mkinitrd/scripts/boot-luks.sh
/sbin/cryptsetup
/sbin/hashalot
+/sbin/rccrypto
%_mandir/man1/hashalot.1.gz
%_mandir/man8/cryptsetup.8.gz
%_mandir/man5/crypttab.5.gz
@@ -221,6 +223,15 @@
%{_libdir}/libcryptsetup.so
%changelog
+* Fri Mar 06 2009 lnussel@suse.de
+- boot.crypto:
+ * print dm name instead of physdev (bnc#456664)
+ * make prompt work with infinite timeout (bnc#466405)
+ * implement pre-stop hook (bnc#481870)
+ * remove hardcoded loop device number limit (bnc#481872)
+ * Warn if using a non-absolute path for physdev in crypttab
+- hashalot: compute hash of empty passphrase if not interactive
+ (bnc#475135)
* Tue Mar 03 2009 lnussel@suse.de
- fix boot.crypto doesn't care on tries flag in crypttab (bnc#480741)
- mkinitrd scripts now included in boot.crypto git
++++++ boot.crypto-0_200903031625.tar.bz2 -> boot.crypto-0_200903061252.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/boot.crypto-0_200903031625/boot.crypto new/boot.crypto-0_200903061252/boot.crypto
--- old/boot.crypto-0_200903031625/boot.crypto 2009-03-03 16:25:57.000000000 +0100
+++ new/boot.crypto-0_200903061252/boot.crypto 2009-03-06 12:52:00.000000000 +0100
@@ -85,6 +85,8 @@
foundit=''
failed=0
+ cutomize_pre_stop_hook
+
if test -s $CRYPTOTAB; then
stop_cryptotab
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/boot.crypto-0_200903031625/boot.crypto-early new/boot.crypto-0_200903061252/boot.crypto-early
--- old/boot.crypto-0_200903031625/boot.crypto-early 2009-03-03 16:25:57.000000000 +0100
+++ new/boot.crypto-0_200903061252/boot.crypto-early 2009-03-06 12:52:00.000000000 +0100
@@ -78,6 +78,8 @@
foundit=''
failed=0
+ cutomize_pre_stop_hook
+
if test -s $CRYPTTAB; then
stop_crypttab
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/boot.crypto-0_200903031625/boot.crypto.functions new/boot.crypto-0_200903061252/boot.crypto.functions
--- old/boot.crypto-0_200903031625/boot.crypto.functions 2009-03-03 16:25:57.000000000 +0100
+++ new/boot.crypto-0_200903061252/boot.crypto.functions 2009-03-06 12:52:00.000000000 +0100
@@ -78,11 +78,10 @@
trap "exit 0" SIGTERM
trap "echo" SIGINT SIGSEGV
usleep 15000
- while test $timeout -gt 0 ; do
+ while true; do
# cursor to start of line, erase line, print prompt
echo -en "\r\e[2K${prmt}"
sleep 2
- : $((timeout-=2))
done
) & ppid=$!
trap unsetprompt EXIT
@@ -232,6 +231,16 @@
rc_status -v
}
+makeabsolute()
+{
+ local var="$1"
+ eval "f=\"\$$var\""
+ if [ "${f:0:1}" != '/' ]; then
+ echo "${extd}Warning: please use an absolute path for $f${norm}"
+ eval "$var=\"$PWD/$f\""
+ fi
+}
+
start_cryptotab ()
{
local stat=0
@@ -260,6 +269,8 @@
redirect
+ makeabsolute physdev
+
# key length for cryptsetup
keylen=
ivgen='plain'
@@ -426,9 +437,11 @@
haveone=1
redirect
+ makeabsolute physdev
+
# skip mapped entries
if test -e /dev/mapper/$name; then
- report 5 "$physdev: $name already mapped"
+ report 5 "$name: already mapped"
continue
fi
@@ -437,7 +450,7 @@
# make sure the keyfile exists
if test -n "$keyfile" -a ! -e "$keyfile"; then
- report 5 "$physdev: $keyfile does not exist"
+ report 5 "$name: $keyfile does not exist"
failed=1
continue
fi
@@ -558,12 +571,12 @@
fi
if test "$skip" = "yes" -o \( "$noauto" = "yes" -a -z "$tostart" \); then
- report 5 "$physdev"
+ report 5 "$name"
continue
fi
if test "$CRYPT_EARLY" = "yes" -a "$noearly" = "yes"; then
- report 5 "skipping $physdev (noearly)"
+ report 5 "skipping $name (noearly)"
continue
fi
@@ -571,7 +584,7 @@
if test -n "$precheck"; then
$precheck "$physdev"
if test $? -ne 0; then
- report 1 "$physdev... "
+ report 1 "$name... "
continue
fi
fi
@@ -590,22 +603,23 @@
# if device is a regular file then it's an image
if test -n "$loopdev" -o -f $device; then
loopdev=''
- for i in 0 1 2 3 4 5 6 7; do
- if ! test -b "/dev/loop$i"; then
+ local dev
+ for dev in /dev/loop*; do
+ if ! test -b "$dev"; then
continue
fi
unset loopsize
- read loopsize < /sys/block/loop$i/size
- if test $? -eq 0 -a "$loopsize" = '0' && /sbin/losetup $param_ro "/dev/loop$i" $device; then
- device="/dev/loop$i"
+ read loopsize < /sys/block/${dev#/dev/}/size
+ if test $? -eq 0 -a "$loopsize" = '0' && /sbin/losetup $param_ro "$dev" $device; then
+ device="$dev"
loopdev="$device"
break
fi
done
if test -z "$loopdev"; then
- report 1 "$physdev: failed to find a usable loop device"
+ report 1 "$name: failed to find a usable loop device"
failed=1
continue
fi
@@ -620,7 +634,7 @@
fi
if test -z "$keyfile"; then
- prmt="${extd}Please enter passphrase for $physdev ($name): ${norm}"
+ prmt="${extd}Please enter passphrase for $name: ${norm}"
setprompt
fi
@@ -647,7 +661,7 @@
fi
if test $stat -ne 0; then
- report 1 "$physdev... "
+ report 1 "$name... "
doskip=1
failed=1
detachloopdev
@@ -658,7 +672,7 @@
if test -n "$check"; then
$check "/dev/mapper/$name" $checkargs
if test $? -ne 0; then
- report 1 "$physdev... "
+ report 1 "$name... "
doskip=1
failed=1
/sbin/cryptsetup remove $name
@@ -707,7 +721,7 @@
if test "$stat" = 1; then # retype passphrase
continue
elif test "$stat" = 2; then # skip entry
- report 5 "$physdev..."
+ report 5 "$name..."
doskip=1
fi
fi
@@ -729,7 +743,7 @@
mkswap "/dev/mapper/$name"
stat="$?"
test $stat -eq 0 || stat=1
- report $stat "$physdev..."
+ report $stat "$name..."
continue
fi
@@ -740,13 +754,13 @@
fi
if test -z "$infstab"; then
- report 0 "$physdev..."
+ report 0 "$name..."
continue
fi
if test $fs_passno -gt 0; then
if ! run_fsck "$fs_type" "/dev/mapper/$name" "$mp" "$physdev"; then
- report 1 "$physdev..."
+ report 1 "$name..."
continue
fi
fi
@@ -765,7 +779,7 @@
chmod 1777 $mountpoint
fi
- report $stat "$physdev..."
+ report $stat "$name..."
done < $CRYPTTAB
@@ -821,6 +835,8 @@
haveone=1
+ makeabsolute physdev
+
if test -b "/dev/mapper/$name"; then
if ! umount_or_swapoff; then
@@ -875,12 +891,14 @@
haveone=1
+ makeabsolute physdev
+
loopdev=""
device="$physdev"
if test -b "/dev/mapper/$name"; then
if ! umount_or_swapoff; then
- report 1 "$physdev..."
+ report 1 "$name..."
failed=1
continue
fi
@@ -899,7 +917,7 @@
/sbin/losetup -d $device || { rc_failed 1; failed=1; }
fi
- echo -n "$physdev..."
+ echo -n "$name..."
rc_status -v
done < <(reverse < $CRYPTTAB)
@@ -929,6 +947,8 @@
haveone=1
+ makeabsolute physdev
+
name="${loopdev#/dev/}"
name="cryptotab_${name//[^A-Za-z0-9]/_}"
@@ -997,7 +1017,9 @@
haveone=1
- echo -n "$physdev"
+ makeabsolute physdev
+
+ echo -n "$name"
state=0
str=''
@@ -1082,6 +1104,22 @@
done
}
+
+cutomize_pre_stop_hook ()
+{
+ local srv
+
+ test "$base" != "$link" && return 0
+ test -s /etc/sysconfig/boot.crypto || return 0
+ . /etc/sysconfig/boot.crypto
+
+ for srv in $STOP_BEFORE_STOP ; do
+ test -n "$srv" || break
+ test -x /etc/init.d/$srv || continue
+ /etc/init.d/$srv try-restart
+ done
+}
+
cutomize_stop_hook ()
{
local srv
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/boot.crypto-0_200903031625/Makefile new/boot.crypto-0_200903061252/Makefile
--- old/boot.crypto-0_200903031625/Makefile 2009-03-03 16:25:57.000000000 +0100
+++ new/boot.crypto-0_200903061252/Makefile 2009-03-06 12:52:00.000000000 +0100
@@ -33,8 +33,10 @@
install -m 755 checks/vol_id $(DESTDIR)$(pkglibdir)/checks
install -m 644 crypttab.5 $(DESTDIR)$(mandir)/man5
install -m 644 cryptotab.5 $(DESTDIR)$(mandir)/man5
- install -m 644 /dev/null $(DESTDIR)$(sysconfdir)/cryptotab
- install -m 644 /dev/null $(DESTDIR)$(sysconfdir)/crypttab
+ test -s $(DESTDIR)$(sysconfdir)/cryptotab || \
+ install -m 644 /dev/null $(DESTDIR)$(sysconfdir)/cryptotab
+ test -s $(DESTDIR)$(sysconfdir)/crypttab || \
+ install -m 644 /dev/null $(DESTDIR)$(sysconfdir)/crypttab
install -m 755 mkinitrd/setup-luks.sh $(DESTDIR)$(initrdscriptsdir)/setup-luks.sh
install -m 755 mkinitrd/boot-luks.sh $(DESTDIR)$(initrdscriptsdir)/boot-luks.sh
++++++ bug-476290_hashalot-hashlen.diff ++++++
--- /var/tmp/diff_new_pack.W20502/_old 2009-03-09 00:18:02.000000000 +0100
+++ /var/tmp/diff_new_pack.W20502/_new 2009-03-09 00:18:02.000000000 +0100
@@ -1,6 +1,7 @@
-diff -up hashalot-0.3/hashalot.c.orig hashalot-0.3/hashalot.c
---- hashalot-0.3/hashalot.c.orig 2009-02-11 19:31:16.000000000 -0600
-+++ hashalot-0.3/hashalot.c 2009-02-11 19:47:46.000000000 -0600
+Index: hashalot-0.3/hashalot.c
+===================================================================
+--- hashalot-0.3.orig/hashalot.c
++++ hashalot-0.3/hashalot.c
@@ -34,6 +34,7 @@
#include "sha512.h"
@@ -9,7 +10,7 @@
typedef int (*phash_func_t)(char dest[], size_t dest_len, const char src[], size_t src_len);
-@@ -179,8 +180,7 @@ static void *
+@@ -182,8 +183,7 @@ static void *
xmalloc (size_t size) {
void *p;
@@ -19,7 +20,7 @@
p = malloc(size);
if (p == NULL) {
-@@ -239,6 +239,12 @@ main(int argc, char *argv[])
+@@ -242,6 +242,12 @@ main(int argc, char *argv[])
show_usage(argv[0]);
exit(EXIT_FAILURE);
}
++++++ hashalot-ctrl-d.diff ++++++
--- /var/tmp/diff_new_pack.W20502/_old 2009-03-09 00:18:02.000000000 +0100
+++ /var/tmp/diff_new_pack.W20502/_new 2009-03-09 00:18:02.000000000 +0100
@@ -1,19 +1,29 @@
-exit unsucessfully on empty passphrase
+exit unsuccessfully on empty passphrase if input is a tty
+
+allows user to press ctrl-d to abort
Signed-off-by: Ludwig Nussel