Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
Security:

Major enhancements in Samba 3.3.10 include:

   o Fix changing of ACLs on writable file with "dos filemode=yes" (bug #5202).
   o Fix smbd crashes in dns_register_smbd_reply (bug #6696).
   o Fix Winbind crashes when queried from nss (bug #6889).
   o Fix Winbind crash when retrieving empty group members (bug #7014).
   o Fix interdomain trusts with Win2008R2 (bug #6697).
This commit is contained in:
Timur I. Bakeyev 2010-02-05 00:46:05 +00:00
parent 76c40a59f4
commit 74538b648b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=249245
14 changed files with 91 additions and 117 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= samba
PORTVERSION?= 3.3.9
PORTVERSION?= 3.3.10
PORTREVISION?= 0
CATEGORIES?= net
MASTER_SITES= ${MASTER_SITE_SAMBA}

View File

@ -1,3 +1,3 @@
MD5 (samba-3.3.9.tar.gz) = d99c3ccc3066d1c6a0dba4de02aad24b
SHA256 (samba-3.3.9.tar.gz) = 41a8919e3a32cf7523c49473edb478f3a7ec7d4ae4d125297a18d48f79e17f91
SIZE (samba-3.3.9.tar.gz) = 26104983
MD5 (samba-3.3.10.tar.gz) = 84645ff5f0fb213e2371e629507dc8bb
SHA256 (samba-3.3.10.tar.gz) = 93246d97038b885be2930b6ec814c2680f7adc9b7d675fed68c26aed2951ab2c
SIZE (samba-3.3.10.tar.gz) = 26133606

View File

@ -1,5 +1,5 @@
--- ./configure.in.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./configure.in 2009-06-26 00:41:37.000000000 +0000
--- ./configure.in.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./configure.in 2010-02-05 00:27:01.000000000 +0000
@@ -189,16 +189,6 @@
fi
fi
@ -17,7 +17,7 @@
#################################################
# check for a shared memory profiling support
AC_MSG_CHECKING(whether to use profiling)
@@ -1996,9 +1986,6 @@
@@ -1976,9 +1966,6 @@
AC_MSG_CHECKING([PICFLAG])
AC_MSG_RESULT([$PICFLAG])
@ -27,7 +27,7 @@
AC_CACHE_CHECK([whether building shared libraries actually works],
[ac_cv_shlib_works],[
# try building a trivial shared library
@@ -4175,10 +4162,10 @@
@@ -4180,10 +4167,10 @@
################################################################
# first test for Active Directory support being enabled
@ -42,7 +42,7 @@
##################################################################
# then test for uuid.h (necessary to generate unique DNS keynames
# (uuid.h is required for this test)
@@ -4395,15 +4382,51 @@
@@ -4400,15 +4387,51 @@
x"$ac_cv_header_pam_pam_modules_h" = x"no" ; then
if test x"${try_pam}" = x"yes";then
AC_MSG_ERROR([--with-pam=yes but pam_modules.h not found])
@ -98,7 +98,7 @@
if test x"$create_pam_modules" = x"yes"; then
AC_DEFINE(WITH_PAM_MODULES,1,[Whether to include PAM MODULES support])
@@ -4413,7 +4436,7 @@
@@ -4418,7 +4441,7 @@
AC_CHECK_HEADERS(pam/pam_ext.h pam/_pam_macros.h)
AC_CHECK_FUNC_EXT(pam_vsyslog,$PAM_LIBS)
else
@ -107,7 +107,7 @@
fi
fi
AC_MSG_CHECKING(whether to use PAM support)
@@ -5968,6 +5991,7 @@
@@ -5973,6 +5996,7 @@
NSSSONAMEVERSIONSUFFIX=".1"
WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_freebsd.o \
nsswitch/winbind_nss_linux.o"
@ -115,7 +115,7 @@
WINBIND_NSS="nsswitch/nss_winbind.$SHLIBEXT"
WINBIND_WINS_NSS="nsswitch/nss_wins.$SHLIBEXT"
;;
@@ -6046,23 +6070,15 @@
@@ -6051,23 +6075,15 @@
fi
# Display test results
@ -139,7 +139,7 @@
## Only worry about libwbclient if we have shared library support
## and winbindd
LIBWBCLIENT_SHARED=$LIBWBCLIENT_SHARED_TARGET
@@ -6080,26 +6096,34 @@
@@ -6085,26 +6101,34 @@
EXTRA_BIN_PROGS="$EXTRA_BIN_PROGS bin/wbinfo\$(EXEEXT)"
EXTRA_SBIN_PROGS="$EXTRA_SBIN_PROGS bin/winbindd\$(EXEEXT)"
@ -178,7 +178,7 @@
AC_SUBST(WINBIND_KRB5_LOCATOR)
@@ -6286,13 +6310,21 @@
@@ -6291,13 +6315,21 @@
# Start
AC_CHECK_FUNC(getmntent)
@ -201,7 +201,7 @@
int main(void)
{
struct statfs fsd;
@@ -6549,6 +6581,16 @@
@@ -6554,6 +6586,16 @@
fi
@ -218,7 +218,7 @@
dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
LIB_REMOVE_USR_LIB(LDFLAGS)
LIB_REMOVE_USR_LIB(LIBS)
@@ -6605,6 +6647,8 @@
@@ -6610,6 +6652,8 @@
pkgconfig/wbclient.pc
pkgconfig/netapi.pc
pkgconfig/smbsharemodes.pc

View File

@ -1,6 +1,6 @@
--- ./include/includes.h.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./include/includes.h 2009-06-26 00:41:37.000000000 +0000
@@ -873,7 +873,7 @@
--- ./include/includes.h.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./include/includes.h 2010-02-05 00:27:01.000000000 +0000
@@ -865,7 +865,7 @@
#endif
#ifndef SIGRTMIN

View File

@ -1,5 +1,5 @@
--- ./lib/replace/libreplace_cc.m4.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./lib/replace/libreplace_cc.m4 2009-06-26 00:41:37.000000000 +0000
--- ./lib/replace/libreplace_cc.m4.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./lib/replace/libreplace_cc.m4 2010-02-05 00:27:01.000000000 +0000
@@ -145,6 +145,10 @@
AC_CHECK_TYPE(uintptr_t, unsigned long long)
AC_CHECK_TYPE(ptrdiff_t, unsigned long long)

View File

@ -1,5 +1,5 @@
--- ./m4/aclocal.m4.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./m4/aclocal.m4 2009-06-26 00:41:37.000000000 +0000
--- ./m4/aclocal.m4.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./m4/aclocal.m4 2010-02-05 00:27:01.000000000 +0000
@@ -97,14 +97,14 @@
build_lib=yes
;;
@ -17,7 +17,7 @@
build_lib=no
]
)
@@ -416,101 +416,79 @@
@@ -416,104 +416,81 @@
dnl those with the standalone portable libiconv installed).
AC_MSG_CHECKING(for iconv in $1)
jm_cv_func_iconv="no"
@ -27,75 +27,75 @@
+ jm_cv_giconv="no"
jm_save_LIBS="$LIBS"
dnl Check for include in funny place but no lib needed
if test "$jm_cv_func_iconv" != yes; then
AC_TRY_LINK([#include <stdlib.h>
- dnl Check for include in giconv.h but no lib needed
- if test "$jm_cv_func_iconv" != yes; then
- AC_TRY_LINK([#include <stdlib.h>
+ dnl Check for include in funny place but no lib needed
+ if test "$jm_cv_func_iconv" != yes; then
+ AC_TRY_LINK([#include <stdlib.h>
#include <giconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_func_iconv=yes
- jm_cv_include="giconv.h"
- jm_cv_giconv="yes"
- jm_cv_lib_iconv="")
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
- jm_cv_func_iconv=yes
- jm_cv_include="giconv.h"
- jm_cv_giconv="yes"
- jm_cv_lib_iconv="")
+ jm_cv_func_iconv=yes
+ jm_cv_include="giconv.h"
+ jm_cv_lib_iconv=""
+ jm_cv_giconv="yes")
dnl Standard iconv.h include, lib in glibc or libc ...
if test "$jm_cv_func_iconv" != yes; then
- AC_TRY_LINK([#include <stdlib.h>
- dnl Standard iconv.h include, lib in glibc or libc ...
- if test "$jm_cv_func_iconv" != yes; then
- AC_TRY_LINK([#include <stdlib.h>
+ dnl Standard iconv.h include, lib in glibc or libc ...
+ if test "$jm_cv_func_iconv" != yes; then
+ AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_include="iconv.h"
- jm_cv_func_iconv=yes
- jm_cv_lib_iconv="")
- [iconv_t cd = iconv_open("","");
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
- jm_cv_include="iconv.h"
- jm_cv_func_iconv=yes
- jm_cv_lib_iconv="")
+ jm_cv_func_iconv=yes
+ jm_cv_include="iconv.h"
+ jm_cv_lib_iconv="")
- if test "$jm_cv_lib_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -lgiconv"
- AC_TRY_LINK([#include <stdlib.h>
- dnl Include in giconv.h, libgiconv needed to link
- if test "$jm_cv_func_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -lgiconv"
- AC_TRY_LINK([#include <stdlib.h>
+ dnl Include in giconv.h, libgiconv needed to link
+ if test "$jm_cv_func_iconv" != yes; then
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -lgiconv"
+ AC_TRY_LINK([#include <stdlib.h>
#include <giconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- jm_cv_lib_iconv=yes
- jm_cv_func_iconv=yes
- jm_cv_include="giconv.h"
- jm_cv_giconv=yes
- jm_cv_lib_iconv="giconv")
- [iconv_t cd = iconv_open("","");
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_func_iconv=yes
+ jm_cv_include="giconv.h"
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
- jm_cv_lib_iconv=yes
jm_cv_func_iconv=yes
jm_cv_include="giconv.h"
- jm_cv_giconv=yes
- jm_cv_lib_iconv="giconv")
+ jm_cv_lib_iconv="giconv"
+ jm_cv_giconv=yes)
- LIBS="$jm_save_LIBS"
- LIBS="$jm_save_LIBS"
+ LIBS="$jm_save_LIBS"
- dnl Include in iconv.h, libiconv needed to link
- if test "$jm_cv_func_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -liconv"
- AC_TRY_LINK([#include <stdlib.h>
+ dnl Include in iconv.h, libiconv needed to link
+ if test "$jm_cv_func_iconv" != yes; then
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
@ -109,7 +109,8 @@
- jm_cv_lib_iconv="iconv")
- LIBS="$jm_save_LIBS"
-
- if test "$jm_cv_lib_iconv" != yes; then
- dnl Include in biconv.h, libbiconv needed to link
- if test "$jm_cv_func_iconv" != yes; then
- jm_save_LIBS="$LIBS"
- LIBS="$LIBS -lbiconv"
- AC_TRY_LINK([#include <stdlib.h>
@ -130,9 +131,10 @@
+ jm_cv_lib_iconv="iconv")
- LIBS="$jm_save_LIBS"
+ LIBS="$jm_save_LIBS"
fi
- fi
- fi
+ LIBS="$jm_save_LIBS"
+ fi
+ fi
fi
fi
@ -166,7 +168,7 @@
])
AC_DEFUN(rjs_CHARSET,[
@@ -815,6 +793,9 @@
@@ -818,6 +795,9 @@
#include <fcntl.h>
#include <signal.h>

View File

@ -1,5 +1,5 @@
--- ./nsswitch/pam_winbind.c.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./nsswitch/pam_winbind.c 2009-06-26 00:41:37.000000000 +0000
--- ./nsswitch/pam_winbind.c.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./nsswitch/pam_winbind.c 2010-02-05 00:27:01.000000000 +0000
@@ -161,7 +161,6 @@
}
#endif
@ -40,7 +40,7 @@
}
if (data != NULL) {
const char *type = (item_type != 0) ? "ITEM" : "DATA";
@@ -1298,12 +1303,12 @@
@@ -1321,12 +1326,12 @@
static bool _pam_check_remark_auth_err(struct pwb_context *ctx,
const struct wbcAuthErrorInfo *e,
const char *nt_status_string,
@ -55,7 +55,7 @@
return false;
}
@@ -1317,18 +1322,18 @@
@@ -1340,18 +1345,18 @@
error_string = _get_ntstatus_error_string(nt_status_string);
if (error_string) {
_make_remark(ctx, PAM_ERROR_MSG, error_string);
@ -77,7 +77,7 @@
return true;
}
@@ -2695,8 +2700,7 @@
@@ -2729,8 +2734,7 @@
ret = PAM_USER_UNKNOWN;
goto out;
case 0:

View File

@ -1,6 +1,6 @@
--- ./nsswitch/wins_freebsd.c.orig 2009-06-26 00:41:37.000000000 +0000
+++ ./nsswitch/wins_freebsd.c 2009-06-26 00:41:37.000000000 +0000
@@ -0,0 +1,108 @@
--- ./nsswitch/wins_freebsd.c.orig 2010-02-05 00:27:01.000000000 +0000
+++ ./nsswitch/wins_freebsd.c 2010-02-05 00:28:40.000000000 +0000
@@ -0,0 +1,79 @@
+/*
+ Unix SMB/CIFS implementation.
+
@ -24,12 +24,9 @@
+
+#include "winbind_client.h"
+
+NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname, struct hostent *he,
+ char *buffer, size_t buflen, int *h_errnop);
+NSS_STATUS _nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *he,
+ char *buffer, size_t buflen, int *h_errnop);
+
+NSS_METHOD_PROTOTYPE(__nss_wins_freebsd_gethostbyname_r);
+NSS_METHOD_PROTOTYPE(__nss_wins_freebsd_gethostbyname2_r);
+
+static ns_mtab methods[] =
@ -37,7 +34,7 @@
+ { NSDB_HOSTS, "getaddrinfo", NULL, NULL },
+ { NSDB_HOSTS, "ghbyname", NULL, NULL },
+ { NSDB_HOSTS, "ghbyaddr", NULL, NULL },
+ { NSDB_HOSTS, "gethostbyaddr_r", __nss_wins_freebsd_gethostbyname_r, _nss_wins_gethostbyname_r },
+ { NSDB_HOSTS, "gethostbyaddr_r", NULL, NULL },
+ { NSDB_HOSTS, "gethostbyname2_r", __nss_wins_freebsd_gethostbyname2_r, _nss_wins_gethostbyname2_r },
+ { NSDB_HOSTS, "getnetbyname_r", NULL, NULL },
+ { NSDB_HOSTS, "getnetbyaddr_r", NULL, NULL },
@ -48,32 +45,6 @@
+};
+
+int
+__nss_wins_freebsd_gethostbyname_r(void *retval, void *mdata, va_list ap)
+{
+ int (*fn)(const char *, struct hostent *, char *, size_t, int *);
+ const char *hostname;
+ struct hostent *he;
+ char *buffer;
+ size_t buflen;
+ int *h_errnop;
+ enum nss_status status;
+
+ fn = mdata;
+ hostname = va_arg(ap, const char *);
+ he = va_arg(ap, struct hostent *);
+ buffer = va_arg(ap, char *);
+ buflen = va_arg(ap, size_t);
+ h_errnop = va_arg(ap, int *);
+
+ status = fn(hostname, he, buffer, buflen, h_errnop);
+ status = __nss_compat_result(status, *h_errnop);
+ if (status == NS_SUCCESS)
+ *(struct hostent **)retval = he;
+
+ return (status);
+}
+
+int
+__nss_wins_freebsd_gethostbyname2_r(void *retval, void *mdata, va_list ap)
+{
+ int (*fn)(const char *, int, struct hostent *, char *, size_t, int *);

View File

@ -1,5 +1,5 @@
--- ./script/tests/dlopen.sh.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./script/tests/dlopen.sh 2009-06-26 00:41:37.000000000 +0000
--- ./script/tests/dlopen.sh.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./script/tests/dlopen.sh 2010-02-05 00:27:01.000000000 +0000
@@ -67,7 +67,7 @@
esac
done

View File

@ -1,5 +1,5 @@
--- ./smbd/aio.c.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./smbd/aio.c 2009-06-26 00:41:37.000000000 +0000
--- ./smbd/aio.c.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./smbd/aio.c 2010-02-05 00:27:01.000000000 +0000
@@ -24,9 +24,6 @@
/* The signal we'll use to signify aio done. */

View File

@ -1,5 +1,5 @@
--- ./smbd/quotas.c.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./smbd/quotas.c 2009-06-26 00:41:37.000000000 +0000
--- ./smbd/quotas.c.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./smbd/quotas.c 2010-02-05 00:27:01.000000000 +0000
@@ -1023,6 +1023,8 @@
enum clnt_stat clnt_stat;
bool ret = True;

View File

@ -1,5 +1,5 @@
--- ./smbd/statvfs.c.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./smbd/statvfs.c 2009-06-26 00:41:37.000000000 +0000
--- ./smbd/statvfs.c.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./smbd/statvfs.c 2010-02-05 00:27:01.000000000 +0000
@@ -3,6 +3,7 @@
VFS API's statvfs abstraction
Copyright (C) Alexander Bokovoy 2005

View File

@ -1,5 +1,5 @@
--- ./utils/net_time.c.orig 2009-06-23 09:35:13.000000000 +0000
+++ ./utils/net_time.c 2009-06-26 00:41:37.000000000 +0000
--- ./utils/net_time.c.orig 2010-01-14 10:12:10.000000000 +0000
+++ ./utils/net_time.c 2010-02-05 00:27:01.000000000 +0000
@@ -84,9 +84,15 @@
return "unknown";
}

View File

@ -240,6 +240,7 @@ sbin/nmbd
%%PORTDOCS%%%%DOCSDIR%%/registry/Win-2Kx-XPP-ForceLocalProfile.reg
%%PORTDOCS%%%%DOCSDIR%%/registry/Win-NT-DeleteRoamingProfile.reg
%%PORTDOCS%%%%DOCSDIR%%/registry/Win2000_PlainPassword.reg
%%PORTDOCS%%%%DOCSDIR%%/registry/Win7_Samba3DomainMember.reg
%%PORTDOCS%%%%DOCSDIR%%/registry/Win95_PlainPassword.reg
%%PORTDOCS%%%%DOCSDIR%%/registry/Win98_PlainPassword.reg
%%PORTDOCS%%%%DOCSDIR%%/registry/Win9X-CacheHandling.reg