From 95eeea7213845335dc6077834d16886ed35645c7 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Thu, 17 Apr 2014 14:14:14 +0200 Subject: [PATCH] security/heimdal --- security/heimdal/Makefile | 7 ++ security/heimdal/distinfo | 5 +- security/heimdal/patches/patch-ad | 71 ++++++++++++++++--- .../heimdal/patches/patch-lib_ipc_common.c | 13 ++++ .../heimdal/patches/patch-lib_ipc_server.c | 20 ++++++ .../patches/patch-lib_krb5_get__addrs.c | 16 +++++ 6 files changed, 121 insertions(+), 11 deletions(-) create mode 100644 security/heimdal/patches/patch-lib_ipc_common.c create mode 100644 security/heimdal/patches/patch-lib_ipc_server.c create mode 100644 security/heimdal/patches/patch-lib_krb5_get__addrs.c diff --git a/security/heimdal/Makefile b/security/heimdal/Makefile index b86c35570..274e50c29 100644 --- a/security/heimdal/Makefile +++ b/security/heimdal/Makefile @@ -119,7 +119,14 @@ PLIST.vis= yes PTHREAD_AUTO_VARS= yes .endif +.if ${OPSYS} == "NetBSD" && ${OS_VARIANT} == "Minix" +CONFIGURE_ARGS+= --disable-pthread-support +.undef PLIST.hcrypto +.endif + .include "../../mk/termcap.buildlink3.mk" +.if !(${OPSYS} == "NetBSD" && ${OS_VARIANT} == "Minix") .include "../../mk/pthread.buildlink3.mk" +.endif .include "../../mk/readline.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/security/heimdal/distinfo b/security/heimdal/distinfo index 86a845405..a6b54df99 100644 --- a/security/heimdal/distinfo +++ b/security/heimdal/distinfo @@ -3,12 +3,15 @@ $NetBSD: distinfo,v 1.40 2013/12/04 10:01:30 bsiegert Exp $ SHA1 (heimdal-1.5.3.tar.gz) = 23f39a099ae862dce1f5f4e5c3720861849a4bd0 RMD160 (heimdal-1.5.3.tar.gz) = 834660b4c0fe81a3aac4ffd9d8d37d74add1fa70 Size (heimdal-1.5.3.tar.gz) = 6798305 bytes -SHA1 (patch-ad) = 3dad4f3dfb19deb37c6b684ddea3e931678c5c6e +SHA1 (patch-ad) = 76ef55e68672bbd8f8199ccb03e57a40a5b249c8 SHA1 (patch-al) = 022d5f3723bd1db7fe5e92eea5d0106851a5d424 SHA1 (patch-cf_install-catman.sh) = 8eb8ea0c0c8b281c080c85eefc3abbc7dcbe6746 SHA1 (patch-cf_libtool.m4) = cd229e0e934649cb04c3f39928d1fa12c2474f62 SHA1 (patch-cf_pthreads.m4) = eff8f355887d2f9795446073efd67ccf739db2c9 SHA1 (patch-kdc_version-script.map) = 42b0417a16b19a680f30ae34cfffd082f609d4a6 +SHA1 (patch-lib_ipc_common.c) = e8501c962f77bd98986b33fb8ed71312f7545bd4 +SHA1 (patch-lib_ipc_server.c) = 7efb8e88457959dede6abc6469282c8b2890a3b3 +SHA1 (patch-lib_krb5_get__addrs.c) = c2353f8653b927a019a810e28b2ecb4f1eda8bfd SHA1 (patch-lib_libedit_aclocal.m4) = c50025a3b9bcae9913adab251169462dbc0f3221 SHA1 (patch-lib_libedit_configure) = c029c471d68d389e67e1cc636a352a004fd6124e SHA1 (patch-lib_libedit_configure.ac) = 588b184615a80ab85d7c3624c6c05860c8e6feb0 diff --git a/security/heimdal/patches/patch-ad b/security/heimdal/patches/patch-ad index 520554e22..ff249e0df 100644 --- a/security/heimdal/patches/patch-ad +++ b/security/heimdal/patches/patch-ad @@ -1,9 +1,23 @@ -$NetBSD: patch-ad,v 1.13 2013/08/16 08:30:14 adam Exp $ - -* GNU/kFreeBSD parts: use host of Debian GNU/kFreeBSD 7.0. - ---- configure.orig 2012-01-11 13:04:10.000000000 +0000 -+++ configure +--- configure.orig Sun Dec 9 22:09:32 2012 ++++ configure Fri Apr 18 13:10:48 2014 +@@ -5210,7 +5210,7 @@ else + lt_cv_sys_max_cmd_len=8192; + ;; + +- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) ++ minix* | netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # This has been around since 386BSD, at least. Likely further. + if test -x /sbin/sysctl; then + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` +@@ -5702,7 +5702,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd*) ++minix* | netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else @@ -6779,7 +6779,7 @@ ia64-*-hpux*) rm -rf conftest* ;; @@ -13,7 +27,7 @@ $NetBSD: patch-ad,v 1.13 2013/08/16 08:30:14 adam Exp $ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext -@@ -6791,7 +6791,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* +@@ -6791,7 +6791,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -22,7 +36,7 @@ $NetBSD: patch-ad,v 1.13 2013/08/16 08:30:14 adam Exp $ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) -@@ -6810,7 +6810,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* +@@ -6810,7 +6810,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; *64-bit*) case $host in @@ -31,7 +45,44 @@ $NetBSD: patch-ad,v 1.13 2013/08/16 08:30:14 adam Exp $ LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) -@@ -12702,7 +12702,11 @@ fi #if test -n "$GCC"; then +@@ -9130,7 +9130,7 @@ _LT_EOF + fi + ;; + +- netbsd*) ++ minix* | netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -9763,7 +9763,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } + link_all_deplibs=yes + ;; + +- netbsd*) ++ minix* | netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -10799,6 +10799,18 @@ fi + dynamic_linker='GNU/Linux ld.so' + ;; + ++minix*) ++ version_type=sunos ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' ++ soname_spec='${libname}${release}${shared_ext}$major' ++ dynamic_linker='Minix ld.elf_so' ++ shlibpath_var=LD_LIBRARY_PATH ++ shlibpath_overrides_runpath=yes ++ hardcode_into_libs=yes ++ ;; ++ + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -12702,7 +12714,11 @@ fi #if test -n "$GCC"; then esac CC="$CC $abi" @@ -44,7 +95,7 @@ $NetBSD: patch-ad,v 1.13 2013/08/16 08:30:14 adam Exp $ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 -@@ -14245,7 +14249,7 @@ case "$host" in +@@ -14245,7 +14261,7 @@ case "$host" in ;; esac ;; diff --git a/security/heimdal/patches/patch-lib_ipc_common.c b/security/heimdal/patches/patch-lib_ipc_common.c new file mode 100644 index 000000000..645ff7c02 --- /dev/null +++ b/security/heimdal/patches/patch-lib_ipc_common.c @@ -0,0 +1,13 @@ +$NetBSD$ + +--- lib/ipc/common.c.orig Tue Jan 10 21:53:51 2012 ++++ lib/ipc/common.c +@@ -91,7 +91,7 @@ _heim_ipc_create_cred(uid_t uid, gid_t gid, pid_t pid, + return 0; + } + +-#ifndef HAVE_GCD ++#if !defined(HAVE_GCD) && defined(ENABLE_PTHREAD_SUPPORT) + struct heim_isemaphore { + HEIMDAL_MUTEX mutex; + pthread_cond_t cond; diff --git a/security/heimdal/patches/patch-lib_ipc_server.c b/security/heimdal/patches/patch-lib_ipc_server.c new file mode 100644 index 000000000..6844a2b43 --- /dev/null +++ b/security/heimdal/patches/patch-lib_ipc_server.c @@ -0,0 +1,20 @@ +$NetBSD$ + +--- lib/ipc/server.c.orig Tue Jan 10 21:53:51 2012 ++++ lib/ipc/server.c +@@ -525,6 +525,7 @@ update_client_creds(struct client *c) + } + } + #endif ++#ifndef __minix + #ifdef SO_PEERCRED + /* Linux */ + { +@@ -538,6 +539,7 @@ update_client_creds(struct client *c) + return 1; + } + } ++#endif + #endif + #if defined(LOCAL_PEERCRED) && defined(XUCRED_VERSION) + { diff --git a/security/heimdal/patches/patch-lib_krb5_get__addrs.c b/security/heimdal/patches/patch-lib_krb5_get__addrs.c new file mode 100644 index 000000000..e7553f2d9 --- /dev/null +++ b/security/heimdal/patches/patch-lib_krb5_get__addrs.c @@ -0,0 +1,16 @@ +$NetBSD$ + +--- lib/krb5/get_addrs.c.orig Tue Jan 10 21:53:51 2012 ++++ lib/krb5/get_addrs.c +@@ -189,9 +189,11 @@ find_all_addresses (krb5_context context, krb5_address + continue; + if (!krb5_sockaddr_is_loopback(ifa->ifa_addr)) + continue; ++#ifdef IFF_LOOPBACK + if ((ifa->ifa_flags & IFF_LOOPBACK) == 0) + /* Presumably loopback addrs are only used on loopback ifs! */ + continue; ++#endif + ret = krb5_sockaddr2address(context, + ifa->ifa_addr, &res->val[idx]); + if (ret)