From dc678340b89fce45afc7aa066b0bea440bcbe268cac22dc72f39c4277cc3efbf Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sun, 8 Mar 2009 23:18:36 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cryptsetup?expand=0&rev=24 --- boot.crypto-0_200903031625.tar.bz2 | 3 --- boot.crypto-0_200903061252.tar.bz2 | 3 +++ bug-476290_hashalot-hashlen.diff | 11 +++++----- cryptsetup.changes | 12 +++++++++++ cryptsetup.spec | 15 +++++++++++-- hashalot-ctrl-d.diff | 34 +++++++++++++++++++----------- hashalot-timeout.diff | 16 ++++++-------- 7 files changed, 63 insertions(+), 31 deletions(-) delete mode 100644 boot.crypto-0_200903031625.tar.bz2 create mode 100644 boot.crypto-0_200903061252.tar.bz2 diff --git a/boot.crypto-0_200903031625.tar.bz2 b/boot.crypto-0_200903031625.tar.bz2 deleted file mode 100644 index 35e5884..0000000 --- a/boot.crypto-0_200903031625.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5261f0d9fbb4bd3ba8cebbb50acf34e057494f33dd3cd7fdafb58478fb9504c -size 14275 diff --git a/boot.crypto-0_200903061252.tar.bz2 b/boot.crypto-0_200903061252.tar.bz2 new file mode 100644 index 0000000..c123f90 --- /dev/null +++ b/boot.crypto-0_200903061252.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a39524bf11d119b645f58400f493eb00d68829cb207a690b84fab509855b6b1 +size 14417 diff --git a/bug-476290_hashalot-hashlen.diff b/bug-476290_hashalot-hashlen.diff index 42a8b8d..880c4c6 100644 --- a/bug-476290_hashalot-hashlen.diff +++ b/bug-476290_hashalot-hashlen.diff @@ -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 @@ diff -up hashalot-0.3/hashalot.c.orig hashalot-0.3/hashalot.c 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 @@ diff -up hashalot-0.3/hashalot.c.orig hashalot-0.3/hashalot.c 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); } diff --git a/cryptsetup.changes b/cryptsetup.changes index 05450c9..fb66ccb 100644 --- a/cryptsetup.changes +++ b/cryptsetup.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +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) + ------------------------------------------------------------------- Tue Mar 3 16:27:23 CET 2009 - lnussel@suse.de diff --git a/cryptsetup.spec b/cryptsetup.spec index fa9e60f..a1c6e58 100644 --- a/cryptsetup.spec +++ b/cryptsetup.spec @@ -25,12 +25,12 @@ BuildRequires: libselinux-devel # 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 @@ rm -f $RPM_BUILD_ROOT/sbin/{rmd160,sha256,sha384,sha512} # # 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 @@ rm -rf $RPM_BUILD_ROOT /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 @@ rm -rf $RPM_BUILD_ROOT %{_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 diff --git a/hashalot-ctrl-d.diff b/hashalot-ctrl-d.diff index c7beff5..8b99c70 100644 --- a/hashalot-ctrl-d.diff +++ b/hashalot-ctrl-d.diff @@ -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 Index: hashalot-0.3/hashalot.c =================================================================== ---- hashalot-0.3/hashalot.c.orig +--- hashalot-0.3.orig/hashalot.c +++ hashalot-0.3/hashalot.c -@@ -275,6 +275,10 @@ main(int argc, char *argv[]) +@@ -135,10 +135,14 @@ phash_lookup(const char phash_name[], si + static char * + xgetpass(const char *prompt) + { +- if (isatty(STDIN_FILENO)) /* terminal */ +- return getpass(prompt); /* FIXME getpass(3) obsolete */ +- else { /* file descriptor */ +- char *pass = NULL; ++ char *pass = NULL; ++ if (isatty(STDIN_FILENO)) { /* terminal */ ++ pass = getpass(prompt); /* FIXME getpass(3) obsolete */ ++ if(!pass || !*pass) { ++ exit(EXIT_FAILURE); ++ } ++ return pass; ++ } else { /* file descriptor */ + int buflen, i; - /* here we acquire the precious passphrase... */ - pass = xgetpass("Enter passphrase: "); -+ if(!*pass) { -+ exit(EXIT_FAILURE); -+ } -+ - if (salt) - pass = salt_passphrase(pass, salt); - hashlen = func(passhash, hashlen, pass, strlen(pass)); + buflen=0; diff --git a/hashalot-timeout.diff b/hashalot-timeout.diff index 1f5fe32..5655788 100644 --- a/hashalot-timeout.diff +++ b/hashalot-timeout.diff @@ -4,7 +4,7 @@ Signed-off-by: Ludwig Nussel Index: hashalot-0.3/hashalot.c =================================================================== ---- hashalot-0.3/hashalot.c.orig +--- hashalot-0.3.orig/hashalot.c +++ hashalot-0.3/hashalot.c @@ -21,6 +21,7 @@ #include @@ -39,7 +39,7 @@ Index: hashalot-0.3/hashalot.c "\n" "supported values for HASHTYPE: "); -@@ -219,8 +226,9 @@ main(int argc, char *argv[]) +@@ -222,8 +229,9 @@ main(int argc, char *argv[]) phash_func_t func; int hex_output = 0, c; unsigned long itercountk = 0; @@ -50,7 +50,7 @@ Index: hashalot-0.3/hashalot.c switch (c) { case 'n': hashlen = strtoul(optarg, &p, 0); -@@ -235,6 +243,9 @@ main(int argc, char *argv[]) +@@ -238,6 +246,9 @@ main(int argc, char *argv[]) case 's': salt = optarg; break; @@ -60,7 +60,7 @@ Index: hashalot-0.3/hashalot.c case 'x': hex_output++; break; -@@ -273,12 +284,25 @@ main(int argc, char *argv[]) +@@ -276,8 +287,24 @@ main(int argc, char *argv[]) fputs("Warning: couldn't lock memory, are you root?\n", stderr); } @@ -75,11 +75,9 @@ Index: hashalot-0.3/hashalot.c + /* here we acquire the precious passphrase... */ pass = xgetpass("Enter passphrase: "); -- if(!*pass) { -+ if(got_timeout || !*pass) { - exit(EXIT_FAILURE); - } - ++ if(got_timeout) { ++ exit(EXIT_FAILURE); ++ } + if(timeout) { + alarm(0); + }