summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-02-23 12:10:17 -0500
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2019-02-23 17:43:56 +0000
commit499a3af49c3f56a736cea74b154452570ad7f3aa (patch)
tree5c1aa40f5b6738994721c11e984720db60716d59
parentf0eef9c82881028ff0321a0570af276edf5c0ed7 (diff)
downloadmidipix_build-499a3af49c3f56a736cea74b154452570ad7f3aa.tar.bz2
midipix_build-499a3af49c3f56a736cea74b154452570ad7f3aa.tar.xz
john-1.8.0: update patch following toolchain changes.
Signed-off-by: Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
-rw-r--r--patches/john-1.8.0.local.patch86
1 files changed, 78 insertions, 8 deletions
diff --git a/patches/john-1.8.0.local.patch b/patches/john-1.8.0.local.patch
index 30773e44..4865ad9f 100644
--- a/patches/john-1.8.0.local.patch
+++ b/patches/john-1.8.0.local.patch
@@ -1,3 +1,73 @@
+diff -ru a/src/DES_bs.c b/src/DES_bs.c
+--- a/src/DES_bs.c 2012-07-14 09:36:44.000000000 -0400
++++ b/src/DES_bs.c 2016-08-07 15:08:48.011369100 -0400
+@@ -52,7 +52,7 @@
+ };
+
+ #if DES_BS_ASM
+-extern void DES_bs_init_asm(void);
++extern void DES_INTERNAL DES_bs_init_asm(void);
+ #endif
+
+ void DES_bs_init(int LM, int cpt)
+--- a/src/DES_bs.h 2013-05-06 02:19:49.000000000 -0400
++++ b/src/DES_bs.h 2019-02-23 12:06:05.913582953 -0500
+@@ -35,6 +35,16 @@
+ #define DES_bs_vector ARCH_WORD
+ #endif
+
++#ifndef HAVE_INTERNAL_ATTR
++#define HAVE_INTERNAL_ATTR 0
++#endif
++
++#if HAVE_INTERNAL_ATTR
++#define DES_INTERNAL __attribute__((visibility("internal")))
++#else
++#define DES_INTERNAL
++#endif
++
+ /*
+ * All bitslice DES parameters combined into one struct for more efficient
+ * cache usage. Don't re-order unless you know what you're doing, as there
+@@ -112,7 +122,7 @@
+ #else
+ #define DES_bs_mt 0
+ #define DES_bs_cpt 1
+-extern DES_bs_combined DES_bs_all;
++extern DES_INTERNAL DES_bs_combined DES_bs_all;
+ #define for_each_t(n)
+ #define init_t()
+ #endif
+@@ -120,7 +130,7 @@
+ /*
+ * Initializes the internal structures.
+ */
+-extern void DES_bs_init(int LM, int cpt);
++extern void DES_INTERNAL DES_bs_init(int LM, int cpt);
+
+ /*
+ * Sets a salt for DES_bs_crypt().
+@@ -139,17 +149,17 @@
+ /*
+ * Almost generic implementation: 24-bit salts, variable iteration count.
+ */
+-extern void DES_bs_crypt(int count, int keys_count);
++extern void DES_INTERNAL DES_bs_crypt(int count, int keys_count);
+
+ /*
+ * A simplified special-case implementation: 12-bit salts, 25 iterations.
+ */
+-extern void DES_bs_crypt_25(int keys_count);
++extern void DES_INTERNAL DES_bs_crypt_25(int keys_count);
+
+ /*
+ * Another special-case version: a non-zero IV, no salts, no iterations.
+ */
+-extern int DES_bs_crypt_LM(int *keys_count, struct db_salt *salt);
++extern int DES_INTERNAL DES_bs_crypt_LM(int *keys_count, struct db_salt *salt);
+
+ /*
+ * Converts an ASCII ciphertext to binary to be used with one of the
--- john-1.8.0/src/Makefile.orig 2013-05-29 23:21:25.000000000 +0000
+++ john-1.8.0/src/Makefile 2016-09-11 21:19:18.930129331 +0000
@@ -32,7 +32,7 @@
@@ -31,8 +101,8 @@
+ $(LN) x86-64.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
-+ CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX -DHAVE_CRYPT" \
-+ CFLAGS="$(CFLAGS) -mavx -DHAVE_CRYPT -fvisibility=hidden" \
++ CFLAGS_MAIN="$(CFLAGS) -DJOHN_AVX -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR" \
++ CFLAGS="$(CFLAGS) -mavx -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR" \
+ ASFLAGS="$(ASFLAGS) -mavx" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+
@@ -40,7 +110,7 @@
+ $(LN) x86-64.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86-64.o" \
-+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden" \
++ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+
+midipix-x86-avx:
@@ -48,7 +118,7 @@
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
+ CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_AVX -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
-+ CFLAGS="$(CFLAGS) -m32 -mavx -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
++ CFLAGS="$(CFLAGS) -m32 -mavx -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
+ ASFLAGS="$(ASFLAGS) -m32 -mavx -DUNDERSCORES" \
+ LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
+
@@ -57,7 +127,7 @@
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
+ CFLAGS_MAIN="$(CFLAGS) -m32 -DJOHN_XOP -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
-+ CFLAGS="$(CFLAGS) -m32 -mxop -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
++ CFLAGS="$(CFLAGS) -m32 -mxop -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
+ ASFLAGS="$(ASFLAGS) -m32 -mxop -DUNDERSCORES" \
+ LDFLAGS="$(LDFLAGS) -m32 -lcrypt"
+
@@ -65,7 +135,7 @@
+ $(LN) x86-sse.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-sse.o" \
-+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
++ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
+ ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+
@@ -73,7 +143,7 @@
+ $(LN) x86-mmx.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o x86-mmx.o" \
-+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
++ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
+ ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+
@@ -81,7 +151,7 @@
+ $(LN) x86-any.h arch.h
+ $(MAKE) $(PROJ) \
+ JOHN_OBJS="$(JOHN_OBJS) c3_fmt.o x86.o" \
-+ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DUNDERSCORES" \
++ CFLAGS="$(CFLAGS) -DHAVE_CRYPT -fvisibility=hidden -DHAVE_INTERNAL_ATTR -DUNDERSCORES" \
+ ASFLAGS="$(ASFLAGS) -m32 -DUNDERSCORES" \
+ LDFLAGS="$(LDFLAGS) -lcrypt"
+