Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2018 12:32:45 +0000 (UTC)
From:      "Timur I. Bakeyev" <timur@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475995 - in head/net/samba48: . files
Message-ID:  <201807311232.w6VCWj1p069921@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: timur
Date: Tue Jul 31 12:32:45 2018
New Revision: 475995
URL: https://svnweb.freebsd.org/changeset/ports/475995

Log:
  Update Samba 4.8 to the 4.8.3 version.

Added:
  head/net/samba48/files/0001-audit.patch   (contents, props changed)
  head/net/samba48/files/0001-bug-13351.patch   (contents, props changed)
  head/net/samba48/files/0001-bug-13441.patch   (contents, props changed)
  head/net/samba48/files/0001-bug-13451.patch   (contents, props changed)
  head/net/samba48/files/0001-bug-13537.patch   (contents, props changed)
  head/net/samba48/files/0001-ctdb.patch   (contents, props changed)
  head/net/samba48/files/patch-ctdb__common__ctdb_util.c   (contents, props changed)
  head/net/samba48/files/patch-dnssock.c   (contents, props changed)
Deleted:
  head/net/samba48/files/0001-bug-13427.patch
  head/net/samba48/files/patch-vfs_full_audit.c
Modified:
  head/net/samba48/Makefile
  head/net/samba48/distinfo
  head/net/samba48/files/0001-Zfs-provision-1.patch
  head/net/samba48/files/0001-bug-228462.patch
  head/net/samba48/files/patch-ctdb__wscript
  head/net/samba48/files/patch-lib__util__debug.c
  head/net/samba48/files/patch-source3__smbd__utmp.c
  head/net/samba48/files/patch-source3__wscript

Modified: head/net/samba48/Makefile
==============================================================================
--- head/net/samba48/Makefile	Tue Jul 31 12:13:08 2018	(r475994)
+++ head/net/samba48/Makefile	Tue Jul 31 12:32:45 2018	(r475995)
@@ -3,7 +3,7 @@
 
 PORTNAME=			${SAMBA4_BASENAME}48
 PORTVERSION=			${SAMBA4_VERSION}
-PORTREVISION=			1
+PORTREVISION=			0
 CATEGORIES?=			net
 MASTER_SITES=			SAMBA/samba/stable SAMBA/samba/rc
 DISTNAME=			${SAMBA4_DISTNAME}
@@ -14,20 +14,24 @@ COMMENT=			Free SMB/CIFS and AD/DC server and client f
 LICENSE=			GPLv3
 
 BROKEN_powerpc64=		fails to compile: auth.idl:107: Unable to determine origin of type struct cli_credentials
-
 IGNORE_NONTHREAD_PYTHON=	needs port lang/python${PYTHON_SUFFIX} to be build with THREADS support
 
 CONFLICTS_INSTALL?=		samba4-4.0.* samba4[1-79]-4.* p5-Parse-Pidl-4.*
 
 EXTRA_PATCHES+=			${PATCHDIR}/0001-Zfs-provision-1.patch:-p1
 EXTRA_PATCHES+=			${PATCHDIR}/0001-Freenas-master-mdns-fixes-22.patch:-p1
-EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-13427.patch:-p1
+EXTRA_PATCHES+=			${PATCHDIR}/0001-audit.patch:-p1
+EXTRA_PATCHES+=			${PATCHDIR}/0001-ctdb.patch:-p1
 EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-13175.patch:-p1
+EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-13351.patch:-p1
+EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-13441.patch:-p1
+EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-13451.patch:-p1
+EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-13537.patch:-p1
 EXTRA_PATCHES+=			${PATCHDIR}/0001-bug-228462.patch:-p1
 
 SAMBA4_BASENAME=		samba
 SAMBA4_PORTNAME=		${SAMBA4_BASENAME}4
-SAMBA4_VERSION=			4.8.2
+SAMBA4_VERSION=			4.8.3
 SAMBA4_DISTNAME=		${SAMBA4_BASENAME}-${SAMBA4_VERSION:S|.p|pre|:S|.r|rc|:S|.t|tp|:S|.a|alpha|}
 
 WRKSRC?=			${WRKDIR}/${DISTNAME}
@@ -98,7 +102,7 @@ OPTIONS_DEFINE+=		DEVELOPER MANDOC
 OPTIONS_DEFINE_amd64=		AESNI
 OPTIONS_DEFAULT_amd64=		AESNI
 
-OPTIONS_DEFINE+=		CUPS GPGME NTVFS SPOTLIGHT
+OPTIONS_DEFINE+=		CLUSTER CUPS GPGME NTVFS SPOTLIGHT
 #OPTIONS_DEFINE+=		MEMORY_DEBUG
 
 OPTIONS_SINGLE=			GSSAPI
@@ -133,9 +137,11 @@ GSSAPI_BUILTIN_DESC=		GSSAPI support via bundled Heimd
 BIND911_DESC=			Use Bind 9.11 as AD DC DNS server frontend
 NSUPDATE_DESC=			Use samba NSUPDATE utility for AD DC
 ##############################################################################
-PLIST_SUB+=			CLUSTER="@comment "
-SUB_LIST+=			CLUSTER="@comment "
-# XXX: Unconditional dependencies which can't be switched off(if present in the system)
+# XXX: Unconditional dependencies which can't be switched off(if present in
+# the system)
+# Readline(sponsored by Python)
+# XXX: USES=readline pollutes CPPFLAGS, so we explicitly put dependency
+LIB_DEPENDS+=			libreadline.so.7:devel/readline
 # popt
 LIB_DEPENDS+=			libpopt.so:devel/popt
 # inotify
@@ -159,7 +165,7 @@ RUN_DEPENDS+=			libarchive>=3.1.2:archivers/libarchive
 #SAMBA4_BUNDLED_TALLOC=		yes
 #SAMBA4_BUNDLED_TEVENT=		yes
 #SAMBA4_BUNDLED_TDB=		yes
-#SAMBA4_BUNDLED_LDB=		yes
+SAMBA4_BUNDLED_LDB=		yes
 SAMBA4_LDB=			13
 # cmocka
 .if defined(SAMBA4_BUNDLED_CMOCKA)
@@ -182,8 +188,8 @@ PLIST_SUB+=			SAMBA4_BUNDLED_TALLOC=""
 SUB_LIST+=			SAMBA4_BUNDLED_TALLOC=""
 .else
 SAMBA4_BUNDLED_LIBS+=		!talloc
-BUILD_DEPENDS+=			talloc>=2.1.13:devel/talloc
-RUN_DEPENDS+=			talloc>=2.1.13:devel/talloc
+BUILD_DEPENDS+=			talloc>=2.1.14:devel/talloc
+RUN_DEPENDS+=			talloc>=2.1.14:devel/talloc
 PLIST_SUB+=			SAMBA4_BUNDLED_TALLOC="@comment "
 SUB_LIST+=			SAMBA4_BUNDLED_TALLOC="@comment "
 .endif
@@ -195,8 +201,8 @@ PLIST_SUB+=			SAMBA4_BUNDLED_TEVENT=""
 SUB_LIST+=			SAMBA4_BUNDLED_TEVENT=""
 .else
 SAMBA4_BUNDLED_LIBS+=		!tevent
-BUILD_DEPENDS+=			tevent>=0.9.36:devel/tevent
-RUN_DEPENDS+=			tevent>=0.9.36:devel/tevent
+BUILD_DEPENDS+=			tevent>=0.9.37:devel/tevent
+RUN_DEPENDS+=			tevent>=0.9.37:devel/tevent
 PLIST_SUB+=			SAMBA4_BUNDLED_TEVENT="@comment "
 SUB_LIST+=			SAMBA4_BUNDLED_TEVENT="@comment "
 .endif
@@ -222,8 +228,8 @@ PLIST_SUB+=			SAMBA4_BUNDLED_LDB=""
 SUB_LIST+=			SAMBA4_BUNDLED_LDB=""
 .else
 .       if ${SAMBA4_LDB} == 13
-BUILD_DEPENDS+=			ldb13>=1.3.3:databases/ldb13
-RUN_DEPENDS+=			ldb13>=1.3.3:databases/ldb13
+BUILD_DEPENDS+=			ldb13>=1.3.4:databases/ldb13
+RUN_DEPENDS+=			ldb13>=1.3.4:databases/ldb13
 .       elif ${SAMBA4_LDB} == 12
 BUILD_DEPENDS+=			ldb12>=1.2.3:databases/ldb12
 RUN_DEPENDS+=			ldb12>=1.2.3:databases/ldb12
@@ -431,10 +437,10 @@ BUILD_DEPENDS+=			${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.
 RUN_DEPENDS+=			${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR}
 # XXX: This is a gross hack to make port use both Python 2.7+ and 3.3+
 # This is not officially supported, use at your own risk
-.if defined(WITH_SAMBA4_PYTHON3) && ${WITH_SAMBA4_PYTHON3:Mpython3\.[0-9]}
-SAMBA4_PYTHON3=			${WITH_SAMBA4_PYTHON3}
-SAMBA4_PYTHON3_VERSION:=	${SAMBA4_PYTHON3:S/^python//}
-SAMBA4_PYTHON3_VER:=		${SAMBA4_PYTHON3_VERSION:C/\.//}
+.if defined(WITH_SAMBA4_PYTHON3) && ${WITH_SAMBA4_PYTHON3:M3\.[0-9]}
+SAMBA4_PYTHON3_VERSION=		${WITH_SAMBA4_PYTHON3}
+SAMBA4_PYTHON3=			python${SAMBA4_PYTHON3_VERSION}
+SAMBA4_PYTHON3_VER=		${SAMBA4_PYTHON3_VERSION:C/\.//}
 .if !exists(${PORTSDIR}/lang/python${SAMBA4_PYTHON3_VER})
 .error				unsupported or unknown Python version ${SAMBA4_PYTHON3_VERSION}
 .endif
@@ -476,8 +482,11 @@ PLIST_FILES+=			lib/samba4/private/libaesni-intel-samb
 CONFIGURE_ARGS+=		--accel-aes=none
 .endif
 
-.if ${PORT_OPTIONS:MAD_DC} && ${PORT_OPTIONS:MGSSAPI_MIT}
+.if ${PORT_OPTIONS:MGSSAPI_MIT}
+PLIST_FILES+=			lib/samba4/winbind-krb5-localauth.so
+.       if ${PORT_OPTIONS:MAD_DC}
 PLIST_FILES+=			lib/samba4/krb5/plugins/kdb/samba.so
+.       endif
 .endif
 # for libexecinfo: (so that __builtin_frame_address() finds the top of the stack)
 CFLAGS_amd64+=			-fno-omit-frame-pointer
@@ -585,6 +594,10 @@ post-install-rm-junk:
 .for f in vfs_aio_linux.8 vfs_btrfs.8 vfs_ceph.8 vfs_gpfs.8
 				${RM} ${STAGEDIR}${PREFIX}/man/man8/${f}
 .endfor
+.if defined(NO_PYTHON)
+				${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/samba/third_party/dns \
+					 ${STAGEDIR}${PYTHON_SITELIBDIR}/samba/third_party/iso8601
+.endif
 
 post-install: post-install-rm-junk
 				${LN} -sf smb.conf.5.gz ${STAGEDIR}${PREFIX}/man/man5/smb4.conf.5.gz

Modified: head/net/samba48/distinfo
==============================================================================
--- head/net/samba48/distinfo	Tue Jul 31 12:13:08 2018	(r475994)
+++ head/net/samba48/distinfo	Tue Jul 31 12:32:45 2018	(r475995)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1526478569
-SHA256 (samba-4.8.2.tar.gz) = 62e552296d49e6ab44bb87d120a288813fa52e42435d53a1f71b77596512bf22
-SIZE (samba-4.8.2.tar.gz) = 17675145
+TIMESTAMP = 1530185888
+SHA256 (samba-4.8.3.tar.gz) = e0569a8a605d5dfb49f1fdd11db796f4d36fe0351c4a7f21387ef253010b82ed
+SIZE (samba-4.8.3.tar.gz) = 17680660

Modified: head/net/samba48/files/0001-Zfs-provision-1.patch
==============================================================================
--- head/net/samba48/files/0001-Zfs-provision-1.patch	Tue Jul 31 12:13:08 2018	(r475994)
+++ head/net/samba48/files/0001-Zfs-provision-1.patch	Tue Jul 31 12:32:45 2018	(r475995)
@@ -120,11 +120,13 @@ diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysm
 index 63fc5d68c33..f5a536ee186 100644
 --- a/source3/smbd/pysmbd.c
 +++ b/source3/smbd/pysmbd.c
-@@ -335,6 +335,18 @@ static SMB_ACL_T make_simple_acl(gid_t gid, mode_t chmod_mode)
+@@ -368,6 +368,20 @@ static SMB_ACL_T make_simple_acl(TALLOC_
  	return acl;
  }
  
-+static SMB_ACL_T make_simple_nfsv4_acl(gid_t gid, mode_t chmod_mode)
++static SMB_ACL_T make_simple_nfsv4_acl(TALLOC_CTX *mem_ctx,
++					gid_t gid,
++					mode_t chmod_mode)
 +{
 +	/*
 +	 * This function needs to create an NFSv4 ACL. Currently, the only way
@@ -139,25 +141,10 @@ index 63fc5d68c33..f5a536ee186 100644
  /*
    set a simple ACL on a file, as a test
   */
-@@ -363,6 +375,53 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self, PyObject *args, PyObject
- 	}
+@@ -413,6 +427,53 @@ static PyObject *py_smbd_set_simple_acl(
+ }
  
- 	ret = set_sys_acl_conn(fname, SMB_ACL_TYPE_ACCESS, acl, conn);
-+
-+	TALLOC_FREE(acl);
-+
-+	if (ret != 0) {
-+		TALLOC_FREE(frame);
-+		errno = ret;
-+		return PyErr_SetFromErrno(PyExc_OSError);
-+	}
-+
-+	TALLOC_FREE(frame);
-+
-+	Py_RETURN_NONE;
-+}
-+
-+/*
+ /*
 +  set a simple NFSv4 ACL on a file, as a test
 + */
 +static PyObject *py_smbd_set_simple_nfsv4_acl(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -175,10 +162,14 @@ index 63fc5d68c33..f5a536ee186 100644
 +					 &fname, &mode, &gid, &service))
 +		return NULL;
 +
-+	acl = make_simple_nfsv4_acl(gid, mode);
-+
 +	frame = talloc_stackframe();
 +
++	acl = make_simple_nfsv4_acl(frame, gid, mode);
++	if (acl == NULL) {
++		TALLOC_FREE(frame);
++		return NULL;
++	}
++
 +	conn = get_conn(frame, service);
 +	if (!conn) {
 +		return NULL;
@@ -187,13 +178,24 @@ index 63fc5d68c33..f5a536ee186 100644
 +	/*
 +	 * SMB_ACL_TYPE_ACCESS -> ACL_TYPE_ACCESS -> Not valid for NFSv4 ACL
 +	 */
-+	//ret = set_sys_acl_conn(fname, SMB_ACL_TYPE_ACCESS, acl, conn);
 +	ret = 0;
 +
- 	TALLOC_FREE(acl);
- 
- 	if (ret != 0) {
-@@ -483,7 +542,7 @@ static PyObject *py_smbd_unlink(PyObject *self, PyObject *args, PyObject *kwargs
++	if (ret != 0) {
++		TALLOC_FREE(frame);
++		errno = ret;
++		return PyErr_SetFromErrno(PyExc_OSError);
++	}
++
++	TALLOC_FREE(frame);
++
++	Py_RETURN_NONE;
++}
++
++/*
+   chown a file
+  */
+ static PyObject *py_smbd_chown(PyObject *self, PyObject *args, PyObject *kwargs)
+@@ -519,7 +580,7 @@ static PyObject *py_smbd_unlink(PyObject
  }
  
  /*
@@ -202,7 +204,7 @@ index 63fc5d68c33..f5a536ee186 100644
   */
  static PyObject *py_smbd_have_posix_acls(PyObject *self)
  {
-@@ -494,6 +553,86 @@ static PyObject *py_smbd_have_posix_acls(PyObject *self)
+@@ -530,6 +591,86 @@ static PyObject *py_smbd_have_posix_acls
  #endif
  }
  
@@ -289,7 +291,7 @@ index 63fc5d68c33..f5a536ee186 100644
  /*
    set the NT ACL on a file
   */
-@@ -681,9 +820,24 @@ static PyMethodDef py_smbd_methods[] = {
+@@ -717,9 +858,24 @@ static PyMethodDef py_smbd_methods[] = {
  	{ "have_posix_acls",
  		(PyCFunction)py_smbd_have_posix_acls, METH_NOARGS,
  		NULL },

Added: head/net/samba48/files/0001-audit.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/samba48/files/0001-audit.patch	Tue Jul 31 12:32:45 2018	(r475995)
@@ -0,0 +1,247 @@
+From 7d1bcfc99c393367093c903f95a5e365881b7989 Mon Sep 17 00:00:00 2001
+From: "Timur I. Bakeyev" <timur@iXsystems.com>
+Date: Fri, 22 Jun 2018 12:15:30 +0800
+Subject: [PATCH 1/3] Make sure that vfs*audit modules recognize and accept all
+ the syslog facilities.
+
+---
+ source3/modules/vfs_audit.c      | 34 +++++++++++++++++++++++-----------
+ source3/modules/vfs_extd_audit.c | 34 +++++++++++++++++++++++-----------
+ source3/modules/vfs_full_audit.c | 34 +++++++++++++++++++++++-----------
+ 3 files changed, 69 insertions(+), 33 deletions(-)
+
+diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c
+index 12477d5b01f..4f9d16c452e 100644
+--- a/source3/modules/vfs_audit.c
++++ b/source3/modules/vfs_audit.c
+@@ -33,16 +33,28 @@
+ static int audit_syslog_facility(vfs_handle_struct *handle)
+ {
+ 	static const struct enum_list enum_log_facilities[] = {
+-		{ LOG_USER, "USER" },
+-		{ LOG_LOCAL0, "LOCAL0" },
+-		{ LOG_LOCAL1, "LOCAL1" },
+-		{ LOG_LOCAL2, "LOCAL2" },
+-		{ LOG_LOCAL3, "LOCAL3" },
+-		{ LOG_LOCAL4, "LOCAL4" },
+-		{ LOG_LOCAL5, "LOCAL5" },
+-		{ LOG_LOCAL6, "LOCAL6" },
+-		{ LOG_LOCAL7, "LOCAL7" },
+-		{ -1, NULL}
++		{ LOG_AUTH,	"AUTH" },
++		{ LOG_CRON,	"CRON" },
++		{ LOG_DAEMON,	"DAEMON" },
++		{ LOG_FTP,	"FTP" },
++		{ LOG_KERN,	"KERN" },
++		{ LOG_LPR,	"LPR" },
++		{ LOG_MAIL,	"MAIL" },
++		{ LOG_NEWS,	"NEWS" },
++		{ LOG_NTP,	"NTP" },
++		{ LOG_SECURITY,	"SECURITY" },
++		{ LOG_SYSLOG,	"SYSLOG" },
++		{ LOG_USER,	"USER" },
++		{ LOG_UUCP,	"UUCP" },
++		{ LOG_LOCAL0,	"LOCAL0" },
++		{ LOG_LOCAL1,	"LOCAL1" },
++		{ LOG_LOCAL2,	"LOCAL2" },
++		{ LOG_LOCAL3,	"LOCAL3" },
++		{ LOG_LOCAL4,	"LOCAL4" },
++		{ LOG_LOCAL5,	"LOCAL5" },
++		{ LOG_LOCAL6,	"LOCAL6" },
++		{ LOG_LOCAL7,	"LOCAL7" },
++		{ -1,		NULL }
+ 	};
+ 
+ 	int facility;
+@@ -64,7 +76,7 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
+ 		{ LOG_NOTICE, "NOTICE" },
+ 		{ LOG_INFO, "INFO" },
+ 		{ LOG_DEBUG, "DEBUG" },
+-		{ -1, NULL}
++		{ -1, NULL }
+ 	};
+ 
+ 	int priority;
+diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c
+index 7d1fe273978..5307569a010 100644
+--- a/source3/modules/vfs_extd_audit.c
++++ b/source3/modules/vfs_extd_audit.c
+@@ -36,16 +36,28 @@ static int vfs_extd_audit_debug_level = DBGC_VFS;
+ static int audit_syslog_facility(vfs_handle_struct *handle)
+ {
+ 	static const struct enum_list enum_log_facilities[] = {
+-		{ LOG_USER, "USER" },
+-		{ LOG_LOCAL0, "LOCAL0" },
+-		{ LOG_LOCAL1, "LOCAL1" },
+-		{ LOG_LOCAL2, "LOCAL2" },
+-		{ LOG_LOCAL3, "LOCAL3" },
+-		{ LOG_LOCAL4, "LOCAL4" },
+-		{ LOG_LOCAL5, "LOCAL5" },
+-		{ LOG_LOCAL6, "LOCAL6" },
+-		{ LOG_LOCAL7, "LOCAL7" },
+-		{ -1, NULL}
++		{ LOG_AUTH,	"AUTH" },
++		{ LOG_CRON,	"CRON" },
++		{ LOG_DAEMON,	"DAEMON" },
++		{ LOG_FTP,	"FTP" },
++		{ LOG_KERN,	"KERN" },
++		{ LOG_LPR,	"LPR" },
++		{ LOG_MAIL,	"MAIL" },
++		{ LOG_NEWS,	"NEWS" },
++		{ LOG_NTP,	"NTP" },
++		{ LOG_SECURITY,	"SECURITY" },
++		{ LOG_SYSLOG,	"SYSLOG" },
++		{ LOG_USER,	"USER" },
++		{ LOG_UUCP,	"UUCP" },
++		{ LOG_LOCAL0,	"LOCAL0" },
++		{ LOG_LOCAL1,	"LOCAL1" },
++		{ LOG_LOCAL2,	"LOCAL2" },
++		{ LOG_LOCAL3,	"LOCAL3" },
++		{ LOG_LOCAL4,	"LOCAL4" },
++		{ LOG_LOCAL5,	"LOCAL5" },
++		{ LOG_LOCAL6,	"LOCAL6" },
++		{ LOG_LOCAL7,	"LOCAL7" },
++		{ -1,		NULL }
+ 	};
+ 
+ 	int facility;
+@@ -67,7 +79,7 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
+ 		{ LOG_NOTICE, "NOTICE" },
+ 		{ LOG_INFO, "INFO" },
+ 		{ LOG_DEBUG, "DEBUG" },
+-		{ -1, NULL}
++		{ -1, NULL }
+ 	};
+ 
+ 	int priority;
+diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
+index a205007f46f..a52af4b5740 100644
+--- a/source3/modules/vfs_full_audit.c
++++ b/source3/modules/vfs_full_audit.c
+@@ -357,16 +357,28 @@ static struct {
+ static int audit_syslog_facility(vfs_handle_struct *handle)
+ {
+ 	static const struct enum_list enum_log_facilities[] = {
+-		{ LOG_USER, "USER" },
+-		{ LOG_LOCAL0, "LOCAL0" },
+-		{ LOG_LOCAL1, "LOCAL1" },
+-		{ LOG_LOCAL2, "LOCAL2" },
+-		{ LOG_LOCAL3, "LOCAL3" },
+-		{ LOG_LOCAL4, "LOCAL4" },
+-		{ LOG_LOCAL5, "LOCAL5" },
+-		{ LOG_LOCAL6, "LOCAL6" },
+-		{ LOG_LOCAL7, "LOCAL7" },
+-		{ -1, NULL}
++		{ LOG_AUTH,	"AUTH" },
++		{ LOG_CRON,	"CRON" },
++		{ LOG_DAEMON,	"DAEMON" },
++		{ LOG_FTP,	"FTP" },
++		{ LOG_KERN,	"KERN" },
++		{ LOG_LPR,	"LPR" },
++		{ LOG_MAIL,	"MAIL" },
++		{ LOG_NEWS,	"NEWS" },
++		{ LOG_NTP,	"NTP" },
++		{ LOG_SECURITY,	"SECURITY" },
++		{ LOG_SYSLOG,	"SYSLOG" },
++		{ LOG_USER,	"USER" },
++		{ LOG_UUCP,	"UUCP" },
++		{ LOG_LOCAL0,	"LOCAL0" },
++		{ LOG_LOCAL1,	"LOCAL1" },
++		{ LOG_LOCAL2,	"LOCAL2" },
++		{ LOG_LOCAL3,	"LOCAL3" },
++		{ LOG_LOCAL4,	"LOCAL4" },
++		{ LOG_LOCAL5,	"LOCAL5" },
++		{ LOG_LOCAL6,	"LOCAL6" },
++		{ LOG_LOCAL7,	"LOCAL7" },
++		{ -1,		NULL }
+ 	};
+ 
+ 	int facility;
+@@ -387,7 +399,7 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
+ 		{ LOG_NOTICE, "NOTICE" },
+ 		{ LOG_INFO, "INFO" },
+ 		{ LOG_DEBUG, "DEBUG" },
+-		{ -1, NULL}
++		{ -1, NULL }
+ 	};
+ 
+ 	int priority;
+-- 
+2.16.3
+
+
+From b98fc517251ad25b695ef64453ffe3eaaffed5d8 Mon Sep 17 00:00:00 2001
+From: "Timur I. Bakeyev" <timur@iXsystems.com>
+Date: Fri, 22 Jun 2018 12:19:42 +0800
+Subject: [PATCH 2/3] Make "none" is the default setting for the successful and
+ failed operations in the vfs_full_audit, so you don't blow up your server by
+ just adding this module to the configuration.
+
+---
+ source3/modules/vfs_full_audit.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
+index a52af4b5740..bc40c8137dc 100644
+--- a/source3/modules/vfs_full_audit.c
++++ b/source3/modules/vfs_full_audit.c
+@@ -624,6 +624,7 @@ static int smb_full_audit_connect(vfs_handle_struct *handle,
+ 			 const char *svc, const char *user)
+ {
+ 	int result;
++	const char *none[] = { "none" };
+ 	struct vfs_full_audit_private_data *pd = NULL;
+ 
+ 	result = SMB_VFS_NEXT_CONNECT(handle, svc, user);
+@@ -663,10 +664,10 @@ static int smb_full_audit_connect(vfs_handle_struct *handle,
+ 
+ 	pd->success_ops = init_bitmap(
+ 		pd, lp_parm_string_list(SNUM(handle->conn), "full_audit",
+-					"success", NULL));
++					"success", none));
+ 	pd->failure_ops = init_bitmap(
+ 		pd, lp_parm_string_list(SNUM(handle->conn), "full_audit",
+-					"failure", NULL));
++					"failure", none));
+ 
+ 	/* Store the private data. */
+ 	SMB_VFS_HANDLE_SET_DATA(handle, pd, NULL,
+-- 
+2.16.3
+
+
+From e25f3a6cfc284737d8df941686f6629568763103 Mon Sep 17 00:00:00 2001
+From: "Timur I. Bakeyev" <timur@iXsystems.com>
+Date: Fri, 22 Jun 2018 12:36:07 +0800
+Subject: [PATCH 3/3] Document that vfs_full_audit defaults are "none" for the
+ successful and failed operations.
+
+---
+ docs-xml/manpages/vfs_full_audit.8.xml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/docs-xml/manpages/vfs_full_audit.8.xml b/docs-xml/manpages/vfs_full_audit.8.xml
+index cefe66d8b6f..ac8473f9990 100644
+--- a/docs-xml/manpages/vfs_full_audit.8.xml
++++ b/docs-xml/manpages/vfs_full_audit.8.xml
+@@ -164,7 +164,7 @@
+ 		<para>LIST is a list of VFS operations that should be
+ 		recorded if they succeed. Operations are specified using
+ 		the names listed above. Operations can be unset by prefixing
+-		the names with "!". The default is all operations.
++		the names with "!". The default is none operations.
+ 		</para>
+ 
+ 		</listitem>
+@@ -176,7 +176,7 @@
+ 		<para>LIST is a list of VFS operations that should be
+ 		recorded if they failed. Operations are specified using
+ 		the names listed above. Operations can be unset by prefixing
+-		the names with "!". The default is all operations.
++		the names with "!". The default is none operations.
+ 		</para>
+ 
+ 		</listitem>
+-- 
+2.16.3
+

Added: head/net/samba48/files/0001-bug-13351.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/samba48/files/0001-bug-13351.patch	Tue Jul 31 12:32:45 2018	(r475995)
@@ -0,0 +1,50 @@
+From 1598b78bf791b5a2b8ff52745563ebfcc2a5a0cb Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 22 Mar 2018 08:03:58 +0100
+Subject: [PATCH] s3: smbd: always set vuid in check_user_ok()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+A SMB session reauth will have invalidated conn->vuid via
+conn_clear_vuid_caches().
+
+Ensure conn->vuid always has the vuid of the current user in
+check_user_ok().
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13351
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+
+Autobuild-User(master): Ralph Böhme <slow@samba.org>
+Autobuild-Date(master): Thu Mar 22 18:26:04 CET 2018 on sn-devel-144
+
+(cherry picked from commit 42d6dd2f30b6c3b3176bd1f378422a2eb62b1008)
+---
+ source3/smbd/uid.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
+index 6eb53920abf..b24ae3cc3b0 100644
+--- a/source3/smbd/uid.c
++++ b/source3/smbd/uid.c
+@@ -202,6 +202,7 @@ static bool check_user_ok(connection_struct *conn,
+ 			conn->session_info = ent->session_info;
+ 			conn->read_only = ent->read_only;
+ 			conn->share_access = ent->share_access;
++			conn->vuid = ent->vuid;
+ 			return(True);
+ 		}
+ 	}
+@@ -250,6 +251,7 @@ static bool check_user_ok(connection_struct *conn,
+ 	ent->share_access = share_access;
+ 	free_conn_session_info_if_unused(conn);
+ 	conn->session_info = ent->session_info;
++	conn->vuid = ent->vuid;
+ 	if (vuid == UID_FIELD_INVALID) {
+ 		/*
+ 		 * Not strictly needed, just make it really
+-- 
+2.13.6
+

Added: head/net/samba48/files/0001-bug-13441.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/samba48/files/0001-bug-13441.patch	Tue Jul 31 12:32:45 2018	(r475995)
@@ -0,0 +1,343 @@
+From 1aa2785b7549205c4187c2afcd171ea1ade96ba9 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Sat, 19 May 2018 01:36:21 +0200
+Subject: [PATCH 1/3] s4:torture/vfs/fruit: decrease large resource fork size
+ in test from 1 GB to 64 MB
+
+64 MB is a more realistic value and lets the test pass on FreeBSD with
+fruit:resource=stream and vfs_streams_xattr.
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+(cherry picked from commit 2729b4329af0ad0b6a8bd188450b8abd76670d8a)
+---
+ source4/torture/vfs/fruit.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
+index 4564047e0fb..543b1c5d969 100644
+--- a/source4/torture/vfs/fruit.c
++++ b/source4/torture/vfs/fruit.c
+@@ -1594,11 +1594,11 @@ static bool test_write_atalk_rfork_io(struct torture_context *tctx,
+ 
+ 	ret &= write_stream(tree, __location__, tctx, mem_ctx,
+ 			    fname, AFPRESOURCE_STREAM_NAME,
+-			    (off_t)1<<32, 10, rfork_content);
++			    (off_t)64*1024*1024, 10, rfork_content);
+ 
+ 	ret &= check_stream(tree, __location__, tctx, mem_ctx,
+ 			    fname, AFPRESOURCE_STREAM_NAME,
+-			    (off_t)1<<32, 10, 0, 10, rfork_content);
++			    (off_t)64*1024*1024, 10, 0, 10, rfork_content);
+ 
+ 	/* Truncate back to size of 1 byte */
+ 
+-- 
+2.13.6
+
+
+From 928b66f9b798497bb694434e08384bb75d029913 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 17 May 2018 16:43:49 +0200
+Subject: [PATCH 2/3] s4:torture: test setting EOF of a stream to 0 with
+ enabled AAPL extensions
+
+macOS SMB server uses xattrs as storage backend for streams, directly
+exposing xattr get/set characteristics. Setting EOF on a stream to 0
+just deletes the xattr as macOS doesn't support 0-byte sized xattrs.
+
+Note that this does not apply to the AFP_AfpInfo and AFP_Resource
+streams, they have even stranger semantics and we have other tests
+for those.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+(cherry picked from commit cf5d471544f0cb0d072e4af1ee36798580d32897)
+---
+ selftest/knownfail.d/samba3.vfs.fruit |   3 +
+ source4/torture/vfs/fruit.c           | 197 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 200 insertions(+)
+
+diff --git a/selftest/knownfail.d/samba3.vfs.fruit b/selftest/knownfail.d/samba3.vfs.fruit
+index 8df25bccb79..5931c471086 100644
+--- a/selftest/knownfail.d/samba3.vfs.fruit
++++ b/selftest/knownfail.d/samba3.vfs.fruit
+@@ -1 +1,4 @@
+ ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\)
++^samba3.vfs.fruit metadata_netatalk.setinfo eof stream\(nt4_dc\)
++^samba3.vfs.fruit metadata_stream.setinfo eof stream\(nt4_dc\)
++^samba3.vfs.fruit streams_depot.setinfo eof stream\(nt4_dc\)
+diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
+index 543b1c5d969..1202adb2cbf 100644
+--- a/source4/torture/vfs/fruit.c
++++ b/source4/torture/vfs/fruit.c
+@@ -4578,6 +4578,202 @@ static bool test_nfs_aces(struct torture_context *tctx,
+ 	return ret;
+ }
+ 
++static bool test_setinfo_stream_eof(struct torture_context *tctx,
++				    struct smb2_tree *tree)
++{
++	bool ret = true;
++	NTSTATUS status;
++	struct smb2_create create;
++	union smb_setfileinfo sfinfo;
++	union smb_fileinfo finfo;
++	struct smb2_handle h1;
++	TALLOC_CTX *mem_ctx = talloc_new(tctx);
++	const char *fname = BASEDIR "\\file";
++	const char *sname = BASEDIR "\\file:foo";
++
++	torture_assert_goto(tctx, mem_ctx != NULL, ret, done,
++			    "talloc_new failed\n");
++
++	torture_comment(tctx, "Test setting EOF on a stream\n");
++
++	smb2_deltree(tree, BASEDIR);
++	status = torture_smb2_testdir(tree, BASEDIR, &h1);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testdir\n");
++	smb2_util_close(tree, h1);
++
++	status = torture_smb2_testfile(tree, fname, &h1);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++	smb2_util_close(tree, h1);
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	status = smb2_util_write(tree, h1, "1234567890", 0, 10);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"smb2_util_write failed\n");
++	smb2_util_close(tree, h1);
++
++	/*
++	 * Test setting EOF to 21
++	 */
++
++	torture_comment(tctx, "Setting stream EOF to 21\n");
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(sfinfo);
++	sfinfo.generic.in.file.handle = h1;
++	sfinfo.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
++	sfinfo.position_information.in.position = 21;
++	status = smb2_setinfo_file(tree, &sfinfo);
++	torture_assert_ntstatus_ok_goto(tctx, status,
++					ret, done, "set EOF 21 failed\n");
++
++	smb2_util_close(tree, h1);
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(finfo);
++	finfo.generic.level = RAW_FILEINFO_STANDARD_INFORMATION;
++	finfo.generic.in.file.handle = h1;
++	status = smb2_getinfo_file(tree, mem_ctx, &finfo);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"smb2_getinfo_file failed");
++
++	smb2_util_close(tree, h1);
++
++	torture_assert_goto(tctx, finfo.standard_info.out.size == 21,
++			    ret, done, "size != 21\n");
++
++	/*
++	 * Test setting EOF to 0
++	 */
++
++	torture_comment(tctx, "Setting stream EOF to 0\n");
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(sfinfo);
++	sfinfo.generic.in.file.handle = h1;
++	sfinfo.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
++	sfinfo.position_information.in.position = 0;
++	status = smb2_setinfo_file(tree, &sfinfo);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"set eof 0 failed\n");
++
++	smb2_util_close(tree, h1);
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(finfo);
++	finfo.generic.level = RAW_FILEINFO_STANDARD_INFORMATION;
++	finfo.generic.in.file.handle = h1;
++	status = smb2_getinfo_file(tree, mem_ctx, &finfo);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"smb2_getinfo_file failed\n");
++
++	smb2_util_close(tree, h1);
++
++	torture_assert_goto(tctx, finfo.standard_info.out.size == 0,
++			    ret, done, "size != 0\n");
++
++	/*
++	 * Test setinfo end-of-file info to 1
++	 */
++
++	torture_comment(tctx, "Setting stream EOF to 1\n");
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(sfinfo);
++	sfinfo.generic.in.file.handle = h1;
++	sfinfo.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
++	sfinfo.position_information.in.position = 1;
++	status = smb2_setinfo_file(tree, &sfinfo);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"set EOF 1 failed\n");
++
++	smb2_util_close(tree, h1);
++
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(finfo);
++	finfo.generic.level = RAW_FILEINFO_STANDARD_INFORMATION;
++	finfo.generic.in.file.handle = h1;
++	status = smb2_getinfo_file(tree, mem_ctx, &finfo);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"smb2_getinfo_file failed\n");
++
++	smb2_util_close(tree, h1);
++
++	torture_assert_goto(tctx, finfo.standard_info.out.size == 1,
++			    ret, done, "size != 1\n");
++
++	/*
++	 * Test setting EOF to 0 with AAPL enabled, should delete stream
++	 */
++
++	torture_comment(tctx, "Enabling AAPL extensions\n");
++
++	ret = enable_aapl(tctx, tree);
++	torture_assert(tctx, ret == true, "enable_aapl failed\n");
++
++	torture_comment(tctx, "Setting stream EOF to 0\n");
++	status = torture_smb2_testfile_access(tree, sname, &h1,
++					      SEC_FILE_WRITE_DATA);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"torture_smb2_testfile failed\n");
++
++	ZERO_STRUCT(sfinfo);
++	sfinfo.generic.in.file.handle = h1;
++	sfinfo.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
++	sfinfo.position_information.in.position = 0;
++	status = smb2_setinfo_file(tree, &sfinfo);
++	torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
++					"set eof 0 failed\n");
++
++	smb2_util_close(tree, h1);
++
++	ZERO_STRUCT(create);
++	create.in.desired_access = SEC_FILE_READ_ATTRIBUTE;
++	create.in.share_access = NTCREATEX_SHARE_ACCESS_MASK;
++	create.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
++	create.in.create_disposition = NTCREATEX_DISP_OPEN;
++	create.in.fname = sname;
++
++	status = smb2_create(tree, tctx, &create);
++	torture_assert_ntstatus_equal_goto(
++		tctx, status, NT_STATUS_OBJECT_NAME_NOT_FOUND, ret, done,
++		"Unexpected status\n");
++
++done:
++	smb2_util_unlink(tree, fname);
++	smb2_util_rmdir(tree, BASEDIR);
++	return ret;
++}
++
+ /*
+  * Note: This test depends on "vfs objects = catia fruit streams_xattr".  For
+  * some tests torture must be run on the host it tests and takes an additional
+@@ -4610,6 +4806,7 @@ struct torture_suite *torture_vfs_fruit(TALLOC_CTX *ctx)
+ 	torture_suite_add_1smb2_test(suite, "create delete-on-close AFP_AfpResource", test_create_delete_on_close_resource);
+ 	torture_suite_add_1smb2_test(suite, "setinfo delete-on-close AFP_AfpResource", test_setinfo_delete_on_close_resource);
+ 	torture_suite_add_1smb2_test(suite, "setinfo eof AFP_AfpResource", test_setinfo_eof_resource);
++	torture_suite_add_1smb2_test(suite, "setinfo eof stream", test_setinfo_stream_eof);
+ 	torture_suite_add_1smb2_test(suite, "null afpinfo", test_null_afpinfo);
+ 	torture_suite_add_1smb2_test(suite, "delete", test_delete_file_with_rfork);
+ 	torture_suite_add_1smb2_test(suite, "read open rsrc after rename", test_rename_and_read_rsrc);
+-- 
+2.13.6
+
+
+From d85666f4c4062af68606790df2c5e1fdba135906 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 17 May 2018 16:48:09 +0200
+Subject: [PATCH 3/3] vfs_fruit: delete 0 byte size streams if AAPL is enabled
+
+macOS SMB server uses xattrs as storage backend for streams, directly
+exposing xattr get/set characteristics. Setting EOF on a stream to 0
+just deletes the xattr as macOS doesn't support 0-byte sized xattrs.
+
+Note that this does not apply to the AFP_AfpInfo and AFP_Resource
+streams, they have even stranger semantics and we have other tests
+for those.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13441
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+
+Autobuild-User(master): Jeremy Allison <jra@samba.org>
+Autobuild-Date(master): Wed May 30 02:34:29 CEST 2018 on sn-devel-144
+
+(cherry picked from commit 46d127865f3fb14041797d395db3b3234ed3bd6c)
+---
+ selftest/knownfail.d/samba3.vfs.fruit | 3 ---
+ source3/modules/vfs_fruit.c           | 3 +++
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/selftest/knownfail.d/samba3.vfs.fruit b/selftest/knownfail.d/samba3.vfs.fruit
+index 5931c471086..8df25bccb79 100644
+--- a/selftest/knownfail.d/samba3.vfs.fruit
++++ b/selftest/knownfail.d/samba3.vfs.fruit
+@@ -1,4 +1 @@
+ ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\)
+-^samba3.vfs.fruit metadata_netatalk.setinfo eof stream\(nt4_dc\)
+-^samba3.vfs.fruit metadata_stream.setinfo eof stream\(nt4_dc\)
+-^samba3.vfs.fruit streams_depot.setinfo eof stream\(nt4_dc\)
+diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
+index 1a05d0bae34..013dec0186a 100644
+--- a/source3/modules/vfs_fruit.c
++++ b/source3/modules/vfs_fruit.c
+@@ -5537,6 +5537,9 @@ static int fruit_ftruncate(struct vfs_handle_struct *handle,
+ 		  (intmax_t)offset);
+ 
+ 	if (fio == NULL) {
++		if (offset == 0 && global_fruit_config.nego_aapl) {
++			return SMB_VFS_NEXT_UNLINK(handle, fsp->fsp_name);
++		}
+ 		return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
+ 	}
+ 
+-- 
+2.13.6
+

Added: head/net/samba48/files/0001-bug-13451.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/samba48/files/0001-bug-13451.patch	Tue Jul 31 12:32:45 2018	(r475995)
@@ -0,0 +1,461 @@
+From 7bf82ece36c384784b1ba672667c5461fd0d7c29 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Sat, 26 May 2018 16:30:47 +0200
+Subject: [PATCH 1/6] selftest: run smb2.streams tests against a share with
+ vfs_streams_xattr
+
+The tests are currently only run against streams_depot, where stream IO
+is handle based, compared to streams_xattr which is path
+based. vfs_streams_xattr is also used much more in real world setups, so
+we should run our tests against it.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13451
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+(backported from commit aa096ab70a466388a9947f73a525b2dcbb9821e5)
+---
+ selftest/knownfail        | 3 +++
+ source3/selftest/tests.py | 4 ++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/selftest/knownfail b/selftest/knownfail
+index eaddaece25c..ba16fd72290 100644
+--- a/selftest/knownfail
++++ b/selftest/knownfail
+@@ -177,6 +177,9 @@
+ ^samba3.smb2.streams.rename
+ ^samba3.smb2.streams.rename2
+ ^samba3.smb2.streams.attributes
++^samba3.smb2.streams streams_xattr.rename\(nt4_dc\)
++^samba3.smb2.streams streams_xattr.rename2\(nt4_dc\)
++^samba3.smb2.streams streams_xattr.attributes\(nt4_dc\)
+ ^samba3.smb2.getinfo.complex
+ ^samba3.smb2.getinfo.fsinfo # quotas don't work yet
+ ^samba3.smb2.setinfo.setinfo
+diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
+index f43d2b14d3a..9092c1776c8 100755
+--- a/source3/selftest/tests.py
++++ b/source3/selftest/tests.py
+@@ -559,6 +559,10 @@ tests= base + raw + smb2 + rpc + unix + local + rap + nbt + libsmbclient + idmap
+     elif t == "rpc.samba3.netlogon" or t == "rpc.samba3.sessionkey":
+         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
+         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD --option=torture:wksname=samba3rpctest')
++    elif t == "smb2.streams":
++        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
++        plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
++        plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/streams_xattr -U$USERNAME%$PASSWORD', 'streams_xattr')
+     else:
+         plansmbtorture4testsuite(t, "nt4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
+         plansmbtorture4testsuite(t, "ad_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
+-- 
+2.13.6
+
+
+From 495303b80c7cc87a5b2c6a8b6c6d545db7b48d8b Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Sat, 26 May 2018 16:07:14 +0200
+Subject: [PATCH 2/6] s4:torture/smb2/streams: try to rename basefile while is
+ has open streams
+
+This tests the following:
+
+- create a file with a stream
+- open the the stream and keep it open
+- on a second connection, try to rename the basefile, this should fail
+  with NT_STATUS_ACCESS_DENIED
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13451
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Jeremy Allison <jra@samba.org>
+(cherry picked from commit 00d19bdab15102083b8ba395ede161824c898be1)
+---
+ selftest/knownfail.d/samba3.smb2.streams |  2 +
+ source4/torture/smb2/streams.c           | 82 ++++++++++++++++++++++++++++++++
+ 2 files changed, 84 insertions(+)
+ create mode 100644 selftest/knownfail.d/samba3.smb2.streams
+
+diff --git a/selftest/knownfail.d/samba3.smb2.streams b/selftest/knownfail.d/samba3.smb2.streams
+new file mode 100644
+index 00000000000..26d40a67bda
+--- /dev/null
++++ b/selftest/knownfail.d/samba3.smb2.streams

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807311232.w6VCWj1p069921>