summaryrefslogtreecommitdiff
path: root/net/samba
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2007-12-21 17:32:24 +0000
committerdrochner <drochner@pkgsrc.org>2007-12-21 17:32:24 +0000
commitc8fa83b3b6b3e284695ec1831d0be99b737e9c35 (patch)
tree8265a8ba019840f21be37a84a5b98207a4f1d22d /net/samba
parente1b6509e3cf1d504932b233c0fa9c1d775cf836f (diff)
downloadpkgsrc-c8fa83b3b6b3e284695ec1831d0be99b737e9c35.tar.gz
fix the problems with SIOCGIFCONF and its wrong use here by adding
a getifaddrs-based implementation, fix another botch in the patch for "configure", bump PKGREVISION
Diffstat (limited to 'net/samba')
-rw-r--r--net/samba/Makefile4
-rw-r--r--net/samba/distinfo9
-rw-r--r--net/samba/patches/patch-at143
-rw-r--r--net/samba/patches/patch-au35
-rw-r--r--net/samba/patches/patch-bw18
-rw-r--r--net/samba/patches/patch-da47
6 files changed, 217 insertions, 39 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile
index 1fa4bd0885e..30021735cce 100644
--- a/net/samba/Makefile
+++ b/net/samba/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.178 2007/12/10 21:44:47 adrianp Exp $
+# $NetBSD: Makefile,v 1.179 2007/12/21 17:32:24 drochner Exp $
.include "Makefile.mirrors"
DISTNAME= samba-${VERSION}
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= net
MASTER_SITES= ${SAMBA_MIRRORS:=old-versions/}
diff --git a/net/samba/distinfo b/net/samba/distinfo
index cb2e905c7c7..c20e9dd04b2 100644
--- a/net/samba/distinfo
+++ b/net/samba/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.58 2007/12/10 21:44:48 adrianp Exp $
+$NetBSD: distinfo,v 1.59 2007/12/21 17:32:24 drochner Exp $
SHA1 (samba-3.0.26a-CVE-2007-4572.patch) = 32b4f45558a0765b9cd96e67ac57a83cc62678ea
RMD160 (samba-3.0.26a-CVE-2007-4572.patch) = 81afb6ce0a58cd688fc3c25c1c8a878ca1a4b7fc
@@ -19,8 +19,8 @@ SHA1 (patch-af) = 9f14842b7d0b5e66bf1d52bcacefe5e1aa392b7c
SHA1 (patch-ag) = c73e717e053b6618b2a334602fefabe5a5f98a98
SHA1 (patch-ah) = 5bd17d69b96439797339deb07ffff59d74ac403e
SHA1 (patch-ak) = 0c69720954282022c7982d36eaee94a03db7b689
-SHA1 (patch-at) = c0501c015acb6b905b43a207675c1f61e26eba8f
-SHA1 (patch-au) = 92cdaa2fa6805a05bc10bd02e50dc563daa14f74
+SHA1 (patch-at) = 21080ca3699e7dbb61c40b9bc3d0fc39e1d82288
+SHA1 (patch-au) = 69d58caf47ecdcbc722b2980e313481126b5ed25
SHA1 (patch-av) = c29ba19e96c24ef95a9a043f8678d77c00d73506
SHA1 (patch-aw) = 5b6c1bf65d23564eaabf1bafda41a29d1f687538
SHA1 (patch-ax) = 73c182fc30dd9b1b36d77e8ba6cfec7b022a993c
@@ -42,9 +42,10 @@ SHA1 (patch-bs) = bc241be076c773c222a90b816471c09b2745497b
SHA1 (patch-bt) = 262a86f15af3550966e05949bb3c1e4325532c1f
SHA1 (patch-bu) = ba28d950f8e1c14fa99a400b79cb4d6b587a7140
SHA1 (patch-bv) = 2d80f4e24edab32bf4f620f651e70b9e63d28cc5
-SHA1 (patch-bw) = ab8d1cd12bcc06f6416f5139c9b4352457078716
+SHA1 (patch-bw) = 11f9b3713382a23075ed5980d7b8a2dbd11ecf54
SHA1 (patch-ca) = 636ddd71fb078ad93dfb96bc8399a3dbbe65ccdb
SHA1 (patch-ce) = 81c6c2d9c6c0df7180d41a0382f2b4600f545620
SHA1 (patch-cf) = 8b50f657f8f4fa71936ec4766c2517ca5d128ff7
SHA1 (patch-cg) = 2755a019759826a39c3e201f6a0d1646e6dd2fba
SHA1 (patch-ch) = 3c4c404519154e294cee134ddb4d2b9c7d8e02a2
+SHA1 (patch-da) = 2dddd250b2207d658b02ff43b46199ce4305b7f8
diff --git a/net/samba/patches/patch-at b/net/samba/patches/patch-at
index 744e3051beb..d2a0b7b7732 100644
--- a/net/samba/patches/patch-at
+++ b/net/samba/patches/patch-at
@@ -1,8 +1,16 @@
-$NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
+$NetBSD: patch-at,v 1.8 2007/12/21 17:32:25 drochner Exp $
---- configure.orig 2007-09-11 23:21:05.000000000 +0900
+--- configure.orig 2007-09-11 16:22:55.000000000 +0200
+++ configure
-@@ -1395,6 +1395,7 @@ Optional Packages:
+@@ -667,6 +667,7 @@ target_vendor
+ target_os
+ configdir
+ lockdir
++statedir
+ piddir
+ logfilebase
+ privatedir
+@@ -1395,6 +1396,7 @@ Optional Packages:
--with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)
--with-rootsbindir=DIR Which directory to use for root sbin ($ac_default_prefix/sbin)
--with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)
@@ -10,7 +18,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
--with-piddir=DIR Where to put pid files ($ac_default_prefix/var/locks)
--with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)
--with-configdir=DIR Where to put configuration files ($libdir)
-@@ -2125,6 +2126,7 @@ fi
+@@ -2125,6 +2127,7 @@ fi
rootsbindir="\${SBINDIR}"
lockdir="\${VARDIR}/locks"
@@ -18,7 +26,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
piddir="\${VARDIR}/locks"
test "${mandir}" || mandir="\${prefix}/man"
logfilebase="\${VARDIR}"
-@@ -2139,7 +2141,8 @@ swatdir="\${prefix}/swat"
+@@ -2139,7 +2142,8 @@ swatdir="\${prefix}/swat"
if test "${with_fhs+set}" = set; then
withval=$with_fhs; case "$withval" in
yes)
@@ -28,7 +36,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
piddir="\${VARDIR}/run"
mandir="\${prefix}/share/man"
logfilebase="\${VARDIR}/log/samba"
-@@ -2213,6 +2216,26 @@ fi
+@@ -2213,6 +2217,26 @@ fi
#################################################
@@ -55,16 +63,101 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
# set pid directory location
# Check whether --with-piddir was given.
-@@ -31006,7 +31029,7 @@ done
+@@ -2450,6 +2474,7 @@ fi
+
+
+
++
+ ## check for --enable-debug first before checking CFLAGS before
+ ## so that we don't mix -O and -g
+ # Check whether --enable-debug was given.
+@@ -31006,7 +31031,8 @@ done
-for ac_func in getdents getdents64
++
+for ac_func in getdents getdents64 getpwent_r
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
-@@ -49841,9 +49864,9 @@ LIBS="-lcrypto $KRB5_LIBS $LIBS"
+@@ -46527,6 +46553,75 @@ _ACEOF
+ fi
+
+ if test $iface = no; then
++{ echo "$as_me:$LINENO: checking for iface ifaddrs" >&5
++echo $ECHO_N "checking for iface ifaddrs... $ECHO_C" >&6; }
++if test "${samba_cv_HAVE_IFACE_IFADDRS+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++
++SAVE_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
++if test "$cross_compiling" = yes; then
++ samba_cv_HAVE_IFACE_IFADDRS=cross
++else
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++#define HAVE_IFACE_IFADDRS 1
++#define AUTOCONF_TEST 1
++#include "${srcdir-.}/lib/interfaces.c"
++_ACEOF
++rm -f conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ samba_cv_HAVE_IFACE_IFADDRS=yes
++else
++ echo "$as_me: program exited with status $ac_status" >&5
++echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++( exit $ac_status )
++samba_cv_HAVE_IFACE_IFADDRS=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++fi
++
++
++fi
++{ echo "$as_me:$LINENO: result: $samba_cv_HAVE_IFACE_IFADDRS" >&5
++echo "${ECHO_T}$samba_cv_HAVE_IFACE_IFADDRS" >&6; }
++CPPFLAGS="$SAVE_CPPFLAGS"
++if test x"$samba_cv_HAVE_IFACE_IFADDRS" = x"yes"; then
++ iface=yes;
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_IFACE_IFADDRS 1
++_ACEOF
++
++fi
++fi
++
++if test $iface = no; then
+ { echo "$as_me:$LINENO: checking for iface ifconf" >&5
+ echo $ECHO_N "checking for iface ifconf... $ECHO_C" >&6; }
+ if test "${samba_cv_HAVE_IFACE_IFCONF+set}" = set; then
+@@ -49841,9 +49936,9 @@ LIBS="-lcrypto $KRB5_LIBS $LIBS"
@@ -77,7 +170,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-@@ -49859,11 +49882,11 @@ cat >>conftest.$ac_ext <<_ACEOF
+@@ -49859,11 +49954,11 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
@@ -91,7 +184,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
;
return 0;
}
-@@ -49886,13 +49909,13 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
+@@ -49886,13 +49981,13 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
@@ -107,7 +200,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
ac_cv_lib_ext_crypto=no
fi
-@@ -49900,11 +49923,11 @@ rm -f core conftest.err conftest.$ac_obj
+@@ -49900,11 +49995,11 @@ rm -f core conftest.err conftest.$ac_obj
conftest$ac_exeext conftest.$ac_ext
fi
@@ -123,7 +216,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
_ACEOF
fi
-@@ -62806,31 +62829,39 @@ case "$host_os" in
+@@ -62806,31 +62901,39 @@ case "$host_os" in
NSSSONAMEVERSIONSUFFIX=".2"
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
;;
@@ -185,7 +278,7 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
;;
*irix*)
# IRIX has differently named shared libraries
-@@ -67320,6 +67351,7 @@ target_vendor!$target_vendor$ac_delim
+@@ -67320,6 +67423,7 @@ target_vendor!$target_vendor$ac_delim
target_os!$target_os$ac_delim
configdir!$configdir$ac_delim
lockdir!$lockdir$ac_delim
@@ -193,12 +286,28 @@ $NetBSD: patch-at,v 1.7 2007/10/28 07:28:47 taca Exp $
piddir!$piddir$ac_delim
logfilebase!$logfilebase$ac_delim
privatedir!$privatedir$ac_delim
-@@ -67366,7 +67398,7 @@ LDAP_LIBS!$LDAP_LIBS$ac_delim
- PAM_MODULES!$PAM_MODULES$ac_delim
+@@ -67363,7 +67467,6 @@ IDMAP_LIBS!$IDMAP_LIBS$ac_delim
+ KRB5_LIBS!$KRB5_LIBS$ac_delim
+ UUID_LIBS!$UUID_LIBS$ac_delim
+ LDAP_LIBS!$LDAP_LIBS$ac_delim
+-PAM_MODULES!$PAM_MODULES$ac_delim
+ _ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+@@ -67405,6 +67508,7 @@ _ACEOF
+ ac_delim='%!_!# '
+ for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
++PAM_MODULES!$PAM_MODULES$ac_delim
+ INSTALL_PAM_MODULES!$INSTALL_PAM_MODULES$ac_delim
+ UNINSTALL_PAM_MODULES!$UNINSTALL_PAM_MODULES$ac_delim
+ NSS_MODULES!$NSS_MODULES$ac_delim
+@@ -67488,7 +67592,7 @@ SMBD_LIBS!$SMBD_LIBS$ac_delim
+ LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
-- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
-+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 98; then
+- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/net/samba/patches/patch-au b/net/samba/patches/patch-au
index 32237aeb2f1..2e86390181c 100644
--- a/net/samba/patches/patch-au
+++ b/net/samba/patches/patch-au
@@ -1,6 +1,6 @@
-$NetBSD: patch-au,v 1.7 2007/10/28 07:28:47 taca Exp $
+$NetBSD: patch-au,v 1.8 2007/12/21 17:32:26 drochner Exp $
---- configure.in.orig 2007-08-20 22:04:51.000000000 +0900
+--- configure.in.orig 2007-08-20 15:04:51.000000000 +0200
+++ configure.in
@@ -27,6 +27,7 @@ AC_PREFIX_DEFAULT(/usr/local/samba)
@@ -60,7 +60,29 @@ $NetBSD: patch-au,v 1.7 2007/10/28 07:28:47 taca Exp $
AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink)
AC_CHECK_FUNCS(syslog vsyslog timegm)
AC_CHECK_FUNCS(setlocale nl_langinfo)
-@@ -3498,7 +3517,7 @@ if test x"$with_ads_support" != x"no"; t
+@@ -2823,6 +2842,21 @@ if test x"$samba_cv_HAVE_IFACE_AIX" = x"
+ fi
+
+ if test $iface = no; then
++AC_CACHE_CHECK([for iface ifaddrs],samba_cv_HAVE_IFACE_IFADDRS,[
++SAVE_CPPFLAGS="$CPPFLAGS"
++CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
++AC_TRY_RUN([
++#define HAVE_IFACE_IFADDRS 1
++#define AUTOCONF_TEST 1
++#include "${srcdir-.}/lib/interfaces.c"],
++ samba_cv_HAVE_IFACE_IFADDRS=yes,samba_cv_HAVE_IFACE_IFADDRS=no,samba_cv_HAVE_IFACE_IFADDRS=cross)])
++CPPFLAGS="$SAVE_CPPFLAGS"
++if test x"$samba_cv_HAVE_IFACE_IFADDRS" = x"yes"; then
++ iface=yes;AC_DEFINE(HAVE_IFACE_IFADDRS,1,[Whether iface ifaddrs is available])
++fi
++fi
++
++if test $iface = no; then
+ AC_CACHE_CHECK([for iface ifconf],samba_cv_HAVE_IFACE_IFCONF,[
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS ${SAMBA_CONFIGURE_CPPFLAGS}"
+@@ -3498,7 +3532,7 @@ if test x"$with_ads_support" != x"no"; t
AC_CHECK_LIB_EXT(k5crypto, KRB5_LIBS, krb5_encrypt_data)
# Heimdal checks.
@@ -69,7 +91,7 @@ $NetBSD: patch-au,v 1.7 2007/10/28 07:28:47 taca Exp $
AC_CHECK_LIB_EXT(asn1, KRB5_LIBS, copy_Authenticator)
AC_CHECK_LIB_EXT(roken, KRB5_LIBS, roken_getaddrinfo_hostspec)
-@@ -5719,32 +5738,40 @@ case "$host_os" in
+@@ -5719,31 +5753,39 @@ case "$host_os" in
NSSSONAMEVERSIONSUFFIX=".2"
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
;;
@@ -107,7 +129,7 @@ $NetBSD: patch-au,v 1.7 2007/10/28 07:28:47 taca Exp $
- fi
+ ;;
+ esac
- ;;
++ ;;
+
+ *netbsd*[[3-9]]*)
+ case "$UNAME_R" in
@@ -127,8 +149,7 @@ $NetBSD: patch-au,v 1.7 2007/10/28 07:28:47 taca Exp $
+ winbind_no_reason=", getpwent_r is missing on $host_os so winbind is unsupported"
+ fi
+ ;;
-+ ;;
+ esac
+ ;;
*irix*)
# IRIX has differently named shared libraries
- WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_irix.o"
diff --git a/net/samba/patches/patch-bw b/net/samba/patches/patch-bw
index da90b004a2b..1235f5e113c 100644
--- a/net/samba/patches/patch-bw
+++ b/net/samba/patches/patch-bw
@@ -1,6 +1,6 @@
-$NetBSD: patch-bw,v 1.4 2007/10/28 07:28:49 taca Exp $
+$NetBSD: patch-bw,v 1.5 2007/12/21 17:32:27 drochner Exp $
---- include/config.h.in.orig 2007-09-11 23:21:02.000000000 +0900
+--- include/config.h.in.orig 2007-09-11 16:22:53.000000000 +0200
+++ include/config.h.in
@@ -321,9 +321,6 @@
/* Define to 1 if you have the `delproplist' function. */
@@ -22,13 +22,13 @@ $NetBSD: patch-bw,v 1.4 2007/10/28 07:28:49 taca Exp $
/* Define to 1 if you have the <execinfo.h> header file. */
#undef HAVE_EXECINFO_H
-@@ -595,6 +595,9 @@
- /* Define to 1 if you have the `getpwent_r' function. */
- #undef HAVE_GETPWENT_R
+@@ -661,6 +661,9 @@
+ /* Whether iface AIX is available */
+ #undef HAVE_IFACE_AIX
-+/* Define to 1 if you have the `getpwent_r' function. */
-+#undef HAVE_GETPWENT_R
++/* Whether iface ifaddrs is available */
++#undef HAVE_IFACE_IFADDRS
+
- /* Define to 1 if you have the `getrlimit' function. */
- #undef HAVE_GETRLIMIT
+ /* Whether iface ifconf is available */
+ #undef HAVE_IFACE_IFCONF
diff --git a/net/samba/patches/patch-da b/net/samba/patches/patch-da
new file mode 100644
index 00000000000..4b112b26af5
--- /dev/null
+++ b/net/samba/patches/patch-da
@@ -0,0 +1,47 @@
+$NetBSD: patch-da,v 1.1 2007/12/21 17:32:27 drochner Exp $
+
+--- lib/interfaces.c.orig 2007-03-01 05:54:30.000000000 +0100
++++ lib/interfaces.c
+@@ -343,6 +343,42 @@ static int _get_interfaces(struct iface_
+
+ #define _FOUND_IFACE_ANY
+ #endif /* HAVE_IFACE_AIX */
++#ifdef HAVE_IFACE_IFADDRS
++
++#include <ifaddrs.h>
++
++static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
++{
++ struct ifaddrs *ia;
++ int total;
++
++ if (getifaddrs(&ia) < 0)
++ return -1;
++
++ total = 0;
++ while (ia && total < max_interfaces) {
++ if (ia->ifa_addr->sa_family != AF_INET ||
++ !(ia->ifa_flags & IFF_UP)) {
++ ia = ia->ifa_next;
++ continue;
++ }
++ strncpy(ifaces[total].name, ia->ifa_name,
++ sizeof(ifaces[total].name) - 1);
++ ifaces[total].name[sizeof(ifaces[total].name) - 1] = 0;
++ ifaces[total].ip = ((struct sockaddr_in *)(ia->ifa_addr))
++ ->sin_addr;
++ ifaces[total].netmask = ((struct sockaddr_in *)(ia->ifa_netmask))
++ ->sin_addr;
++ total++;
++ ia = ia->ifa_next;
++ }
++
++ freeifaddrs(ia);
++ return total;
++}
++
++#define _FOUND_IFACE_ANY
++#endif /* HAVE_IFACE_IFADDRS */
+ #ifndef _FOUND_IFACE_ANY
+ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
+ {