Here is an update to Samba 3.6.8 and a fix for potential fd leaks upon errors within the utmp code.
Index: Makefile =================================================================== RCS file: /home/cvs/ports/net/samba/Makefile,v retrieving revision 1.170 diff -u -p -r1.170 Makefile --- Makefile 4 Sep 2012 10:00:20 -0000 1.170 +++ Makefile 19 Sep 2012 01:56:37 -0000 @@ -5,7 +5,7 @@ SHARED_ONLY= Yes COMMENT-main= SMB and CIFS client and server for UNIX COMMENT-docs= additional documentation and examples for Samba -DISTNAME= samba-3.6.7 +DISTNAME= samba-3.6.8 PKGNAME-main= ${DISTNAME} FULLPKGNAME-docs= ${DISTNAME:S/-/-docs-/} FULLPKGPATH-docs= net/samba,-docs @@ -59,7 +59,7 @@ USE_GMAKE= Yes USE_GROFF= Yes #SEPARATE_BUILD= Yes CONFIGURE_STYLE= gnu -AUTOCONF_VERSION= 2.63 +AUTOCONF_VERSION= 2.68 CONFIGURE_ARGS= --disable-fam \ --libdir="${PREFIX}/lib/samba" \ Index: distinfo =================================================================== RCS file: /home/cvs/ports/net/samba/distinfo,v retrieving revision 1.33 diff -u -p -r1.33 distinfo --- distinfo 4 Sep 2012 10:00:20 -0000 1.33 +++ distinfo 19 Sep 2012 01:50:16 -0000 @@ -1,2 +1,2 @@ -SHA256 (samba-3.6.7.tar.gz) = uFig8BG6f+VUiBucfmyxyct/rOIu2Ghg9WD8rsxO1Mo= -SIZE (samba-3.6.7.tar.gz) = 34067900 +SHA256 (samba-3.6.8.tar.gz) = T1oXGo2QLGtPgi7YdcUeuDORltnM8OzX9lIclms1FN4= +SIZE (samba-3.6.8.tar.gz) = 34070798 Index: patches/patch-source3_configure_in =================================================================== RCS file: /home/cvs/ports/net/samba/patches/patch-source3_configure_in,v retrieving revision 1.4 diff -u -p -r1.4 patch-source3_configure_in --- patches/patch-source3_configure_in 4 Sep 2012 10:00:20 -0000 1.4 +++ patches/patch-source3_configure_in 19 Sep 2012 01:53:01 -0000 @@ -1,55 +1,7 @@ $OpenBSD: patch-source3_configure_in,v 1.4 2012/09/04 10:00:20 sthen Exp $ ---- source3/configure.in.orig Thu Aug 30 15:48:05 2012 -+++ source3/configure.in Thu Aug 30 15:48:02 2012 -@@ -753,23 +753,38 @@ AC_CHECK_HEADERS(linux/falloc.h) - - dnl check for OS implementation of md5 conformant to rfc1321 - AC_CHECK_HEADERS(md5.h) -+ -+samba_cv_md5lib=none -+ - if test x"$ac_cv_header_md5_h" = x"yes"; then - AC_DEFINE(HAVE_MD5_H, 1, - [Whether md5.h is available.]) -- AC_CHECK_LIB(md5, MD5Update, -- [ -- LIBS="${LIBS} -lmd5" -- CRYPTO_MD5_OBJ= -- AC_DEFINE(HAVE_LIBMD5, 1, -- [Whether libmd5 conformant to rfc1321 is available.])], -- [ -- CRYPTO_MD5_OBJ="../lib/crypto/md5.o"]) -+ AC_CHECK_LIB(md5, MD5Update, [samba_cv_md5lib=md5]) -+fi -+ -+if test x"$ac_cv_header_md5_h" = x"yes" -a \ -+ x"$samba_cv_md5lib" = x"none" ; then -+ AC_CHECK_LIB(md, MD5Update, [samba_cv_md5lib=md]) -+fi -+ -+if test x"$ac_cv_header_md5_h" = x"yes" -a \ -+ x"$samba_cv_md5lib" = x"none" ; then -+ AC_CHECK_LIB(c, MD5Update, [samba_cv_md5lib=""]) -+fi -+ -+if test x"$samba_cv_md5lib" != x"none" ; then -+ if test x"$samba_cv_md5lib" != x ; then -+ LIBS="${LIBS} -l${samba_cv_md5lib}" -+ fi -+ CRYPTO_MD5_OBJ= -+ AC_DEFINE(HAVE_LIBMD5, 1, -+ [Whether libmd5 conformant to rfc1321 is available.]) - else - CRYPTO_MD5_OBJ="../lib/crypto/md5.o" - fi -+ - AC_SUBST(CRYPTO_MD5_OBJ) - -- - AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[ - #if HAVE_RPC_RPC_H - #include <rpc/rpc.h> -@@ -853,9 +868,15 @@ if test x$enable_cups != xno; then +--- source3/configure.in.orig Fri Sep 14 04:12:09 2012 ++++ source3/configure.in Tue Sep 18 21:51:47 2012 +@@ -869,9 +869,15 @@ if test x$enable_cups != xno; then if test "x$CUPS_CONFIG" != x; then @@ -65,7 +17,7 @@ $OpenBSD: patch-source3_configure_in,v 1 if test x"$ac_cv_header_cups_cups_h" = xyes -a \ x"$ac_cv_header_cups_language_h" = xyes; then -@@ -863,18 +884,19 @@ if test x$enable_cups != xno; then +@@ -879,18 +885,19 @@ if test x$enable_cups != xno; then # underlinked. With cups-config --libs we pull in unwanted and unneeded # dendencies including thread libraries - use cups-config only if really # required. @@ -89,7 +41,7 @@ $OpenBSD: patch-source3_configure_in,v 1 PRINT_LIBS=$ac_save_PRINT_LIBS fi -@@ -1659,8 +1681,7 @@ DSO_EXPORTS="" +@@ -1675,8 +1682,7 @@ DSO_EXPORTS="" ;; *openbsd*) BLDSHARED="true" LDSHFLAGS="-shared" @@ -99,7 +51,7 @@ $OpenBSD: patch-source3_configure_in,v 1 PICFLAG="-fPIC" AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block]) AC_DEFINE(BROKEN_GETGRNAM,1,[Does getgrnam work correctly]) -@@ -6769,13 +6790,43 @@ fi +@@ -6784,13 +6790,43 @@ fi CFLAGS=$CFLAGS_SAVE Index: patches/patch-source3_smbd_utmp_c =================================================================== RCS file: /home/cvs/ports/net/samba/patches/patch-source3_smbd_utmp_c,v retrieving revision 1.1 diff -u -p -r1.1 patch-source3_smbd_utmp_c --- patches/patch-source3_smbd_utmp_c 10 Apr 2012 22:01:20 -0000 1.1 +++ patches/patch-source3_smbd_utmp_c 14 Sep 2012 00:29:49 -0000 @@ -1,7 +1,7 @@ $OpenBSD: patch-source3_smbd_utmp_c,v 1.1 2012/04/10 22:01:20 sthen Exp $ ---- source3/smbd/utmp.c.orig Sat Apr 7 14:23:20 2012 -+++ source3/smbd/utmp.c Tue Apr 10 22:56:36 2012 -@@ -253,14 +253,58 @@ static char *uw_pathname(TALLOC_CTX *ctx, +--- source3/smbd/utmp.c.orig Mon Jul 30 13:13:16 2012 ++++ source3/smbd/utmp.c Thu Sep 13 20:29:38 2012 +@@ -253,14 +253,59 @@ static char *uw_pathname(TALLOC_CTX *ctx, } #ifndef HAVE_PUTUTLINE @@ -22,19 +22,19 @@ $OpenBSD: patch-source3_smbd_utmp_c,v 1. + return; + + if (!setttyent()) -+ return; ++ goto error; + + for (topslot = 0; getttyent() != (struct ttyent *)NULL; ) + topslot++; + + if (!endttyent()) -+ return; -+ ++ goto error; ++ + (void) lseek(fd, (off_t)(topslot * sizeof(struct utmp)), SEEK_SET); + + DEBUG(1,("pututline(%s, %s, %d); topslot=%d\n", + u->ut_line, u->ut_name, claim, topslot)); -+ ++ + while (1) { + if (read(fd, &ubuf, sizeof(ubuf)) == sizeof(ubuf)) { + if ((claim && !ubuf.ut_name[0]) || @@ -51,13 +51,14 @@ $OpenBSD: patch-source3_smbd_utmp_c,v 1. + break; + } + } -+ ++ + if (!claim) { + memset((char *)&u->ut_name, '\0', sizeof(u->ut_name)); + memset((char *)&u->ut_host, '\0', sizeof(u->ut_host)); + } + (void) write(fd, u, sizeof(struct utmp)); -+ ++ ++error: + (void) close(fd); } #endif /* HAVE_PUTUTLINE */ Index: pkg/PLIST-docs =================================================================== RCS file: /home/cvs/ports/net/samba/pkg/PLIST-docs,v retrieving revision 1.18 diff -u -p -r1.18 PLIST-docs --- pkg/PLIST-docs 27 Jun 2012 07:29:17 -0000 1.18 +++ pkg/PLIST-docs 19 Sep 2012 02:39:54 -0000 @@ -51,7 +51,6 @@ share/examples/samba/VFS/configure share/examples/samba/VFS/configure.in share/examples/samba/VFS/install-sh share/examples/samba/VFS/module_config.h.in -share/examples/samba/VFS/module_config.h.in~ share/examples/samba/VFS/shadow_copy_test.c share/examples/samba/VFS/skel_opaque.c share/examples/samba/VFS/skel_transparent.c -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.