From 409c6f1b3ef1acdf1e8b1597bd1ec7f1a46f7af6 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Sat, 12 Nov 2016 15:16:56 +0000 Subject: - Update `security/john' to 1.8.0-jumbo-1 (long overdue) - Remove no longer needed build-related logic since they moved to GNU autotools' based build - Disable OPENMP option for the moment; it will be reintroduced with others (e.g. OpenCL) in a separate commit - Add upstream patch to fix the build on non-x86 architectures [2] - Do not define _POSIX_SOURCE when compiling wordlist.c: this results in broken JtR binary at least on i386 - Define JOHN_SYSTEMWIDE_EXEC for the future when we start to provide fall-back binaries - Stop moving john.conf to /etc. We're not doing it for other *.conf files anyway (the include files); JtR is smart enough to locate its configuration files properly when built in system-wide mode [1] - Install full set of documentation files included with -jumbo - Remove `xtract' symlink which hasn't been part of JtR for more than a decade; install more useful symlinks (unafs, unique, other un* and *2john) that were added in -jumbo instead - Previously *.pl, *.rb, and *.py scripts were installed into DATADIR; Alexander wanted to see them along with the documentation, but that goes a bit too far; put them in ${DATADIR}/extra for the time being PR: 197172 [1] Obtained from: http://www.openwall.com/lists/john-dev/2014/12/18/21 [2] --- security/john/files/patch-rawSHA0__fmt__plug.c | 18 ++++++++++++++++++ security/john/files/patch-src_john.c | 22 ---------------------- security/john/files/patch-src_params.h | 14 -------------- security/john/files/patch-src_rawSHA0__fmt.c | 17 ----------------- security/john/files/patch-truecrypt__fmt__plug.c | 13 +++++++++++++ security/john/files/patch-wordlist.c | 14 ++++++++++++++ 6 files changed, 45 insertions(+), 53 deletions(-) create mode 100644 security/john/files/patch-rawSHA0__fmt__plug.c delete mode 100644 security/john/files/patch-src_john.c delete mode 100644 security/john/files/patch-src_params.h delete mode 100644 security/john/files/patch-src_rawSHA0__fmt.c create mode 100644 security/john/files/patch-truecrypt__fmt__plug.c create mode 100644 security/john/files/patch-wordlist.c (limited to 'security/john/files') diff --git a/security/john/files/patch-rawSHA0__fmt__plug.c b/security/john/files/patch-rawSHA0__fmt__plug.c new file mode 100644 index 000000000000..b183e8fa2a75 --- /dev/null +++ b/security/john/files/patch-rawSHA0__fmt__plug.c @@ -0,0 +1,18 @@ +--- rawSHA0_fmt_plug.c.orig 2014-09-19 16:40:51 UTC ++++ rawSHA0_fmt_plug.c +@@ -15,6 +15,8 @@ john_register_one(&fmt_rawSHA_0); + #include + #include + ++#ifndef OPENSSL_NO_SHA0 ++ + #include "arch.h" + #include "misc.h" + #include "common.h" +@@ -207,4 +209,6 @@ struct fmt_main fmt_rawSHA_0 = { + } + }; + ++#endif /* OPENSSL_NO_SHA0 */ ++ + #endif /* plugin stanza */ diff --git a/security/john/files/patch-src_john.c b/security/john/files/patch-src_john.c deleted file mode 100644 index 9227093af893..000000000000 --- a/security/john/files/patch-src_john.c +++ /dev/null @@ -1,22 +0,0 @@ ---- src/john.c.orig 2012-09-20 01:50:17 UTC -+++ src/john.c -@@ -183,7 +183,9 @@ extern struct fmt_main fmt_wpapsk; - - extern struct fmt_main fmt_hmacMD5; - extern struct fmt_main fmt_hmacSHA1; -+#ifndef OPENSSL_NO_SHA0 - extern struct fmt_main fmt_rawSHA0; -+#endif - - extern int unique(int argc, char **argv); - extern int unshadow(int argc, char **argv); -@@ -241,7 +243,9 @@ static void john_register_all(void) - - john_register_one(&fmt_hmacMD5); - john_register_one(&fmt_hmacSHA1); -+#ifndef OPENSSL_NO_SHA0 - john_register_one(&fmt_rawSHA0); -+#endif - - #if OPENSSL_VERSION_NUMBER >= 0x00908000 - john_register_one(&fmt_rawSHA224); diff --git a/security/john/files/patch-src_params.h b/security/john/files/patch-src_params.h deleted file mode 100644 index fa6b9d082415..000000000000 --- a/security/john/files/patch-src_params.h +++ /dev/null @@ -1,14 +0,0 @@ ---- src/params.h.orig 2012-09-20 14:35:00 UTC -+++ src/params.h -@@ -134,7 +134,11 @@ - /* - * File names. - */ -+#if JOHN_SYSTEMWIDE -+#ifndef CFG_FULL_NAME - #define CFG_FULL_NAME "$JOHN/john.conf" -+#endif -+#endif - #define CFG_ALT_NAME "$JOHN/john.ini" - #if JOHN_SYSTEMWIDE - #define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.conf" diff --git a/security/john/files/patch-src_rawSHA0__fmt.c b/security/john/files/patch-src_rawSHA0__fmt.c deleted file mode 100644 index c9325bc663e9..000000000000 --- a/security/john/files/patch-src_rawSHA0__fmt.c +++ /dev/null @@ -1,17 +0,0 @@ ---- src/rawSHA0_fmt.c.orig 2012-09-17 08:30:39 UTC -+++ src/rawSHA0_fmt.c -@@ -9,6 +9,8 @@ - #include - #include "sha.h" - -+#ifndef OPENSSL_NO_SHA0 -+ - #include "arch.h" - #include "misc.h" - #include "common.h" -@@ -189,3 +191,5 @@ struct fmt_main fmt_rawSHA0 = { - cmp_exact - } - }; -+ -+#endif diff --git a/security/john/files/patch-truecrypt__fmt__plug.c b/security/john/files/patch-truecrypt__fmt__plug.c new file mode 100644 index 000000000000..f96cfb307f73 --- /dev/null +++ b/security/john/files/patch-truecrypt__fmt__plug.c @@ -0,0 +1,13 @@ +--- truecrypt_fmt_plug.c.orig 2014-12-18 07:59:02 UTC ++++ truecrypt_fmt_plug.c +@@ -310,8 +310,8 @@ static int crypt_all(int *pcount, struct + pbkdf2_sha512_sse((const unsigned char **)pin, lens, psalt->salt, 64, psalt->num_iterations, &(x.poutc), sizeof(key), 0); + } + #else +- if (is_sha512) +- pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen(key_buffer[i]), psalt->salt, 64, num_iterations, key, sizeof(key), 0); ++ if (psalt->hash_type == IS_SHA512) ++ pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen((char*)key_buffer[i]), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0); + #endif + else if (psalt->hash_type == IS_RIPEMD160) + pbkdf2_ripemd160(key_buffer[i], strlen((char*)(key_buffer[i])), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0); diff --git a/security/john/files/patch-wordlist.c b/security/john/files/patch-wordlist.c new file mode 100644 index 000000000000..91cd8efd55a3 --- /dev/null +++ b/security/john/files/patch-wordlist.c @@ -0,0 +1,14 @@ +--- wordlist.c.orig 2014-11-11 14:41:25 UTC ++++ wordlist.c +@@ -10,11 +10,6 @@ + * There's ABSOLUTELY NO WARRANTY, express or implied. + */ + +-/* NOTE, _POSIX_SOURCE fuk's up solaris 32 bit 64 bit processing!!! */ +-#ifndef sparc +-#define _POSIX_SOURCE /* for fileno(3) */ +-#endif +- + #include + #include + -- cgit v1.2.3