This commit is contained in:
parent
43e08ea55a
commit
dc678340b8
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a5261f0d9fbb4bd3ba8cebbb50acf34e057494f33dd3cd7fdafb58478fb9504c
|
||||
size 14275
|
3
boot.crypto-0_200903061252.tar.bz2
Normal file
3
boot.crypto-0_200903061252.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4a39524bf11d119b645f58400f493eb00d68829cb207a690b84fab509855b6b1
|
||||
size 14417
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 <ludwig.nussel@suse.de>
|
||||
|
||||
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;
|
||||
|
@ -4,7 +4,7 @@ Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||
|
||||
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 <string.h>
|
||||
@ -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);
|
||||
+ }
|
||||
|
Loading…
Reference in New Issue
Block a user