View | Details | Raw Unified | Return to bug 198527 | Differences between
and this patch

Collapse All | Expand All

(-)security/heimdal/files/patch-cf_crypto.m4 (+10 lines)
Line 0 Link Here
1
--- cf/crypto.m4.orig	2012-12-09 23:06:44.000000000 +0100
2
+++ cf/crypto.m4	2015-04-10 22:22:32.902931044 +0200
3
@@ -143,6 +143,7 @@
4
 			break;
5
 		fi
6
 	done
7
+	AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
8
 	CFLAGS="$save_CFLAGS"
9
 	LIBS="$save_LIBS"
10
 fi
(-)security/heimdal/files/patch-configure (-88 / +51 lines)
Lines 1-88 Link Here
1
--- configure.orig	2014-10-20 14:24:44.000000000 +0900
1
--- configure.orig	2012-12-09 23:09:32.000000000 +0100
2
+++ configure	2014-10-20 14:27:30.000000000 +0900
2
+++ configure	2015-04-10 22:26:32.485912736 +0200
3
@@ -9567,29 +9567,6 @@
3
@@ -14151,6 +14151,48 @@
4
       hardcode_shlibpath_var=no
4
 			break;
5
       ;;
5
 		fi
6
 
6
 	done
7
-    freebsd1*)
7
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8
-      ld_shlibs=no
8
+$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9
-      ;;
9
+if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
10
-
10
+  $as_echo_n "(cached) " >&6
11
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11
+else
12
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
12
+  ac_check_lib_save_LIBS=$LIBS
13
-    # does not break anything, and helps significantly (at the cost of a little
13
+LIBS="-lcrypto  $LIBS"
14
-    # extra space).
14
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15
-    freebsd2.2*)
15
+/* end confdefs.h.  */
16
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
16
+
17
-      hardcode_libdir_flag_spec='-R$libdir'
17
+/* Override any GCC internal prototype to avoid an error.
18
-      hardcode_direct=yes
18
+   Use char because int might match the return type of a GCC
19
-      hardcode_shlibpath_var=no
19
+   builtin and then its argument prototype would still apply.  */
20
-      ;;
20
+#ifdef __cplusplus
21
-
21
+extern "C"
22
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
22
+#endif
23
-    freebsd2*)
23
+char RAND_egd ();
24
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
24
+int
25
-      hardcode_direct=yes
25
+main ()
26
-      hardcode_minus_L=yes
26
+{
27
-      hardcode_shlibpath_var=no
27
+return RAND_egd ();
28
-      ;;
28
+  ;
29
-
29
+  return 0;
30
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
30
+}
31
     freebsd* | dragonfly*)
31
+_ACEOF
32
       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
32
+if ac_fn_c_try_link "$LINENO"; then :
33
@@ -10561,10 +10538,6 @@
33
+  ac_cv_lib_crypto_RAND_egd=yes
34
   shlibpath_var=LD_LIBRARY_PATH
34
+else
35
   ;;
35
+  ac_cv_lib_crypto_RAND_egd=no
36
 
36
+fi
37
-freebsd1*)
37
+rm -f core conftest.err conftest.$ac_objext \
38
-  dynamic_linker=no
38
+    conftest$ac_exeext conftest.$ac_ext
39
-  ;;
39
+LIBS=$ac_check_lib_save_LIBS
40
-
40
+fi
41
 freebsd* | dragonfly*)
41
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
42
   # DragonFly does not have aout.  When/if they implement a new
42
+$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
43
   # versioning mechanism, adjust this.
43
+if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
44
@@ -10572,7 +10545,6 @@
44
+
45
     objformat=`/usr/bin/objformat`
45
+$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
46
   else
46
+
47
     case $host_os in
47
+fi
48
-    freebsd[123]*) objformat=aout ;;
48
+
49
     *) objformat=elf ;;
49
 	CFLAGS="$save_CFLAGS"
50
     esac
50
 	LIBS="$save_LIBS"
51
   fi
51
 fi
52
@@ -10590,18 +10562,6 @@
53
   esac
54
   shlibpath_var=LD_LIBRARY_PATH
55
   case $host_os in
56
-  freebsd2*)
57
-    shlibpath_overrides_runpath=yes
58
-    ;;
59
-  freebsd3.[01]* | freebsdelf3.[01]*)
60
-    shlibpath_overrides_runpath=yes
61
-    hardcode_into_libs=yes
62
-    ;;
63
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
64
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
65
-    shlibpath_overrides_runpath=no
66
-    hardcode_into_libs=yes
67
-    ;;
68
   *) # from 4.6 on, and DragonFly
69
     shlibpath_overrides_runpath=yes
70
     hardcode_into_libs=yes
71
@@ -14227,7 +14187,7 @@
72
 	native_pthread_support="netbsd 3 uses explict pthread"
73
 		PTHREAD_LIBADD="-lpthread"
74
 	;;
75
-*-*-freebsd[56789]*)
76
+*-*-freebsd*)
77
 	native_pthread_support=yes
78
 	PTHREAD_LIBADD="-pthread"
79
 	;;
80
@@ -28245,7 +28205,7 @@
81
 
82
 krb_cv_compile_et="no"
83
 krb_cv_com_err_need_r=""
84
-krb_cv_compile_et_cross=no
85
+krb_cv_compile_et_cross=yes
86
 if test "${COMPILE_ET}" = "compile_et"; then
87
 
88
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compile_et has the features we need" >&5
(-)security/heimdal/files/patch-lib_hcrypto_rand-egd.c (+16 lines)
Line 0 Link Here
1
--- lib/hcrypto/rand-egd.c.orig	2012-12-09 22:06:44.000000000 +0000
2
+++ lib/hcrypto/rand-egd.c	2015-04-10 11:58:58.243409314 +0100
3
@@ -33,6 +33,8 @@
4
 
5
 #include <config.h>
6
 
7
+#ifdef HAVE_RAND_EGD
8
+
9
 #include <sys/types.h>
10
 #ifdef HAVE_SYS_UN_H
11
 #include <sys/un.h>
12
@@ -258,3 +260,4 @@
13
 
14
     return 1;
15
 }
16
+#endif
(-)security/heimdal/files/patch-lib_krb5_crypto-rand.c (+18 lines)
Line 0 Link Here
1
--- lib/krb5/crypto-rand.c.orig	2012-12-09 22:06:44.000000000 +0000
2
+++ lib/krb5/crypto-rand.c	2015-04-10 11:58:58.249427321 +0100
3
@@ -66,6 +66,7 @@
4
 	krb5_context context;
5
 	const char *p;
6
 
7
+#ifdef HAVE_RAND_EGD
8
 	/* Try using egd */
9
 	if (!krb5_init_context(&context)) {
10
 	    p = krb5_config_get_string(context, NULL, "libdefaults",
11
@@ -74,6 +75,7 @@
12
 		RAND_egd_bytes(p, ENTROPY_NEEDED);
13
 	    krb5_free_context(context);
14
 	}
15
+#endif
16
 #else
17
 	/* TODO: Once a Windows CryptoAPI RAND method is defined, we
18
 	   can use that and failover to another method. */

Return to bug 198527