From 5ea6a2557f7579a576c494fe288ff424e1a82604 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 22 Aug 2009 16:19:35 +0200 Subject: build static library as pre-configure task - hackish way, but I was not in the mood to hack the autotool stuff - add patch I wanted to add last time ;) --- package/cryptsetup/patches/patch-lib_setup_c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 package/cryptsetup/patches/patch-lib_setup_c (limited to 'package/cryptsetup/patches/patch-lib_setup_c') diff --git a/package/cryptsetup/patches/patch-lib_setup_c b/package/cryptsetup/patches/patch-lib_setup_c new file mode 100644 index 000000000..97b356f68 --- /dev/null +++ b/package/cryptsetup/patches/patch-lib_setup_c @@ -0,0 +1,17 @@ +already added in svn upstream +--- cryptsetup-1.0.7.orig/lib/setup.c 2009-07-22 13:12:44.000000000 +0200 ++++ cryptsetup-1.0.7/lib/setup.c 2009-08-22 15:10:32.000000000 +0200 +@@ -542,7 +542,12 @@ static int __crypt_luks_open(int arg, st + start: + mk=NULL; + +- if(get_key(prompt, &password, &passwordLen, 0, options->key_file, options->passphrase_fd, options->timeout, options->flags)) ++ if(options->passphrase) { ++ passwordLen = strlen(options->passphrase); ++ password = safe_alloc(passwordLen + 1); ++ strncpy(password, options->passphrase, passwordLen + 1); ++ tries = 0; ++ } else if(get_key(prompt, &password, &passwordLen, 0, options->key_file, options->passphrase_fd, options->timeout, options->flags)) + tries--; + else + tries = 0; -- cgit v1.2.3