summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Parent <sathieu@debian.org>2016-06-13 19:52:52 (GMT)
committerusd-importer <ubuntu-server@lists.ubuntu.com>2016-06-25 10:19:09 (GMT)
commit28a135855171ad2b00821c23e5b4e6b589cd7e1b (patch)
treefab9944a69d8045501c290ef45568dc0d21d317a
parent6d9c1aabec23f9a9a33df963131c886f8f3494b8 (diff)
Import patches-unapplied version 2:4.4.4+dfsg-1 to debian/sidimport/2%4.4.4+dfsg-1
Imported using usd-importer. Publish parent: 6d9c1aabec23f9a9a33df963131c886f8f3494b8 New changelog entries: * New upstream release. * The "Thanks lintian" release * Fixes: - Ensure that dpkg-buildflags are passed, and enable all hardening - systemd + Enable systemd (sd_notify) on Linux, and install systemd files + Remove obsolete syslog.target from service files + Add documentation field to unit files - Drop fix-cluster-build.diff: no more needed - Use secure Vcs-* URLs - Fix copyright file - samba.postinst: command-with-path-in-maintainer-script update-inetd - samba-common-bin: package-contains-empty-directory usr/lib/samba/ - winbind: package-contains-empty-directory usr/lib/samba/nss_info/ - Add Description to init files * No-op fixes: - d/control: Drop XS-Testsuite field - Drop redundant "Priority: optional" fields - Drop redundant "Section: net" fields - Describe non-standard-dir-perm var/spool/samba/ - Describe no_build_system.patch - Remove README.build-upstream, as packaging/Debian/ is now empty - Verify upstream tarball from uscan - Update README.source and remove build-orig.sh
-rw-r--r--VERSION2
-rw-r--r--WHATSNEW.txt117
-rw-r--r--debian/README.build-upstream78
-rw-r--r--debian/README.source26
-rwxr-xr-xdebian/build-orig.sh37
-rw-r--r--debian/changelog29
-rw-r--r--debian/control13
-rw-r--r--debian/copyright50
-rw-r--r--debian/patches/Add-documentation-to-systemd-Unit-files.patch71
-rw-r--r--debian/patches/fix-cluster-build.diff13
-rw-r--r--debian/patches/no_build_system.patch4
-rw-r--r--debian/patches/series3
-rw-r--r--debian/patches/systemd-syslog.target-is-obsolete.patch66
-rwxr-xr-xdebian/rules40
-rw-r--r--debian/samba-common-bin.dirs1
-rw-r--r--debian/samba.init3
-rw-r--r--debian/samba.install3
-rw-r--r--debian/samba.lintian-overrides1
-rw-r--r--debian/samba.nmbd.init4
-rw-r--r--debian/samba.postinst2
-rw-r--r--debian/samba.samba-ad-dc.init3
-rw-r--r--debian/samba.smbd.init3
-rw-r--r--debian/upstream/signing-key.asc30
-rw-r--r--debian/watch2
-rw-r--r--debian/winbind.dirs1
-rw-r--r--debian/winbind.init3
-rw-r--r--debian/winbind.install1
-rw-r--r--docs-xml/manpages/vfs_fruit.8.xml11
-rw-r--r--docs/manpages/cifsdd.84
-rw-r--r--docs/manpages/dbwrap_tool.14
-rw-r--r--docs/manpages/eventlogadm.84
-rw-r--r--docs/manpages/findsmb.14
-rw-r--r--docs/manpages/idmap_ad.84
-rw-r--r--docs/manpages/idmap_autorid.84
-rw-r--r--docs/manpages/idmap_hash.84
-rw-r--r--docs/manpages/idmap_ldap.84
-rw-r--r--docs/manpages/idmap_nss.84
-rw-r--r--docs/manpages/idmap_rfc2307.84
-rw-r--r--docs/manpages/idmap_rid.84
-rw-r--r--docs/manpages/idmap_script.84
-rw-r--r--docs/manpages/idmap_tdb.84
-rw-r--r--docs/manpages/idmap_tdb2.84
-rw-r--r--docs/manpages/libsmbclient.74
-rw-r--r--docs/manpages/lmhosts.54
-rw-r--r--docs/manpages/log2pcap.14
-rw-r--r--docs/manpages/net.84
-rw-r--r--docs/manpages/nmbd.84
-rw-r--r--docs/manpages/nmblookup.14
-rw-r--r--docs/manpages/ntlm_auth.14
-rw-r--r--docs/manpages/pam_winbind.84
-rw-r--r--docs/manpages/pam_winbind.conf.54
-rw-r--r--docs/manpages/pdbedit.84
-rw-r--r--docs/manpages/profiles.14
-rw-r--r--docs/manpages/rpcclient.14
-rw-r--r--docs/manpages/samba-regedit.84
-rw-r--r--docs/manpages/samba-tool.84
-rw-r--r--docs/manpages/samba.74
-rw-r--r--docs/manpages/samba.84
-rw-r--r--docs/manpages/sharesec.14
-rw-r--r--docs/manpages/smb.conf.54
-rw-r--r--docs/manpages/smbcacls.14
-rw-r--r--docs/manpages/smbclient.14
-rw-r--r--docs/manpages/smbcontrol.14
-rw-r--r--docs/manpages/smbcquotas.14
-rw-r--r--docs/manpages/smbd.84
-rw-r--r--docs/manpages/smbget.14
-rw-r--r--docs/manpages/smbgetrc.54
-rw-r--r--docs/manpages/smbpasswd.54
-rw-r--r--docs/manpages/smbpasswd.84
-rw-r--r--docs/manpages/smbspool.84
-rw-r--r--docs/manpages/smbspool_krb5_wrapper.84
-rw-r--r--docs/manpages/smbstatus.14
-rw-r--r--docs/manpages/smbtar.14
-rw-r--r--docs/manpages/smbtree.14
-rw-r--r--docs/manpages/testparm.14
-rw-r--r--docs/manpages/vfs_acl_tdb.84
-rw-r--r--docs/manpages/vfs_acl_xattr.84
-rw-r--r--docs/manpages/vfs_aio_fork.84
-rw-r--r--docs/manpages/vfs_aio_linux.84
-rw-r--r--docs/manpages/vfs_aio_pthread.84
-rw-r--r--docs/manpages/vfs_audit.84
-rw-r--r--docs/manpages/vfs_btrfs.84
-rw-r--r--docs/manpages/vfs_cacheprime.84
-rw-r--r--docs/manpages/vfs_cap.84
-rw-r--r--docs/manpages/vfs_catia.84
-rw-r--r--docs/manpages/vfs_ceph.84
-rw-r--r--docs/manpages/vfs_commit.84
-rw-r--r--docs/manpages/vfs_crossrename.84
-rw-r--r--docs/manpages/vfs_default_quota.84
-rw-r--r--docs/manpages/vfs_dirsort.84
-rw-r--r--docs/manpages/vfs_extd_audit.84
-rw-r--r--docs/manpages/vfs_fake_perms.84
-rw-r--r--docs/manpages/vfs_fileid.84
-rw-r--r--docs/manpages/vfs_fruit.812
-rw-r--r--docs/manpages/vfs_full_audit.84
-rw-r--r--docs/manpages/vfs_glusterfs.84
-rw-r--r--docs/manpages/vfs_gpfs.84
-rw-r--r--docs/manpages/vfs_linux_xfs_sgid.84
-rw-r--r--docs/manpages/vfs_media_harmony.84
-rw-r--r--docs/manpages/vfs_netatalk.84
-rw-r--r--docs/manpages/vfs_offline.84
-rw-r--r--docs/manpages/vfs_prealloc.84
-rw-r--r--docs/manpages/vfs_preopen.84
-rw-r--r--docs/manpages/vfs_readahead.84
-rw-r--r--docs/manpages/vfs_readonly.84
-rw-r--r--docs/manpages/vfs_recycle.84
-rw-r--r--docs/manpages/vfs_shadow_copy.84
-rw-r--r--docs/manpages/vfs_shadow_copy2.84
-rw-r--r--docs/manpages/vfs_shell_snap.84
-rw-r--r--docs/manpages/vfs_snapper.84
-rw-r--r--docs/manpages/vfs_streams_depot.84
-rw-r--r--docs/manpages/vfs_streams_xattr.84
-rw-r--r--docs/manpages/vfs_syncops.84
-rw-r--r--docs/manpages/vfs_time_audit.84
-rw-r--r--docs/manpages/vfs_tsmsm.84
-rw-r--r--docs/manpages/vfs_unityed_media.84
-rw-r--r--docs/manpages/vfs_worm.84
-rw-r--r--docs/manpages/vfs_xattr_tdb.84
-rw-r--r--docs/manpages/vfs_zfsacl.84
-rw-r--r--docs/manpages/vfstest.14
-rw-r--r--docs/manpages/wbinfo.14
-rw-r--r--docs/manpages/winbind_krb5_locator.74
-rw-r--r--docs/manpages/winbindd.84
-rw-r--r--lib/ldb-samba/ldb_matching_rules.c2
-rw-r--r--lib/torture/torture.h12
-rw-r--r--lib/util/become_daemon.c10
-rw-r--r--libcli/auth/msrpc_parse.c24
-rw-r--r--libcli/smb/smbXcli_base.c5
-rw-r--r--libcli/smb/smbXcli_base.h1
-rw-r--r--packaging/RHEL-CTDB/setup/smb.init2
-rw-r--r--packaging/RHEL-CTDB/setup/winbind.init2
-rw-r--r--packaging/RHEL/setup/smb.init2
-rw-r--r--packaging/RHEL/setup/winbind.init2
-rw-r--r--packaging/systemd/nmb.service1
-rw-r--r--packaging/systemd/smb.service1
-rw-r--r--packaging/systemd/winbind.service1
-rw-r--r--python/samba/netcmd/fsmo.py233
-rw-r--r--python/samba/tests/samba_tool/fsmo.py29
-rw-r--r--selftest/knownfail1
-rw-r--r--source3/auth/token_util.c2
-rw-r--r--source3/client/smbspool.c2
-rw-r--r--source3/client/smbspool_krb5_wrapper.c10
-rw-r--r--source3/include/vfs.h2
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c10
-rw-r--r--source3/lib/dumpcore.c15
-rw-r--r--source3/lib/sysquotas_4B.c6
-rw-r--r--source3/libads/kerberos.c59
-rw-r--r--source3/libnet/libnet_join.c60
-rw-r--r--source3/librpc/idl/smbXsrv.idl3
-rw-r--r--source3/libsmb/cli_smb2_fnum.c16
-rw-r--r--source3/libsmb/clifile.c2
-rw-r--r--source3/locking/share_mode_lock.c5
-rw-r--r--source3/modules/vfs_fake_dfq.c15
-rw-r--r--source3/modules/vfs_fruit.c6
-rw-r--r--source3/passdb/pdb_ldap.c6
-rw-r--r--source3/rpcclient/rpcclient.c16
-rwxr-xr-xsource3/script/tests/test_dfree_quota.sh12
-rwxr-xr-xsource3/script/tests/test_rpcclient_pw_nt_hash.sh27
-rwxr-xr-xsource3/selftest/tests.py5
-rw-r--r--source3/smbd/close.c17
-rw-r--r--source3/smbd/filename.c28
-rw-r--r--source3/smbd/globals.h7
-rw-r--r--source3/smbd/notifyd/notifyd.c5
-rw-r--r--source3/smbd/open.c2
-rw-r--r--source3/smbd/oplock.c1
-rw-r--r--source3/smbd/quotas.c32
-rw-r--r--source3/smbd/service.c50
-rw-r--r--source3/smbd/sesssetup.c8
-rw-r--r--source3/smbd/smb2_server.c163
-rw-r--r--source3/utils/net_printing.c90
-rw-r--r--source3/utils/ntlm_auth.c51
-rw-r--r--source3/wscript2
-rw-r--r--source4/heimdal/kdc/misc.c2
-rw-r--r--source4/heimdal/lib/asn1/krb5.asn12
-rwxr-xr-xsource4/selftest/tests.py4
-rw-r--r--source4/torture/rpc/lsa.c2
-rw-r--r--source4/torture/smb2/replay.c477
-rw-r--r--wscript_configure_system_mitkrb51
178 files changed, 1935 insertions, 621 deletions
diff --git a/VERSION b/VERSION
index ba47aab..667e0e5 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=4
-SAMBA_VERSION_RELEASE=3
+SAMBA_VERSION_RELEASE=4
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index ac373fd..ca3c325 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,117 @@
=============================
+ Release Notes for Samba 4.4.4
+ June 7, 2016
+ =============================
+
+
+This is the latest stable release of Samba 4.4.
+
+
+Changes since 4.4.3:
+--------------------
+
+o Michael Adam <obnox@samba.org>
+ * BUG 11809: SMB3 multichannel: Add implementation of missing channel sequence
+ number verification.
+ * BUG 11919: smbd:close: Only remove kernel share modes if they had been
+ taken at open.
+ * BUG 11930: notifyd: Prevent NULL deref segfault in notifyd_peer_destructor.
+
+o Jeremy Allison <jra@samba.org>
+ * BUG 10618: s3: auth: Move the declaration of struct dom_sid tmp_sid to
+ function level scope.
+
+o Christian Ambach <ambi@samba.org>
+ * BUG 10796: s3:rpcclient: Make '--pw-nt-hash' option work.
+ * BUG 11354: s3:libsmb/clifile: Use correct value for MaxParameterCount for
+ setting EAs.
+ * BUG 11438: Fix case sensitivity issues over SMB2 or above.
+
+o Ralph Boehme <slow@samba.org>
+ * BUG 1703: s3:libnet:libnet_join: Add netbios aliases as SPNs.
+ * BUG 11721: vfs_fruit: Add an option that allows disabling POSIX rename
+ behaviour.
+
+o Alexander Bokovoy <ab@samba.org>
+ * BUG 11936: s3-smbd: Support systemd 230.
+
+o Ira Cooper <ira@samba.org>
+ * BUG 11907: source3: Honor the core soft limit of the OS.
+
+o Günther Deschner <gd@samba.org>
+ * BUG 11809: SMB3 multichannel: Add implementation of missing channel sequence
+ number verification.
+ * BUG 11864: s3:client:smbspool_krb5_wrapper: Fix the non clearenv build.
+ * BUG 11906: s3-kerberos: Avoid entering a password change dialogue also when
+ using MIT.
+
+o Robin Hack <hack.robin@gmail.com>
+ * BUG 11890: ldb-samba/ldb_matching_rules: Fix CID 1349424 - Uninitialized
+ pointer read.
+
+o Volker Lendecke <vl@samba.org>
+ * BUG 11844: dbwrap_ctdb: Fix ENOENT->NT_STATUS_NOT_FOUND.
+
+o Robin McCorkell <robin@mccorkell.me.uk>
+ * BUG 11276: Correctly set cli->raw_status for libsmbclient in SMB2 code.
+
+o Stefan Metzmacher <metze@samba.org>
+ * BUG 11910: s3:smbd: Fix anonymous authentication if signing is mandatory.
+ * BUG 11912: libcli/auth: Let msrpc_parse() return talloc'ed empty strings.
+ * BUG 11914: Fix NTLM Authentication issue with squid.
+ * BUG 11927: s3:rpcclient: make use of SMB_SIGNING_IPC_DEFAULT.
+
+o Luca Olivetti <luca@wetron.es>
+ * BUG 11530: pdb: Fix segfault in pdb_ldap for missing gecos.
+
+o Rowland Penny <rpenny@samba.org>
+ * BUG 11613: Allow 'samba-tool fsmo' to cope with empty or missing fsmo
+ roles.
+
+o Anoop C S <anoopcs@redhat.com>
+ * BUG 11907: packaging: Set default limit for core file size in service
+ files.
+
+o Andreas Schneider <asn@samba.org>
+ * BUG 11922: s3-net: Convert the key_name to UTF8 during migration.
+ * BUG 11935: s3-smbspool: Log to stderr.
+
+o Uri Simchoni <uri@samba.org>
+ * BUG 11900: heimdal: Encode/decode kvno as signed integer.
+ * BUG 11931: s3-quotas: Fix sysquotas_4B quota fetching for BSD.
+ * BUG 11937: smbd: dfree: Ignore quota if not enforced.
+
+o Raghavendra Talur <rtalur@redhat.com>
+ * BUG 11907: init: Set core file size to unlimited by default.
+
+o Hemanth Thummala <hemanth.thummala@nutanix.com>
+ * BUG 11934: Fix memory leak in share mode locking.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+ =============================
Release Notes for Samba 4.4.3
May 2, 2016
=============================
@@ -92,8 +205,8 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
=============================
Release Notes for Samba 4.4.2
diff --git a/debian/README.build-upstream b/debian/README.build-upstream
deleted file mode 100644
index 8efe816..0000000
--- a/debian/README.build-upstream
+++ /dev/null
@@ -1,78 +0,0 @@
-Building Samba Packages for Debian GNU/Linux
---------------------------------------------
-
-Building Debian packages is not as hard as some people might think.
-The following instructions will allow you to build your own Samba
-Debian packages. These instructions and the files in packaging/Debian/
-should be current as of Samba 3.0.2, and allow you to build Debian
-packages for Debian unstable (so you need some development packages
-available only in Debian unstable.) If you are using something newer
-than 3.0.2 you might want to try to follow the instructions to see if
-patches apply cleanly. If some patches don't apply cleanly please e-mail
-samba@packages.debian.org since we might have fixed patches that we have
-not yet integrated into upstream Samba.
-
-We try to maintain as much compatibility with previous releases
-of Debian as possible, so it is possible that the files in
-packaging/Debian/ can also be used to build Samba Debian packages for
-other Debian releases. However, sometimes this is just not possible
-because we need to use stuff that is only available on Debian unstable.
-
-Instructions
-------------
-
-If you want to build Samba packages for Debian and you just want to use
-upstream sources, i.e. you don't want to wait for us to put official
-packages out, or you want packages for a Debian version for which we
-don't provide deb's, or you don't want to use official packages, or
-you want to add --this-cool-switch to configure, or whatever, follow
-these instructions:
-
-0) Make sure you have the following packages installed (in addition
-to the normal Debian development packages -- dpkg-dev, libc6-dev,
-devscripts, etc.):
-
- autoconf
- debhelper (>= 4.1.13)
- libpam0g-dev
- libreadline4-dev
- libcupsys2-dev
- libacl1-dev, libacl1 (>= 2.2.11-1)
- libkrb5-dev
- libldap2-dev
- po-debconf
- python2.3-dev
-
- Notes regarding the packages required to build Samba Debian packages:
-
- * The libcupsys2-dev is not available in Debian Potato (Debian 2.2).
- That's fine; the configure script won't detect CUPS support and the
- resulting binaries won't support CUPS.
-
- * The list above is current as of samba-3.0.0rc2, but it can get
- out of date. The best way to check what packages are required to
- build the samba packages on Debian is to look for the Build-Depends:
- field in the file debian/control.
-
-1) cd samba[-<version>]. For example, "cd samba-3.0.2".
-2) cp -a packaging/Debian/debian/ .
- It's important that you copy instead of symlink because the build
- tools in Potato have a problem that prevents the build to work with
- a symlink. If you are running a recent Debian distribution you don't
- have to copy the directory and you can use a symlink instead:
- "ln -s packaging/Debian/debian/ ."
-3) dch -i (this is completely optional - only do it if you understand
- Debian version numbers! Don't complain later if you can't upgrade
- to official versions of the Samba packages for Debian.)
- - Edit the changelog and make sure the version is right. For example,
- for Samba 3.0.2, the version number should something like 3.0.2-0.1.
-4) Run 'fakeroot debian/rules binary'.
-5) That's it. Your new packages should be in ../. Install with dpkg.
-
-Please e-mail samba@packages.debian.org with comments, questions or
-suggestions. Please talk to us and not to the Samba Team. They have
-better things to do and know nothing about the Debian packaging system.
-
-Eloy A. Paris <peloy@debian.org>
-Steve Langasek <vorlon@debian.org>
-
diff --git a/debian/README.source b/debian/README.source
index 1d181b6..59fa18b 100644
--- a/debian/README.source
+++ b/debian/README.source
@@ -1,9 +1,9 @@
-The packaging is kept in git://git.debian.org/git/pkg-samba/samba.git (web
-interface: http://git.debian.org/?p=pkg-samba/samba.git).
+The packaging is kept in https://anonscm.debian.org/git/pkg-samba/samba.git
+(web interface: https://anonscm.debian.org/cgit/pkg-samba/samba.git).
The version in unstable is on the 'master' branch, with the corresponding
-upstream version in the 'upstream_4.0' branch (with pristine-tar information
+upstream version in the 'upstream_4.4' branch (with pristine-tar information
in the pristine-tar branch).
It should be possible to build the package by just running 'git-buildpackage'.
@@ -14,21 +14,21 @@ Merging upstream releases
Importing a new upstream version can be done like this:
-# recompress tarball
-gunzip samba-4.0.6.tar.gz
-xz samba-4.0.6.tar
+# set target version
+upstream_version=4.4.4
# go to git repo
cd $GIT_DIR
-# make sure to be on the right branch
+# Import upstream
+git remote add upstream https://git.samba.org/samba.git
+git fetch upstream
+# go to the Debian branch
git checkout master
-git-import-orig --upstream-version=4.0.6+dfsg --upstream-vcs-tag=samba-4.0.6 \
- ../samba-4.0.6.tar.xz
+# Import latest version
+gbp import-orig --uscan \
+ -u "${upstream_version}+dfsg" \
+ --upstream-vcs-tag "samba-${upstream_version}"
# all done :)
Please note that there are some files that are not dfsg-free and they need to
be filtered. The settings in the gpb.conf should take care of that.
-
-
-
-
diff --git a/debian/build-orig.sh b/debian/build-orig.sh
deleted file mode 100755
index 75a2d27..0000000
--- a/debian/build-orig.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash -e
-
-version=$( dpkg-parsechangelog -l`dirname $0`/changelog | sed -n 's/^Version: \(.*:\|\)//p' | sed 's/-[0-9.]\+$//' )
-
-if echo "$version" | egrep "(bzr|git)" >/dev/null; then
- if [ -z "$SAMBA_GIT_URL" ]; then
- SAMBA_GIT_URL=git://git.samba.org/samba.git
- fi
-
- if [ -d "$SAMBA_GIT_URL/.bzr" ]; then
- bzr co --lightweight "$SAMBA_GIT_URL" samba4-upstream-$version
- else
- git clone "$SAMBA_GIT_URL" samba4-upstream-$version
- fi
-
- pushd "samba4-upstream-$version"
- ./configure
- ./buildtools/bin/waf dist
- tar xfz samba-4.*.tar.gz
- rm samba-4*.tar.gz
- mv samba-4* "../samba4-$version"
- popd
- rm -rf "samba4-upstream-$version"
-else
- upstream_version=`echo $version | sed -e 's/~alpha1~tp/tp/;s/~beta/beta/;s/~alpha/alpha/;s/~rc/rc/;s/.dfsg[0-9]*$//;'`
- wget ftp://ftp.samba.org/pub/samba/samba-$upstream_version.tar.gz
- wget ftp://ftp.samba.org/pub/samba/samba-$upstream_version.tar.asc
- gunzip samba-$upstream_version.tar.gz
- gpg --verify samba-$upstream_version.tar.asc
- tar xvf samba-$upstream_version.tar
- mv samba-$upstream_version samba-$version
- rm samba-$upstream_version.tar.asc samba-$upstream_version.tar
-fi
-`dirname $0`/dfsg-clean.sh "samba-$version"
-tar cfz samba_$version.orig.tar.gz "samba-$version"
-rm -rf "samba-$version"
-exit 0
diff --git a/debian/changelog b/debian/changelog
index a7d18e2..347a9c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,32 @@
+samba (2:4.4.4+dfsg-1) unstable; urgency=medium
+
+ * New upstream release.
+ * The "Thanks lintian" release
+ * Fixes:
+ - Ensure that dpkg-buildflags are passed, and enable all hardening
+ - systemd
+ + Enable systemd (sd_notify) on Linux, and install systemd files
+ + Remove obsolete syslog.target from service files
+ + Add documentation field to unit files
+ - Drop fix-cluster-build.diff: no more needed
+ - Use secure Vcs-* URLs
+ - Fix copyright file
+ - samba.postinst: command-with-path-in-maintainer-script update-inetd
+ - samba-common-bin: package-contains-empty-directory usr/lib/samba/
+ - winbind: package-contains-empty-directory usr/lib/samba/nss_info/
+ - Add Description to init files
+ * No-op fixes:
+ - d/control: Drop XS-Testsuite field
+ - Drop redundant "Priority: optional" fields
+ - Drop redundant "Section: net" fields
+ - Describe non-standard-dir-perm var/spool/samba/
+ - Describe no_build_system.patch
+ - Remove README.build-upstream, as packaging/Debian/ is now empty
+ - Verify upstream tarball from uscan
+ - Update README.source and remove build-orig.sh
+
+ -- Mathieu Parent <sathieu@debian.org> Mon, 13 Jun 2016 21:52:52 +0200
+
samba (2:4.4.3+dfsg-4) unstable; urgency=medium
* Fix build with DEB_BUILD_OPTIONS=nocheck
diff --git a/debian/control b/debian/control
index 7cbad10..9897a16 100644
--- a/debian/control
+++ b/debian/control
@@ -34,6 +34,7 @@ Build-Depends: bison,
libpcap-dev [hurd-i386 kfreebsd-any],
libpopt-dev,
libreadline-dev,
+ libsystemd-dev [linux-any],
libtalloc-dev (>= 2.1.6~),
libtdb-dev (>= 1.3.8~),
libtevent-dev (>= 0.9.25~),
@@ -56,9 +57,8 @@ Build-Depends: bison,
libsocket-wrapper,
libuid-wrapper,
python-crypto
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-samba/samba.git
-Vcs-Git: git://anonscm.debian.org/pkg-samba/samba.git -b master
-XS-Testsuite: autopkgtest
+Vcs-Browser: https://anonscm.debian.org/cgit/pkg-samba/samba.git
+Vcs-Git: https://anonscm.debian.org/git/pkg-samba/samba.git
Package: samba
Architecture: any
@@ -386,7 +386,6 @@ Description: Samba Virtual FileSystem plugins
Package: libsmbclient
Section: libs
-Priority: optional
Architecture: any
Multi-Arch: same
Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
@@ -434,8 +433,6 @@ Description: service to resolve user and group information from Windows NT serve
be enabled via the libpam-winbind package.
Package: libpam-winbind
-Section: net
-Priority: optional
Architecture: any
Multi-Arch: same
Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
@@ -463,8 +460,6 @@ Description: Windows domain authentication integration plugin
winbindd server to provide Windows domain authentication to the system.
Package: libnss-winbind
-Section: net
-Priority: optional
Architecture: any
Multi-Arch: same
Pre-Depends: dpkg (>= 1.15.6~)
@@ -507,7 +502,6 @@ Description: Samba debugging symbols
Package: libwbclient0
Section: libs
-Priority: optional
Architecture: any
Multi-Arch: same
Pre-Depends: dpkg (>= 1.15.6~), ${misc:Pre-Depends}
@@ -531,7 +525,6 @@ Description: Samba winbind client library
Package: libwbclient-dev
Section: libdevel
-Priority: optional
Architecture: any
Multi-Arch: same
Depends: libwbclient0 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends}
diff --git a/debian/copyright b/debian/copyright
index a563ba9..a3edf63 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -6,31 +6,6 @@ Files-Excluded:
source4/heimdal/lib/wind/rfc*.txt
source4/ldap_server/devdocs
-Files: debian/*
-Copyright:
- 2005-2012 Jelmer Vernooij <jelmer@debian.org>
- 2005-2006 Steinar H. Gunderson
- 2001-2011 Steve Langasek <vorlon@debian.org>,
- 2005-2012 Christian Perrier <bubulle@debian.org>,
- 2005-2008 Noèl Köthe <noel@debian.org>,
- 2005-2008 Peter Eisentraut <petere@debian.org>, et al.
-License: GPL-3
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 3 dated June, 2007.
- .
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- .
- On Debian systems, the full text of the GPL v3 can be found in
- /usr/share/common-licenses/GPL-3
-
Files: *
Copyright: 1992-2012 Andrew Tridgell and the Samba Team
License: GPL-3+
@@ -158,3 +133,28 @@ License: MS-ADSL
in order for you to develop an implementation. If you have access to
Microsoft programming tools and environments you are free to take
advantage of them.
+
+Files: debian/*
+Copyright:
+ 2005-2012 Jelmer Vernooij <jelmer@debian.org>
+ 2005-2006 Steinar H. Gunderson
+ 2001-2011 Steve Langasek <vorlon@debian.org>,
+ 2005-2012 Christian Perrier <bubulle@debian.org>,
+ 2005-2008 Noèl Köthe <noel@debian.org>,
+ 2005-2008 Peter Eisentraut <petere@debian.org>, et al.
+License: GPL-3
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 3 dated June, 2007.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the GPL v3 can be found in
+ /usr/share/common-licenses/GPL-3
diff --git a/debian/patches/Add-documentation-to-systemd-Unit-files.patch b/debian/patches/Add-documentation-to-systemd-Unit-files.patch
new file mode 100644
index 0000000..0dff620
--- /dev/null
+++ b/debian/patches/Add-documentation-to-systemd-Unit-files.patch
@@ -0,0 +1,71 @@
+From bf7245b7b39f70f37e1bb34999b016a655dce8c2 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Thu, 12 May 2016 22:16:24 +0200
+Subject: Add documentation to systemd Unit files
+
+---
+ ctdb/config/ctdb.service | 1 +
+ packaging/systemd/nmb.service | 1 +
+ packaging/systemd/samba.service | 1 +
+ packaging/systemd/smb.service | 1 +
+ packaging/systemd/winbind.service | 1 +
+ 5 files changed, 5 insertions(+)
+
+diff --git a/ctdb/config/ctdb.service b/ctdb/config/ctdb.service
+index ea37c30..f4abfb6 100644
+--- a/ctdb/config/ctdb.service
++++ b/ctdb/config/ctdb.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=CTDB
++Documentation=man:ctdbd(1) man:ctdb(7)
+ After=network.target
+
+ [Service]
+diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
+index 98d8080..3033c6b 100644
+--- a/packaging/systemd/nmb.service
++++ b/packaging/systemd/nmb.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Samba NMB Daemon
++Documentation=man:nmbd(8) man:samba(7) man:smb.conf(5)
+ After=network.target
+
+ [Service]
+diff --git a/packaging/systemd/samba.service b/packaging/systemd/samba.service
+index 83e0daf..6512bef 100644
+--- a/packaging/systemd/samba.service
++++ b/packaging/systemd/samba.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Samba AD Daemon
++Documentation=man:samba(8) man:samba(7) man:smb.conf(5)
+ After=network.target
+
+ [Service]
+diff --git a/packaging/systemd/smb.service b/packaging/systemd/smb.service
+index 949f798..a732d19 100644
+--- a/packaging/systemd/smb.service
++++ b/packaging/systemd/smb.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Samba SMB Daemon
++Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
+ After=network.target nmb.service winbind.service
+
+ [Service]
+diff --git a/packaging/systemd/winbind.service b/packaging/systemd/winbind.service
+index 26c6752..a937f51 100644
+--- a/packaging/systemd/winbind.service
++++ b/packaging/systemd/winbind.service
+@@ -1,5 +1,6 @@
+ [Unit]
+ Description=Samba Winbind Daemon
++Documentation=man:winbindd(8) man:samba(7) man:smb.conf(5)
+ After=network.target nmb.service
+
+ [Service]
+--
+2.8.1
+
diff --git a/debian/patches/fix-cluster-build.diff b/debian/patches/fix-cluster-build.diff
deleted file mode 100644
index afbb021..0000000
--- a/debian/patches/fix-cluster-build.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/source3/wscript_build b/source3/wscript_build
-index ace4b99..c6e35dd 100755
---- a/source3/wscript_build
-+++ b/source3/wscript_build
-@@ -209,7 +209,7 @@ bld.SAMBA3_LIBRARY('smbregistry',
- registry/reg_init_basic.c''',
- deps='''smbd_shim tdb-wrap3 NDR_SECURITY util_tdb talloc
- replace util_reg samba-util samba-security
-- errors3 dbwrap samba3-util''',
-+ errors3 dbwrap samba3-util samba3util''',
- allow_undefined_symbols=True,
- private_library=True)
-
diff --git a/debian/patches/no_build_system.patch b/debian/patches/no_build_system.patch
index 98ce99d..5df7093 100644
--- a/debian/patches/no_build_system.patch
+++ b/debian/patches/no_build_system.patch
@@ -1,3 +1,7 @@
+From: Jelmer Vernooij <jelmer@jelmer.uk>
+Date: Sat, 9 Apr 2016 12:18:38 +0000
+Subject: drop host-specific define that prevents reproducible builds
+
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index d6bb688..7831b75 100755
--- a/buildtools/wafsamba/wscript
diff --git a/debian/patches/series b/debian/patches/series
index 2c007c3..e9c34fb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,8 +11,9 @@ add-so-version-to-private-libraries
xsltproc_dont_build_smb.conf.5.patch
heimdal-rfc3454.txt
Fix-privacy-breach-on-google.com.patch
-fix-cluster-build.diff
ctdb-Fix-detection-of-gnukfreebsd.patch
no_build_env.patch
no_build_system.patch
Skip-raw.write-tests.patch
+systemd-syslog.target-is-obsolete.patch
+Add-documentation-to-systemd-Unit-files.patch
diff --git a/debian/patches/systemd-syslog.target-is-obsolete.patch b/debian/patches/systemd-syslog.target-is-obsolete.patch
new file mode 100644
index 0000000..ff55302
--- /dev/null
+++ b/debian/patches/systemd-syslog.target-is-obsolete.patch
@@ -0,0 +1,66 @@
+From a8fe4ce53f23667684883000f9dbec1b4c149f76 Mon Sep 17 00:00:00 2001
+From: Mathieu Parent <math.parent@gmail.com>
+Date: Thu, 12 May 2016 22:04:24 +0200
+Subject: systemd: syslog.target is obsolete
+
+After=syslog.target is unnecessary by now because syslog is socket-activated and will therefore be started when needed.
+
+Ref: https://lintian.debian.org/tags/systemd-service-file-refers-to-obsolete-target.html
+---
+ packaging/systemd/nmb.service | 2 +-
+ packaging/systemd/samba.service | 2 +-
+ packaging/systemd/smb.service | 2 +-
+ packaging/systemd/winbind.service | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
+index 3d71a7d..98d8080 100644
+--- a/packaging/systemd/nmb.service
++++ b/packaging/systemd/nmb.service
+@@ -1,6 +1,6 @@
+ [Unit]
+ Description=Samba NMB Daemon
+-After=syslog.target network.target
++After=network.target
+
+ [Service]
+ Type=notify
+diff --git a/packaging/systemd/samba.service b/packaging/systemd/samba.service
+index 824f89c..83e0daf 100644
+--- a/packaging/systemd/samba.service
++++ b/packaging/systemd/samba.service
+@@ -1,6 +1,6 @@
+ [Unit]
+ Description=Samba AD Daemon
+-After=syslog.target network.target
++After=network.target
+
+ [Service]
+ Type=notify
+diff --git a/packaging/systemd/smb.service b/packaging/systemd/smb.service
+index 9810891..949f798 100644
+--- a/packaging/systemd/smb.service
++++ b/packaging/systemd/smb.service
+@@ -1,6 +1,6 @@
+ [Unit]
+ Description=Samba SMB Daemon
+-After=syslog.target network.target nmb.service winbind.service
++After=network.target nmb.service winbind.service
+
+ [Service]
+ Type=notify
+diff --git a/packaging/systemd/winbind.service b/packaging/systemd/winbind.service
+index f711a17..26c6752 100644
+--- a/packaging/systemd/winbind.service
++++ b/packaging/systemd/winbind.service
+@@ -1,6 +1,6 @@
+ [Unit]
+ Description=Samba Winbind Daemon
+-After=syslog.target network.target nmb.service
++After=network.target nmb.service
+
+ [Service]
+ Type=notify
+--
+2.8.1
+
diff --git a/debian/rules b/debian/rules
index 15e5423..9b13673 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,11 +3,16 @@
#
DESTDIR = $(CURDIR)/debian/tmp
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
PYVERS=$(shell pyversions -vr)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LDB_VERSION = $(shell pkg-config --modversion ldb)
LDB_EPOCH = $(shell dpkg-query -f '$${Version}' -W libldb-dev | sed 's/:.*//')
LDB_NEXT_VERSION = $(shell python -c "x = '$(LDB_VERSION)'.split('.'); x[-1] = str(int(x[-1])+1); print '.'.join(x)")
@@ -68,12 +73,19 @@ conf_args = \
--with-logdir=/var/log/ctdb \
--enable-selftest
+ifeq ($(DEB_HOST_ARCH_OS), linux)
+ conf_args += \
+ --with-systemd
+else
+ conf_args += \
+ --without-systemd
+endif
+
%:
dh $* --with python2 --with systemd
override_dh_auto_configure:
- $(shell dpkg-buildflags --export=configure) $(WAF) configure \
- $(conf_args)
+ $(WAF) configure $(conf_args)
override_dh_auto_clean:
-$(WAF) clean
@@ -104,10 +116,10 @@ override_dh_installdocs-arch:
cp ctdb/config/events.d/README ctdb/README.eventscripts
cp ctdb/config/notify.d.README ctdb/README.notify.d
dh_installdocs
-ifeq ($(DEB_BUILD_ARCH_OS), hurd)
+ifeq ($(DEB_HOST_ARCH_OS), hurd)
dh_installdocs -pctdb debian/ctdb.README.hurd
endif
-ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd)
+ifeq ($(DEB_HOST_ARCH_OS), kfreebsd)
dh_installdocs -pctdb debian/ctdb.README.kfreebsd
endif
#patch doc
@@ -139,8 +151,6 @@ override_dh_install:
$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/plugin/krb5
install -m 0755 debian/setoption.py $(DESTDIR)/usr/share/samba
install -m 0755 debian/addshare.py $(DESTDIR)/usr/share/samba
- mkdir -p $(DESTDIR)/usr/lib/tmpfiles.d
- echo "d /run/samba 0755 root root -" > $(DESTDIR)/usr/lib/tmpfiles.d/samba.conf
# Install samba-common's conffiles - they'll get moved later to their
# correct place by dh_install
cp debian/smb.conf* $(DESTDIR)/usr/share/samba/
@@ -166,9 +176,23 @@ override_dh_install:
rm $(DESTDIR)/usr/bin/ctdb_run_cluster_tests
rm -rf $(DESTDIR)/usr/lib/*/ctdb-tests
rm -rf $(DESTDIR)/usr/share/ctdb-tests
- # Install ctdb conffiles
+ # Install systemd configs
mkdir -p $(DESTDIR)/lib/systemd/system/
install -m 0644 ctdb/config/ctdb.service $(DESTDIR)/lib/systemd/system/
+ install -m 0644 packaging/systemd/*.service $(DESTDIR)/lib/systemd/system/
+ mv $(DESTDIR)/lib/systemd/system/nmb.service $(DESTDIR)/lib/systemd/system/nmbd.service
+ mv $(DESTDIR)/lib/systemd/system/smb.service $(DESTDIR)/lib/systemd/system/smbd.service
+ mv $(DESTDIR)/lib/systemd/system/samba.service $(DESTDIR)/lib/systemd/system/samba-ad-dc.service
+ sed -i \
+ -e 's|/etc/sysconfig/|/etc/default/|' \
+ -e 's|/nmb\.service|nmbd.service|' \
+ -e 's|/smb\.service|smbd.service|' \
+ -e 's|/samba\.service|samba-ad-dc.service|' \
+ $(DESTDIR)/lib/systemd/system/*.service
+ mkdir -p $(DESTDIR)/usr/lib/tmpfiles.d
+ echo "d /run/samba 0755 root root -" > $(DESTDIR)/usr/lib/tmpfiles.d/samba.conf
+ #install -m 0644 packaging/systemd/samba.sysconfig $(DESTDIR)/etc/default/samba
+ #
dh_install --sourcedir=$(DESTDIR) --list-missing --fail-missing
override_dh_python2:
diff --git a/debian/samba-common-bin.dirs b/debian/samba-common-bin.dirs
index 5acca69..bbd723d 100644
--- a/debian/samba-common-bin.dirs
+++ b/debian/samba-common-bin.dirs
@@ -1,3 +1,2 @@
etc/samba/tls
-usr/lib/samba
var/cache/samba
diff --git a/debian/samba.init b/debian/samba.init
index d93b7d5..ce58c88 100644
--- a/debian/samba.init
+++ b/debian/samba.init
@@ -6,7 +6,8 @@
# Required-Stop:
# Default-Start:
# Default-Stop:
-# Short-Description: ensure Samba daemons are started (nmbd and smbd)
+# Short-Description: ensure Samba daemons are started (nmbd, smbd and samba)
+# Description: Starts Samba, a Windows AD and SMB/CIFS fileserver for UNIX
### END INIT INFO
set -e
diff --git a/debian/samba.install b/debian/samba.install
index bb6831d..747520c 100644
--- a/debian/samba.install
+++ b/debian/samba.install
@@ -14,6 +14,9 @@ usr/lib/*/samba/libkdc-samba4.so.2
usr/lib/*/samba/libkdc-samba4.so.2.0.0
usr/lib/*/samba/libpac.so.*
usr/lib/*/samba/service/*.so
+lib/systemd/system/nmbd.service
+lib/systemd/system/samba-ad-dc.service
+lib/systemd/system/smbd.service
usr/sbin/mksmbpasswd
usr/sbin/nmbd
usr/sbin/samba
diff --git a/debian/samba.lintian-overrides b/debian/samba.lintian-overrides
index 6e0ef39..21c609b 100644
--- a/debian/samba.lintian-overrides
+++ b/debian/samba.lintian-overrides
@@ -1,3 +1,4 @@
+# Standard path for [printers] section is world-writeable with sticky bit set
samba: non-standard-dir-perm var/spool/samba/ 1777 != 0755
# reload-smbd is upstart-only
samba: init.d-script-not-marked-as-conffile etc/init.d/reload-smbd
diff --git a/debian/samba.nmbd.init b/debian/samba.nmbd.init
index 97a89d4..4834858 100644
--- a/debian/samba.nmbd.init
+++ b/debian/samba.nmbd.init
@@ -7,7 +7,9 @@
# X-Start-Before: smbd
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: start Samba NetBIOS nameserver (nmbd)
+# Short-Description: Samba NetBIOS nameserver (nmbd)
+# Description: NetBIOS name server to provide NetBIOS over IP naming services
+# to clients
### END INIT INFO
diff --git a/debian/samba.postinst b/debian/samba.postinst
index a7dc574..fa95f18 100644
--- a/debian/samba.postinst
+++ b/debian/samba.postinst
@@ -34,7 +34,7 @@ if dpkg --compare-versions "$2" lt-nl 2:3.6.15-2; then
fi
# Remove NetBIOS entries from /etc/inetd.conf
- if [ -x /usr/sbin/update-inetd ]; then
+ if [ -x "`which update-inetd 2>/dev/null`" ]; then
update-inetd --remove netbios-ssn
fi
fi
diff --git a/debian/samba.samba-ad-dc.init b/debian/samba.samba-ad-dc.init
index 3132d2e..4408dee 100644
--- a/debian/samba.samba-ad-dc.init
+++ b/debian/samba.samba-ad-dc.init
@@ -6,7 +6,8 @@
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: start Samba daemons for the AD DC
+# Short-Description: Samba daemons for the AD DC
+# Description: Meta-service to provide AD and SMB/CIFS services to clients
### END INIT INFO
#
diff --git a/debian/samba.smbd.init b/debian/samba.smbd.init
index 3db327e..f360620 100644
--- a/debian/samba.smbd.init
+++ b/debian/samba.smbd.init
@@ -8,7 +8,8 @@
# Default-Stop: 0 1 6
# Should-Start: slapd cups
# Should-Stop: slapd cups
-# Short-Description: start Samba SMB/CIFS daemon (smbd)
+# Short-Description: Samba SMB/CIFS daemon (smbd)
+# Description: server to provide SMB/CIFS services to clients
### END INIT INFO
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..8f73bf2
--- /dev/null
+++ b/debian/upstream/signing-key.asc
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQGiBEXGOUcRBACooMht/2pmNT3bKZn1WEFQa+sXe6nxi3G6lH5bIBUKp85SDM57
+4qTcBIJXhwfGABeSvyUdZJbBxJDD5bNiO4k+Y5j3t8t9hb2FKgJ1bXL2aO5BbFnJ
+UlkWw8UnHE3A3mmq2hYjfu+0J7mdMxyH5kajbtGfgt0rbPn/K00AgoBCqwCgyNR7
+1kaKzs1os6BiBhu0sTxTkN8EAJC1u1+z9mput/IWo9bQ85KRPfTXXRxv07jK++Yf
+tPGMerJFxdpdVI+O+LQB9J7L6WUHF8TzmMEGHHStjnKiZB3PCDcAYpR8pVB3085f
+fEpF32ic7mQzK+K+P0KARadywX1JLYSYP2YQ1BeYteC7hUtp/U0i0c12JDG4Bmil
+JMZABACis5ms470DH3OwU7b32lDDLFWlwGEQX+OKQealhYgz3hdIzO+cm6Gz0/z1
+YGl8oV0dc1tG2EfsndDx7QRwrBoxahfsgClN4K8HLtbBy1Ox9kZn+hr1yNEaPdko
++W5bC96Wo2RqnSP09qJ5/tp6rXXCLIgF/+PeCJtP31MaMP0Jo7Q6U2FtYmEgRGlz
+dHJpYnV0aW9uIFZlcmlmaWNhdGlvbiBLZXkgPHNhbWJhLWJ1Z3NAc2FtYmEub3Jn
+PohmBBMRAgAmAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AFAlaonqgFCRLDmNsA
+CgkQbzORW2Vot+oANgCgtYfca+5zl3adpxkrJZMG4c3xWg4An242ZMCXcppp3WtZ
+0DK0scvQ+yLbuQINBEXGOWEQCADIOV4TpVG6tDXU7YD1VjJ39xduomiWTg94dIOD
+g1bZHLvwUa5I1X7zsjYmghZ5Qa6WxNknbRywWnaP0POMXSMspVWnqBQTZknxdApM
+bMQEko0pPJSLwdTD3+0y5ht4edf08asWdSBT5yvu5Oak4O/Sa3P5lNIe8Q3SjfqR
+YiSX12uWgqeh+2JsQC50Lr9rnz9AMjKqZEx2v7XKnCkxoaFy1XwOpPjJtIuPFaSI
+5OunNsuhXYeGQv7MqqA2RNuulonoHgl9J6YzRBjdmDB28Lm+JKXyJpnHDrUkK6c5
+04EuxVXXQKOvLNPwod3U89OCZ3gFZU/zeESQdpWxXMiQvUqPAAQLCACnbn0cYaXh
+l3UnnQgyPYVUJV12/sAjhlgAQq08SPgTJp4GE/Jx9C2KMS7dlWYH4tjDSbeO+RLL
+d26npdhiy8Cn9UvsJvDs71/+5S2PTpV16eH5QzQZkvJ/PXkkRXQ1Ilovkvt5rKie
+HCx4n6QZb5td9AuAeRZp75UXERO7pXKG/57o/SzswrD/tSEKRpBKQED4eHsPohLw
+3dMKDWG6hLRf4GR8v+xKLFivqXr3ttELb9xS7ZyZqz6FSFucQAp6XY/xjnR3CFzf
+Kq9pHO4PwvhU53uQeI9suAHSPecxfUIcQfrCaN6K6ktEMY+KxeTJUgqB7Fnskqyn
+Cof0MN2OA40+iE8EGBECAA8CGwwFAlaonssFCRLDmN8ACgkQbzORW2Vot+pQOwCg
+n7y4A3pDADb+tNzOo5L1fQcFlxYAmgMPOlsiuY4hd+pW1UjKCtIHaKuO
+=CRoQ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/debian/watch b/debian/watch
index 45b67ec..b194bd4 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
version=3
-opts="uversionmangle=s/tp/~alpha1~tp/;s/alpha/~alpha/;s/beta/~beta/;s/rc/~rc/,dversionmangle=s/\+dfsg\d*$//" \
+opts="uversionmangle=s/tp/~alpha1~tp/;s/alpha/~alpha/;s/beta/~beta/;s/rc/~rc/,dversionmangle=s/\+dfsg\d*$//,pgpsigurlmangle=s/tar\.gz/tar.asc/,decompress" \
https://download.samba.org/pub/samba samba-(4\.4\..*).tar.gz
diff --git a/debian/winbind.dirs b/debian/winbind.dirs
deleted file mode 100644
index 9d9918d..0000000
--- a/debian/winbind.dirs
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/samba/nss_info
diff --git a/debian/winbind.init b/debian/winbind.init
index 6c0ec05..13905cb 100644
--- a/debian/winbind.init
+++ b/debian/winbind.init
@@ -7,7 +7,8 @@
# Should-Start: samba
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: start Winbind daemon
+# Short-Description: Samba Winbind daemon
+# Description: Name Service Switch daemon for resolving names from NT servers
### END INIT INFO
diff --git a/debian/winbind.install b/debian/winbind.install
index c058253..2c81660 100644
--- a/debian/winbind.install
+++ b/debian/winbind.install
@@ -7,6 +7,7 @@ usr/lib/*/samba/nss_info/hash.so
usr/lib/*/samba/nss_info/rfc2307.so
usr/lib/*/samba/nss_info/sfu.so
usr/lib/*/samba/nss_info/sfu20.so
+lib/systemd/system/winbind.service
usr/sbin/winbindd
usr/share/man/man1/ntlm_auth.1
usr/share/man/man1/wbinfo.1
diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml
index 2ac5db7..a275344 100644
--- a/docs-xml/manpages/vfs_fruit.8.xml
+++ b/docs-xml/manpages/vfs_fruit.8.xml
@@ -226,6 +226,17 @@
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>fruit:posix_rename = yes | no</term>
+ <listitem>
+ <para>Whether to enable POSIX directory rename behaviour
+ for OS X clients. Without this, directories can't be
+ renamed if any client has any file inside it
+ (recursive!) open.</para>
+ <para>The default is <emphasis>yes</emphasis>.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
diff --git a/docs/manpages/cifsdd.8 b/docs/manpages/cifsdd.8
index 89b44cb..34eed28 100644
--- a/docs/manpages/cifsdd.8
+++ b/docs/manpages/cifsdd.8
@@ -2,12 +2,12 @@
.\" Title: cifsdd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "CIFSDD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "CIFSDD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/dbwrap_tool.1 b/docs/manpages/dbwrap_tool.1
index bfd7a3f..6adaab8 100644
--- a/docs/manpages/dbwrap_tool.1
+++ b/docs/manpages/dbwrap_tool.1
@@ -2,12 +2,12 @@
.\" Title: dbwrap_tool
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "DBWRAP_TOOL" "1" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "DBWRAP_TOOL" "1" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/eventlogadm.8 b/docs/manpages/eventlogadm.8
index 1f0cbfc..acad2b6 100644
--- a/docs/manpages/eventlogadm.8
+++ b/docs/manpages/eventlogadm.8
@@ -2,12 +2,12 @@
.\" Title: eventlogadm
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "EVENTLOGADM" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "EVENTLOGADM" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/findsmb.1 b/docs/manpages/findsmb.1
index 5de8a89..5d27480 100644
--- a/docs/manpages/findsmb.1
+++ b/docs/manpages/findsmb.1
@@ -2,12 +2,12 @@
.\" Title: findsmb
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "FINDSMB" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "FINDSMB" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_ad.8 b/docs/manpages/idmap_ad.8
index 657a9f0..d40280e 100644
--- a/docs/manpages/idmap_ad.8
+++ b/docs/manpages/idmap_ad.8
@@ -2,12 +2,12 @@
.\" Title: idmap_ad
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_AD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_AD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_autorid.8 b/docs/manpages/idmap_autorid.8
index 490443b..b98ebed 100644
--- a/docs/manpages/idmap_autorid.8
+++ b/docs/manpages/idmap_autorid.8
@@ -2,12 +2,12 @@
.\" Title: idmap_autorid
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_AUTORID" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_AUTORID" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_hash.8 b/docs/manpages/idmap_hash.8
index ca932d6..5d7ccc5 100644
--- a/docs/manpages/idmap_hash.8
+++ b/docs/manpages/idmap_hash.8
@@ -2,12 +2,12 @@
.\" Title: idmap_hash
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_HASH" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_HASH" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_ldap.8 b/docs/manpages/idmap_ldap.8
index bb026ca..013ed02 100644
--- a/docs/manpages/idmap_ldap.8
+++ b/docs/manpages/idmap_ldap.8
@@ -2,12 +2,12 @@
.\" Title: idmap_ldap
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_LDAP" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_LDAP" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_nss.8 b/docs/manpages/idmap_nss.8
index 532dab7..29d5da4 100644
--- a/docs/manpages/idmap_nss.8
+++ b/docs/manpages/idmap_nss.8
@@ -2,12 +2,12 @@
.\" Title: idmap_nss
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_NSS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_NSS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_rfc2307.8 b/docs/manpages/idmap_rfc2307.8
index 593482c..75a5887 100644
--- a/docs/manpages/idmap_rfc2307.8
+++ b/docs/manpages/idmap_rfc2307.8
@@ -2,12 +2,12 @@
.\" Title: idmap_rfc2307
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_RFC2307" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_RFC2307" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_rid.8 b/docs/manpages/idmap_rid.8
index 8323b25..92a5c49 100644
--- a/docs/manpages/idmap_rid.8
+++ b/docs/manpages/idmap_rid.8
@@ -2,12 +2,12 @@
.\" Title: idmap_rid
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_RID" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_RID" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_script.8 b/docs/manpages/idmap_script.8
index 2de6289..8b39232 100644
--- a/docs/manpages/idmap_script.8
+++ b/docs/manpages/idmap_script.8
@@ -2,12 +2,12 @@
.\" Title: idmap_script
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_SCRIPT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_SCRIPT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_tdb.8 b/docs/manpages/idmap_tdb.8
index d7ebd45..57f602f 100644
--- a/docs/manpages/idmap_tdb.8
+++ b/docs/manpages/idmap_tdb.8
@@ -2,12 +2,12 @@
.\" Title: idmap_tdb
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_TDB" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_TDB" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/idmap_tdb2.8 b/docs/manpages/idmap_tdb2.8
index 2fd515e..966dc0a 100644
--- a/docs/manpages/idmap_tdb2.8
+++ b/docs/manpages/idmap_tdb2.8
@@ -2,12 +2,12 @@
.\" Title: idmap_tdb2
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "IDMAP_TDB2" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "IDMAP_TDB2" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/libsmbclient.7 b/docs/manpages/libsmbclient.7
index 2951eec..50250ea 100644
--- a/docs/manpages/libsmbclient.7
+++ b/docs/manpages/libsmbclient.7
@@ -2,12 +2,12 @@
.\" Title: libsmbclient
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: 7
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "LIBSMBCLIENT" "7" "05/02/2016" "Samba 4\&.4" "7"
+.TH "LIBSMBCLIENT" "7" "06/06/2016" "Samba 4\&.4" "7"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/lmhosts.5 b/docs/manpages/lmhosts.5
index a2774ef..ef09935 100644
--- a/docs/manpages/lmhosts.5
+++ b/docs/manpages/lmhosts.5
@@ -2,12 +2,12 @@
.\" Title: lmhosts
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: File Formats and Conventions
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "LMHOSTS" "5" "05/02/2016" "Samba 4\&.4" "File Formats and Conventions"
+.TH "LMHOSTS" "5" "06/06/2016" "Samba 4\&.4" "File Formats and Conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/log2pcap.1 b/docs/manpages/log2pcap.1
index 253c516..2c006cf 100644
--- a/docs/manpages/log2pcap.1
+++ b/docs/manpages/log2pcap.1
@@ -2,12 +2,12 @@
.\" Title: log2pcap
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "LOG2PCAP" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "LOG2PCAP" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/net.8 b/docs/manpages/net.8
index 423d4f5..e2e8a6d 100644
--- a/docs/manpages/net.8
+++ b/docs/manpages/net.8
@@ -2,12 +2,12 @@
.\" Title: net
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "NET" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "NET" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/nmbd.8 b/docs/manpages/nmbd.8
index 1054d3b..d248447 100644
--- a/docs/manpages/nmbd.8
+++ b/docs/manpages/nmbd.8
@@ -2,12 +2,12 @@
.\" Title: nmbd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "NMBD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "NMBD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/nmblookup.1 b/docs/manpages/nmblookup.1
index 4b0f454..16d53a7 100644
--- a/docs/manpages/nmblookup.1
+++ b/docs/manpages/nmblookup.1
@@ -2,12 +2,12 @@
.\" Title: nmblookup
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "NMBLOOKUP" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "NMBLOOKUP" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/ntlm_auth.1 b/docs/manpages/ntlm_auth.1
index d26070d..fa65b28 100644
--- a/docs/manpages/ntlm_auth.1
+++ b/docs/manpages/ntlm_auth.1
@@ -2,12 +2,12 @@
.\" Title: ntlm_auth
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "NTLM_AUTH" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "NTLM_AUTH" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/pam_winbind.8 b/docs/manpages/pam_winbind.8
index 750875a..9477367 100644
--- a/docs/manpages/pam_winbind.8
+++ b/docs/manpages/pam_winbind.8
@@ -2,12 +2,12 @@
.\" Title: pam_winbind
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: 8
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "PAM_WINBIND" "8" "05/02/2016" "Samba 4\&.4" "8"
+.TH "PAM_WINBIND" "8" "06/06/2016" "Samba 4\&.4" "8"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/pam_winbind.conf.5 b/docs/manpages/pam_winbind.conf.5
index 5569634..a0c65f5 100644
--- a/docs/manpages/pam_winbind.conf.5
+++ b/docs/manpages/pam_winbind.conf.5
@@ -2,12 +2,12 @@
.\" Title: pam_winbind.conf
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: 5
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "PAM_WINBIND\&.CONF" "5" "05/02/2016" "Samba 4\&.4" "5"
+.TH "PAM_WINBIND\&.CONF" "5" "06/06/2016" "Samba 4\&.4" "5"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/pdbedit.8 b/docs/manpages/pdbedit.8
index 0c03c9d..e5bac92 100644
--- a/docs/manpages/pdbedit.8
+++ b/docs/manpages/pdbedit.8
@@ -2,12 +2,12 @@
.\" Title: pdbedit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "PDBEDIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "PDBEDIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/profiles.1 b/docs/manpages/profiles.1
index 8b43297..4f1274c 100644
--- a/docs/manpages/profiles.1
+++ b/docs/manpages/profiles.1
@@ -2,12 +2,12 @@
.\" Title: profiles
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "PROFILES" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "PROFILES" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/rpcclient.1 b/docs/manpages/rpcclient.1
index a6bd8d8..d97ba96 100644
--- a/docs/manpages/rpcclient.1
+++ b/docs/manpages/rpcclient.1
@@ -2,12 +2,12 @@
.\" Title: rpcclient
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "RPCCLIENT" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "RPCCLIENT" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/samba-regedit.8 b/docs/manpages/samba-regedit.8
index c4ee6d0..e449d6a 100644
--- a/docs/manpages/samba-regedit.8
+++ b/docs/manpages/samba-regedit.8
@@ -2,12 +2,12 @@
.\" Title: samba-regedit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SAMBA\-REGEDIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SAMBA\-REGEDIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/samba-tool.8 b/docs/manpages/samba-tool.8
index ececf58..540eacf 100644
--- a/docs/manpages/samba-tool.8
+++ b/docs/manpages/samba-tool.8
@@ -2,12 +2,12 @@
.\" Title: samba-tool
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SAMBA\-TOOL" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SAMBA\-TOOL" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/samba.7 b/docs/manpages/samba.7
index 9557a36..1118939 100644
--- a/docs/manpages/samba.7
+++ b/docs/manpages/samba.7
@@ -2,12 +2,12 @@
.\" Title: samba
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: Miscellanea
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SAMBA" "7" "05/02/2016" "Samba 4\&.4" "Miscellanea"
+.TH "SAMBA" "7" "06/06/2016" "Samba 4\&.4" "Miscellanea"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/samba.8 b/docs/manpages/samba.8
index 333ca51..a0c678e 100644
--- a/docs/manpages/samba.8
+++ b/docs/manpages/samba.8
@@ -2,12 +2,12 @@
.\" Title: samba
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SAMBA" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SAMBA" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/sharesec.1 b/docs/manpages/sharesec.1
index 396b58a..43b72d4 100644
--- a/docs/manpages/sharesec.1
+++ b/docs/manpages/sharesec.1
@@ -2,12 +2,12 @@
.\" Title: sharesec
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SHARESEC" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SHARESEC" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smb.conf.5 b/docs/manpages/smb.conf.5
index a4f1538..c6fb279 100644
--- a/docs/manpages/smb.conf.5
+++ b/docs/manpages/smb.conf.5
@@ -2,12 +2,12 @@
.\" Title: smb.conf
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: File Formats and Conventions
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMB\&.CONF" "5" "05/02/2016" "Samba 4\&.4" "File Formats and Conventions"
+.TH "SMB\&.CONF" "5" "06/06/2016" "Samba 4\&.4" "File Formats and Conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbcacls.1 b/docs/manpages/smbcacls.1
index 8772ded..c673341 100644
--- a/docs/manpages/smbcacls.1
+++ b/docs/manpages/smbcacls.1
@@ -2,12 +2,12 @@
.\" Title: smbcacls
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBCACLS" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBCACLS" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbclient.1 b/docs/manpages/smbclient.1
index b183410..1c6de5d 100644
--- a/docs/manpages/smbclient.1
+++ b/docs/manpages/smbclient.1
@@ -2,12 +2,12 @@
.\" Title: smbclient
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBCLIENT" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBCLIENT" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbcontrol.1 b/docs/manpages/smbcontrol.1
index da2c224..cbfe54d 100644
--- a/docs/manpages/smbcontrol.1
+++ b/docs/manpages/smbcontrol.1
@@ -2,12 +2,12 @@
.\" Title: smbcontrol
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBCONTROL" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBCONTROL" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbcquotas.1 b/docs/manpages/smbcquotas.1
index 49387e2..ce65848 100644
--- a/docs/manpages/smbcquotas.1
+++ b/docs/manpages/smbcquotas.1
@@ -2,12 +2,12 @@
.\" Title: smbcquotas
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBCQUOTAS" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBCQUOTAS" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbd.8 b/docs/manpages/smbd.8
index a6e9e0a..2d9f7b8 100644
--- a/docs/manpages/smbd.8
+++ b/docs/manpages/smbd.8
@@ -2,12 +2,12 @@
.\" Title: smbd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SMBD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbget.1 b/docs/manpages/smbget.1
index 99db78f..0b0b17b 100644
--- a/docs/manpages/smbget.1
+++ b/docs/manpages/smbget.1
@@ -2,12 +2,12 @@
.\" Title: smbget
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBGET" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBGET" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbgetrc.5 b/docs/manpages/smbgetrc.5
index ddd058b..0a1f0c6 100644
--- a/docs/manpages/smbgetrc.5
+++ b/docs/manpages/smbgetrc.5
@@ -2,12 +2,12 @@
.\" Title: smbgetrc
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: File Formats and Conventions
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBGETRC" "5" "05/02/2016" "Samba 4\&.4" "File Formats and Conventions"
+.TH "SMBGETRC" "5" "06/06/2016" "Samba 4\&.4" "File Formats and Conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbpasswd.5 b/docs/manpages/smbpasswd.5
index f4836e3..bf377db 100644
--- a/docs/manpages/smbpasswd.5
+++ b/docs/manpages/smbpasswd.5
@@ -2,12 +2,12 @@
.\" Title: smbpasswd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: File Formats and Conventions
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBPASSWD" "5" "05/02/2016" "Samba 4\&.4" "File Formats and Conventions"
+.TH "SMBPASSWD" "5" "06/06/2016" "Samba 4\&.4" "File Formats and Conventions"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbpasswd.8 b/docs/manpages/smbpasswd.8
index b73c8dc..89402ef 100644
--- a/docs/manpages/smbpasswd.8
+++ b/docs/manpages/smbpasswd.8
@@ -2,12 +2,12 @@
.\" Title: smbpasswd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBPASSWD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SMBPASSWD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbspool.8 b/docs/manpages/smbspool.8
index a6a02d9..e58d8a7 100644
--- a/docs/manpages/smbspool.8
+++ b/docs/manpages/smbspool.8
@@ -2,12 +2,12 @@
.\" Title: smbspool
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBSPOOL" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SMBSPOOL" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbspool_krb5_wrapper.8 b/docs/manpages/smbspool_krb5_wrapper.8
index fbcd4d9..bd0a309 100644
--- a/docs/manpages/smbspool_krb5_wrapper.8
+++ b/docs/manpages/smbspool_krb5_wrapper.8
@@ -2,12 +2,12 @@
.\" Title: smbspool_krb5_wrapper
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBSPOOL_KRB5_WRAPPE" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "SMBSPOOL_KRB5_WRAPPE" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbstatus.1 b/docs/manpages/smbstatus.1
index d4c918e..1a3849a 100644
--- a/docs/manpages/smbstatus.1
+++ b/docs/manpages/smbstatus.1
@@ -2,12 +2,12 @@
.\" Title: smbstatus
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBSTATUS" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBSTATUS" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbtar.1 b/docs/manpages/smbtar.1
index 80bc876..cbc7534 100644
--- a/docs/manpages/smbtar.1
+++ b/docs/manpages/smbtar.1
@@ -2,12 +2,12 @@
.\" Title: smbtar
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBTAR" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBTAR" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/smbtree.1 b/docs/manpages/smbtree.1
index 18106b7..6de3529 100644
--- a/docs/manpages/smbtree.1
+++ b/docs/manpages/smbtree.1
@@ -2,12 +2,12 @@
.\" Title: smbtree
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "SMBTREE" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "SMBTREE" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/testparm.1 b/docs/manpages/testparm.1
index 8f34ad0..4922c09 100644
--- a/docs/manpages/testparm.1
+++ b/docs/manpages/testparm.1
@@ -2,12 +2,12 @@
.\" Title: testparm
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "TESTPARM" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "TESTPARM" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_acl_tdb.8 b/docs/manpages/vfs_acl_tdb.8
index 4d694f1..2f01661 100644
--- a/docs/manpages/vfs_acl_tdb.8
+++ b/docs/manpages/vfs_acl_tdb.8
@@ -2,12 +2,12 @@
.\" Title: vfs_acl_tdb
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_ACL_TDB" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_ACL_TDB" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_acl_xattr.8 b/docs/manpages/vfs_acl_xattr.8
index 6909e14..660277f 100644
--- a/docs/manpages/vfs_acl_xattr.8
+++ b/docs/manpages/vfs_acl_xattr.8
@@ -2,12 +2,12 @@
.\" Title: vfs_acl_xattr
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_ACL_XATTR" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_ACL_XATTR" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_aio_fork.8 b/docs/manpages/vfs_aio_fork.8
index ec34198..6d0d973 100644
--- a/docs/manpages/vfs_aio_fork.8
+++ b/docs/manpages/vfs_aio_fork.8
@@ -2,12 +2,12 @@
.\" Title: vfs_aio_fork
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_AIO_FORK" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_AIO_FORK" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_aio_linux.8 b/docs/manpages/vfs_aio_linux.8
index e7796bd..d843fd7 100644
--- a/docs/manpages/vfs_aio_linux.8
+++ b/docs/manpages/vfs_aio_linux.8
@@ -2,12 +2,12 @@
.\" Title: vfs_aio_linux
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_AIO_LINUX" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_AIO_LINUX" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_aio_pthread.8 b/docs/manpages/vfs_aio_pthread.8
index 95c28bf..6655a2f 100644
--- a/docs/manpages/vfs_aio_pthread.8
+++ b/docs/manpages/vfs_aio_pthread.8
@@ -2,12 +2,12 @@
.\" Title: vfs_aio_pthread
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_AIO_PTHREAD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_AIO_PTHREAD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_audit.8 b/docs/manpages/vfs_audit.8
index 3dc8a04..6e4c468 100644
--- a/docs/manpages/vfs_audit.8
+++ b/docs/manpages/vfs_audit.8
@@ -2,12 +2,12 @@
.\" Title: vfs_audit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_AUDIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_AUDIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_btrfs.8 b/docs/manpages/vfs_btrfs.8
index 803e18f..7a67928 100644
--- a/docs/manpages/vfs_btrfs.8
+++ b/docs/manpages/vfs_btrfs.8
@@ -2,12 +2,12 @@
.\" Title: vfs_btrfs
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_BTRFS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_BTRFS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_cacheprime.8 b/docs/manpages/vfs_cacheprime.8
index 6673465..e4a76e2 100644
--- a/docs/manpages/vfs_cacheprime.8
+++ b/docs/manpages/vfs_cacheprime.8
@@ -2,12 +2,12 @@
.\" Title: vfs_cacheprime
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_CACHEPRIME" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_CACHEPRIME" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_cap.8 b/docs/manpages/vfs_cap.8
index 0061065..35e5919 100644
--- a/docs/manpages/vfs_cap.8
+++ b/docs/manpages/vfs_cap.8
@@ -2,12 +2,12 @@
.\" Title: vfs_cap
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_CAP" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_CAP" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_catia.8 b/docs/manpages/vfs_catia.8
index 07d3d48..6390743 100644
--- a/docs/manpages/vfs_catia.8
+++ b/docs/manpages/vfs_catia.8
@@ -2,12 +2,12 @@
.\" Title: vfs_catia
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_CATIA" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_CATIA" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_ceph.8 b/docs/manpages/vfs_ceph.8
index 0bf9456..7f0358e 100644
--- a/docs/manpages/vfs_ceph.8
+++ b/docs/manpages/vfs_ceph.8
@@ -2,12 +2,12 @@
.\" Title: vfs_ceph
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_CEPH" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_CEPH" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_commit.8 b/docs/manpages/vfs_commit.8
index 29bcd39..ff83159 100644
--- a/docs/manpages/vfs_commit.8
+++ b/docs/manpages/vfs_commit.8
@@ -2,12 +2,12 @@
.\" Title: vfs_commit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_COMMIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_COMMIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_crossrename.8 b/docs/manpages/vfs_crossrename.8
index 6ef3596..93fdfa9 100644
--- a/docs/manpages/vfs_crossrename.8
+++ b/docs/manpages/vfs_crossrename.8
@@ -2,12 +2,12 @@
.\" Title: vfs_crossrename
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_CROSSRENAME" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_CROSSRENAME" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_default_quota.8 b/docs/manpages/vfs_default_quota.8
index 2fdeb2e..380ecbb 100644
--- a/docs/manpages/vfs_default_quota.8
+++ b/docs/manpages/vfs_default_quota.8
@@ -2,12 +2,12 @@
.\" Title: vfs_default_quota
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_DEFAULT_QUOTA" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_DEFAULT_QUOTA" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_dirsort.8 b/docs/manpages/vfs_dirsort.8
index 1abad3d..93e5010 100644
--- a/docs/manpages/vfs_dirsort.8
+++ b/docs/manpages/vfs_dirsort.8
@@ -2,12 +2,12 @@
.\" Title: vfs_dirsort
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_DIRSORT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_DIRSORT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_extd_audit.8 b/docs/manpages/vfs_extd_audit.8
index 519d70d..5025c0dc 100644
--- a/docs/manpages/vfs_extd_audit.8
+++ b/docs/manpages/vfs_extd_audit.8
@@ -2,12 +2,12 @@
.\" Title: vfs_extd_audit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_EXTD_AUDIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_EXTD_AUDIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_fake_perms.8 b/docs/manpages/vfs_fake_perms.8
index 7dcc506..312c18c 100644
--- a/docs/manpages/vfs_fake_perms.8
+++ b/docs/manpages/vfs_fake_perms.8
@@ -2,12 +2,12 @@
.\" Title: vfs_fake_perms
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_FAKE_PERMS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_FAKE_PERMS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_fileid.8 b/docs/manpages/vfs_fileid.8
index 5e34f58..b7c15f5 100644
--- a/docs/manpages/vfs_fileid.8
+++ b/docs/manpages/vfs_fileid.8
@@ -2,12 +2,12 @@
.\" Title: vfs_fileid
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_FILEID" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_FILEID" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_fruit.8 b/docs/manpages/vfs_fruit.8
index 959b200..b1aabbf 100644
--- a/docs/manpages/vfs_fruit.8
+++ b/docs/manpages/vfs_fruit.8
@@ -2,12 +2,12 @@
.\" Title: vfs_fruit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_FRUIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_FRUIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -296,6 +296,14 @@ WARNING: the copyfile request is blocking the client while the server does the c
The default is
\fIno\fR\&.
.RE
+.PP
+fruit:posix_rename = yes | no
+.RS 4
+Whether to enable POSIX directory rename behaviour for OS X clients\&. Without this, directories can\*(Aqt be renamed if any client has any file inside it (recursive!) open\&.
+.sp
+The default is
+\fIyes\fR\&.
+.RE
.SH "EXAMPLES"
.sp
.if n \{\
diff --git a/docs/manpages/vfs_full_audit.8 b/docs/manpages/vfs_full_audit.8
index d06a516..a9457e3 100644
--- a/docs/manpages/vfs_full_audit.8
+++ b/docs/manpages/vfs_full_audit.8
@@ -2,12 +2,12 @@
.\" Title: vfs_full_audit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_FULL_AUDIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_FULL_AUDIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_glusterfs.8 b/docs/manpages/vfs_glusterfs.8
index 9afea58..6303d15 100644
--- a/docs/manpages/vfs_glusterfs.8
+++ b/docs/manpages/vfs_glusterfs.8
@@ -2,12 +2,12 @@
.\" Title: vfs_glusterfs
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_GLUSTERFS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_GLUSTERFS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_gpfs.8 b/docs/manpages/vfs_gpfs.8
index e80b22b..9b71ecb 100644
--- a/docs/manpages/vfs_gpfs.8
+++ b/docs/manpages/vfs_gpfs.8
@@ -2,12 +2,12 @@
.\" Title: vfs_gpfs
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_GPFS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_GPFS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_linux_xfs_sgid.8 b/docs/manpages/vfs_linux_xfs_sgid.8
index 13f1e12..59f71cf 100644
--- a/docs/manpages/vfs_linux_xfs_sgid.8
+++ b/docs/manpages/vfs_linux_xfs_sgid.8
@@ -2,12 +2,12 @@
.\" Title: vfs_syncops
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_SYNCOPS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_SYNCOPS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_media_harmony.8 b/docs/manpages/vfs_media_harmony.8
index d2bb133..2e5a3ff 100644
--- a/docs/manpages/vfs_media_harmony.8
+++ b/docs/manpages/vfs_media_harmony.8
@@ -2,12 +2,12 @@
.\" Title: vfs_media_harmony
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_MEDIA_HARMONY" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_MEDIA_HARMONY" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_netatalk.8 b/docs/manpages/vfs_netatalk.8
index d15d171..821fd08 100644
--- a/docs/manpages/vfs_netatalk.8
+++ b/docs/manpages/vfs_netatalk.8
@@ -2,12 +2,12 @@
.\" Title: vfs_netatalk
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_NETATALK" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_NETATALK" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_offline.8 b/docs/manpages/vfs_offline.8
index 4b7c250..86f59b1 100644
--- a/docs/manpages/vfs_offline.8
+++ b/docs/manpages/vfs_offline.8
@@ -2,12 +2,12 @@
.\" Title: vfs_offline
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_OFFLINE" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_OFFLINE" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_prealloc.8 b/docs/manpages/vfs_prealloc.8
index 27b28b7..c3b4288 100644
--- a/docs/manpages/vfs_prealloc.8
+++ b/docs/manpages/vfs_prealloc.8
@@ -2,12 +2,12 @@
.\" Title: vfs_prealloc
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_PREALLOC" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_PREALLOC" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_preopen.8 b/docs/manpages/vfs_preopen.8
index 1452bd2..99e2cf5 100644
--- a/docs/manpages/vfs_preopen.8
+++ b/docs/manpages/vfs_preopen.8
@@ -2,12 +2,12 @@
.\" Title: vfs_preopen
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_PREOPEN" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_PREOPEN" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_readahead.8 b/docs/manpages/vfs_readahead.8
index a97fdb1..aa982af 100644
--- a/docs/manpages/vfs_readahead.8
+++ b/docs/manpages/vfs_readahead.8
@@ -2,12 +2,12 @@
.\" Title: vfs_readahead
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_READAHEAD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_READAHEAD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_readonly.8 b/docs/manpages/vfs_readonly.8
index 42e614d..a4d23ed 100644
--- a/docs/manpages/vfs_readonly.8
+++ b/docs/manpages/vfs_readonly.8
@@ -2,12 +2,12 @@
.\" Title: vfs_readonly
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_READONLY" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_READONLY" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_recycle.8 b/docs/manpages/vfs_recycle.8
index 58ca972..1cd0c83 100644
--- a/docs/manpages/vfs_recycle.8
+++ b/docs/manpages/vfs_recycle.8
@@ -2,12 +2,12 @@
.\" Title: vfs_recycle
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_RECYCLE" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_RECYCLE" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_shadow_copy.8 b/docs/manpages/vfs_shadow_copy.8
index 393891d..ef6adbf 100644
--- a/docs/manpages/vfs_shadow_copy.8
+++ b/docs/manpages/vfs_shadow_copy.8
@@ -2,12 +2,12 @@
.\" Title: vfs_shadow_copy
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_SHADOW_COPY" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_SHADOW_COPY" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_shadow_copy2.8 b/docs/manpages/vfs_shadow_copy2.8
index 26a09ac..12cd2ee 100644
--- a/docs/manpages/vfs_shadow_copy2.8
+++ b/docs/manpages/vfs_shadow_copy2.8
@@ -2,12 +2,12 @@
.\" Title: vfs_shadow_copy2
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_SHADOW_COPY2" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_SHADOW_COPY2" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_shell_snap.8 b/docs/manpages/vfs_shell_snap.8
index 7f02ebb..21a2008 100644
--- a/docs/manpages/vfs_shell_snap.8
+++ b/docs/manpages/vfs_shell_snap.8
@@ -2,12 +2,12 @@
.\" Title: vfs_shell_snap
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_SHELL_SNAP" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_SHELL_SNAP" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_snapper.8 b/docs/manpages/vfs_snapper.8
index 81e2781..b5b6fe9 100644
--- a/docs/manpages/vfs_snapper.8
+++ b/docs/manpages/vfs_snapper.8
@@ -2,12 +2,12 @@
.\" Title: vfs_snapper
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_SNAPPER" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_SNAPPER" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_streams_depot.8 b/docs/manpages/vfs_streams_depot.8
index 7ac3927..f1a3e0b 100644
--- a/docs/manpages/vfs_streams_depot.8
+++ b/docs/manpages/vfs_streams_depot.8
@@ -2,12 +2,12 @@
.\" Title: vfs_streams_depot
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_STREAMS_DEPOT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_STREAMS_DEPOT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_streams_xattr.8 b/docs/manpages/vfs_streams_xattr.8
index e6af5a9..dd32863 100644
--- a/docs/manpages/vfs_streams_xattr.8
+++ b/docs/manpages/vfs_streams_xattr.8
@@ -2,12 +2,12 @@
.\" Title: vfs_streams_xattr
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_STREAMS_XATTR" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_STREAMS_XATTR" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_syncops.8 b/docs/manpages/vfs_syncops.8
index 4be3ecc..b4addbe 100644
--- a/docs/manpages/vfs_syncops.8
+++ b/docs/manpages/vfs_syncops.8
@@ -2,12 +2,12 @@
.\" Title: vfs_syncops
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_SYNCOPS" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_SYNCOPS" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_time_audit.8 b/docs/manpages/vfs_time_audit.8
index 44db150..7a95733 100644
--- a/docs/manpages/vfs_time_audit.8
+++ b/docs/manpages/vfs_time_audit.8
@@ -2,12 +2,12 @@
.\" Title: vfs_time_audit
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_TIME_AUDIT" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_TIME_AUDIT" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_tsmsm.8 b/docs/manpages/vfs_tsmsm.8
index d6ef670..e6442fc 100644
--- a/docs/manpages/vfs_tsmsm.8
+++ b/docs/manpages/vfs_tsmsm.8
@@ -2,12 +2,12 @@
.\" Title: vfs_tsmsm
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_TSMSM" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_TSMSM" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_unityed_media.8 b/docs/manpages/vfs_unityed_media.8
index def6493..fd9609b 100644
--- a/docs/manpages/vfs_unityed_media.8
+++ b/docs/manpages/vfs_unityed_media.8
@@ -2,12 +2,12 @@
.\" Title: vfs_unityed_media
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_UNITYED_MEDIA" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_UNITYED_MEDIA" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_worm.8 b/docs/manpages/vfs_worm.8
index 9bda926..b6c5340 100644
--- a/docs/manpages/vfs_worm.8
+++ b/docs/manpages/vfs_worm.8
@@ -2,12 +2,12 @@
.\" Title: vfs_worm
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_WORM" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_WORM" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_xattr_tdb.8 b/docs/manpages/vfs_xattr_tdb.8
index 6279a7d..a6a6191 100644
--- a/docs/manpages/vfs_xattr_tdb.8
+++ b/docs/manpages/vfs_xattr_tdb.8
@@ -2,12 +2,12 @@
.\" Title: vfs_xattr_tdb
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_XATTR_TDB" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_XATTR_TDB" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfs_zfsacl.8 b/docs/manpages/vfs_zfsacl.8
index cd49007..c529bc6 100644
--- a/docs/manpages/vfs_zfsacl.8
+++ b/docs/manpages/vfs_zfsacl.8
@@ -2,12 +2,12 @@
.\" Title: vfs_zfsacl
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFS_ZFSACL" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "VFS_ZFSACL" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/vfstest.1 b/docs/manpages/vfstest.1
index dd1c900..9111a28 100644
--- a/docs/manpages/vfstest.1
+++ b/docs/manpages/vfstest.1
@@ -2,12 +2,12 @@
.\" Title: vfstest
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "VFSTEST" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "VFSTEST" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/wbinfo.1 b/docs/manpages/wbinfo.1
index 20b07b7..931502f 100644
--- a/docs/manpages/wbinfo.1
+++ b/docs/manpages/wbinfo.1
@@ -2,12 +2,12 @@
.\" Title: wbinfo
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: User Commands
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "WBINFO" "1" "05/02/2016" "Samba 4\&.4" "User Commands"
+.TH "WBINFO" "1" "06/06/2016" "Samba 4\&.4" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/winbind_krb5_locator.7 b/docs/manpages/winbind_krb5_locator.7
index a1d2d07..a9dbfde 100644
--- a/docs/manpages/winbind_krb5_locator.7
+++ b/docs/manpages/winbind_krb5_locator.7
@@ -2,12 +2,12 @@
.\" Title: winbind_krb5_locator
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: 7
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "WINBIND_KRB5_LOCATOR" "7" "05/02/2016" "Samba 4\&.4" "7"
+.TH "WINBIND_KRB5_LOCATOR" "7" "06/06/2016" "Samba 4\&.4" "7"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/docs/manpages/winbindd.8 b/docs/manpages/winbindd.8
index 79095d6..c7d79b9 100644
--- a/docs/manpages/winbindd.8
+++ b/docs/manpages/winbindd.8
@@ -2,12 +2,12 @@
.\" Title: winbindd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 05/02/2016
+.\" Date: 06/06/2016
.\" Manual: System Administration tools
.\" Source: Samba 4.4
.\" Language: English
.\"
-.TH "WINBINDD" "8" "05/02/2016" "Samba 4\&.4" "System Administration tools"
+.TH "WINBINDD" "8" "06/06/2016" "Samba 4\&.4" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
diff --git a/lib/ldb-samba/ldb_matching_rules.c b/lib/ldb-samba/ldb_matching_rules.c
index 1692a73..637858f 100644
--- a/lib/ldb-samba/ldb_matching_rules.c
+++ b/lib/ldb-samba/ldb_matching_rules.c
@@ -206,7 +206,7 @@ static int ldb_eval_transitive_filter(TALLOC_CTX *mem_ctx,
struct dsdb_dn *dn_to_match;
const char *dn_oid;
unsigned int count;
- struct dsdb_dn **visited;
+ struct dsdb_dn **visited = NULL;
schema = dsdb_get_schema(ldb, mem_ctx);
if (schema == NULL) {
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 356922a..e710873 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -479,6 +479,18 @@ void torture_result(struct torture_context *test,
} \
} while(0)
+#define torture_assert_u64_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
+ do { uint64_t __got = (got), __not_expected = (not_expected); \
+ if (__got == __not_expected) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %llu (0x%llX), expected a different number: %s", \
+ (unsigned long long)__got, (unsigned long long)__got, \
+ cmt); \
+ ret = false; \
+ goto label; \
+ } \
+ } while(0)
+
#define torture_assert_errno_equal(torture_ctx,expected,cmt)\
do { int __expected = (expected); \
if (errno != __expected) { \
diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c
index 4622971..9979fad 100644
--- a/lib/util/become_daemon.c
+++ b/lib/util/become_daemon.c
@@ -24,7 +24,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "system/locale.h"
-#if HAVE_LIBSYSTEMD_DAEMON
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
#include <systemd/sd-daemon.h>
#endif
#include "lib/util/close_low_fd.h"
@@ -69,7 +69,7 @@ _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout
if (do_fork) {
newpid = fork();
if (newpid) {
-#if HAVE_LIBSYSTEMD_DAEMON
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid);
#endif /* HAVE_LIBSYSTEMD_DAEMON */
_exit(0);
@@ -98,7 +98,7 @@ _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout
_PUBLIC_ void exit_daemon(const char *msg, int error)
{
-#ifdef HAVE_LIBSYSTEMD_DAEMON
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
if (msg == NULL) {
msg = strerror(error);
}
@@ -117,7 +117,7 @@ _PUBLIC_ void daemon_ready(const char *name)
if (name == NULL) {
name = "Samba";
}
-#ifdef HAVE_LIBSYSTEMD_DAEMON
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name);
#endif
DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
@@ -129,7 +129,7 @@ _PUBLIC_ void daemon_status(const char *name, const char *msg)
if (name == NULL) {
name = "Samba";
}
-#ifdef HAVE_LIBSYSTEMD_DAEMON
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
#endif
DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
diff --git a/libcli/auth/msrpc_parse.c b/libcli/auth/msrpc_parse.c
index d499d9e..74a7bcc 100644
--- a/libcli/auth/msrpc_parse.c
+++ b/libcli/auth/msrpc_parse.c
@@ -262,7 +262,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
ps = va_arg(ap, char **);
if (len1 == 0 && len2 == 0) {
- *ps = (char *)discard_const("");
+ *ps = talloc_strdup(mem_ctx, "");
+ if (*ps == NULL) {
+ ret = false;
+ goto cleanup;
+ }
} else {
/* make sure its in the right format - be strict */
if ((len1 != len2) || (ptr + len1 < ptr) || (ptr + len1 < len1) || (ptr + len1 > blob->length)) {
@@ -289,7 +293,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
goto cleanup;
}
} else {
- (*ps) = (char *)discard_const("");
+ *ps = talloc_strdup(mem_ctx, "");
+ if (*ps == NULL) {
+ ret = false;
+ goto cleanup;
+ }
}
}
break;
@@ -302,7 +310,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
ps = (char **)va_arg(ap, char **);
/* make sure its in the right format - be strict */
if (len1 == 0 && len2 == 0) {
- *ps = (char *)discard_const("");
+ *ps = talloc_strdup(mem_ctx, "");
+ if (*ps == NULL) {
+ ret = false;
+ goto cleanup;
+ }
} else {
if ((len1 != len2) || (ptr + len1 < ptr) || (ptr + len1 < len1) || (ptr + len1 > blob->length)) {
ret = false;
@@ -325,7 +337,11 @@ bool msrpc_parse(TALLOC_CTX *mem_ctx,
goto cleanup;
}
} else {
- (*ps) = (char *)discard_const("");
+ *ps = talloc_strdup(mem_ctx, "");
+ if (*ps == NULL) {
+ ret = false;
+ goto cleanup;
+ }
}
}
break;
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index faf74ca..4332374 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -5522,6 +5522,11 @@ uint16_t smb2cli_session_reset_channel_sequence(struct smbXcli_session *session,
return prev_cs;
}
+uint16_t smb2cli_session_current_channel_sequence(struct smbXcli_session *session)
+{
+ return session->smb2->channel_sequence;
+}
+
void smb2cli_session_start_replay(struct smbXcli_session *session)
{
session->smb2->replay_active = true;
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index 8b9851b..16c8848 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -413,6 +413,7 @@ void smb2cli_session_set_id_and_flags(struct smbXcli_session *session,
void smb2cli_session_increment_channel_sequence(struct smbXcli_session *session);
uint16_t smb2cli_session_reset_channel_sequence(struct smbXcli_session *session,
uint16_t channel_sequence);
+uint16_t smb2cli_session_current_channel_sequence(struct smbXcli_session *session);
void smb2cli_session_start_replay(struct smbXcli_session *session);
void smb2cli_session_stop_replay(struct smbXcli_session *session);
NTSTATUS smb2cli_session_update_preauth(struct smbXcli_session *session,
diff --git a/packaging/RHEL-CTDB/setup/smb.init b/packaging/RHEL-CTDB/setup/smb.init
index 4dd5b23..39bf0a8 100644
--- a/packaging/RHEL-CTDB/setup/smb.init
+++ b/packaging/RHEL-CTDB/setup/smb.init
@@ -18,6 +18,8 @@ else
exit 0
fi
+DAEMON_COREFILE_LIMIT='unlimited'
+
# Avoid using root's TMPDIR
unset TMPDIR
diff --git a/packaging/RHEL-CTDB/setup/winbind.init b/packaging/RHEL-CTDB/setup/winbind.init
index a99038f..2a9dd82 100644
--- a/packaging/RHEL-CTDB/setup/winbind.init
+++ b/packaging/RHEL-CTDB/setup/winbind.init
@@ -16,6 +16,8 @@ else
exit 0
fi
+DAEMON_COREFILE_LIMIT='unlimited'
+
# Avoid using root's TMPDIR
unset TMPDIR
diff --git a/packaging/RHEL/setup/smb.init b/packaging/RHEL/setup/smb.init
index af85b2c..96fb74a 100644
--- a/packaging/RHEL/setup/smb.init
+++ b/packaging/RHEL/setup/smb.init
@@ -18,6 +18,8 @@ else
exit 0
fi
+DAEMON_COREFILE_LIMIT='unlimited'
+
# Avoid using root's TMPDIR
unset TMPDIR
diff --git a/packaging/RHEL/setup/winbind.init b/packaging/RHEL/setup/winbind.init
index a99038f..2a9dd82 100644
--- a/packaging/RHEL/setup/winbind.init
+++ b/packaging/RHEL/setup/winbind.init
@@ -16,6 +16,8 @@ else
exit 0
fi
+DAEMON_COREFILE_LIMIT='unlimited'
+
# Avoid using root's TMPDIR
unset TMPDIR
diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
index 3d71a7d..992c0cd 100644
--- a/packaging/systemd/nmb.service
+++ b/packaging/systemd/nmb.service
@@ -9,6 +9,7 @@ PIDFile=/run/nmbd.pid
EnvironmentFile=-/etc/sysconfig/samba
ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
+LimitCORE=infinity
[Install]
WantedBy=multi-user.target
diff --git a/packaging/systemd/smb.service b/packaging/systemd/smb.service
index 9810891..6053a5c 100644
--- a/packaging/systemd/smb.service
+++ b/packaging/systemd/smb.service
@@ -10,6 +10,7 @@ LimitNOFILE=16384
EnvironmentFile=-/etc/sysconfig/samba
ExecStart=/usr/sbin/smbd $SMBDOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
+LimitCORE=infinity
[Install]
WantedBy=multi-user.target
diff --git a/packaging/systemd/winbind.service b/packaging/systemd/winbind.service
index f711a17..c511488 100644
--- a/packaging/systemd/winbind.service
+++ b/packaging/systemd/winbind.service
@@ -9,6 +9,7 @@ PIDFile=/run/winbindd.pid
EnvironmentFile=-/etc/sysconfig/samba
ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS"
ExecReload=/usr/bin/kill -HUP $MAINPID
+LimitCORE=infinity
[Install]
WantedBy=multi-user.target
diff --git a/python/samba/netcmd/fsmo.py b/python/samba/netcmd/fsmo.py
index 3904bcb..3d14939 100644
--- a/python/samba/netcmd/fsmo.py
+++ b/python/samba/netcmd/fsmo.py
@@ -31,17 +31,26 @@ from samba.netcmd import (
)
from samba.samdb import SamDB
-def get_fsmo_roleowner(samdb, roledn):
+def get_fsmo_roleowner(samdb, roledn, role):
"""Gets the owner of an FSMO role
:param roledn: The DN of the FSMO role
+ :param role: The FSMO role
"""
- res = samdb.search(roledn,
- scope=ldb.SCOPE_BASE, attrs=["fSMORoleOwner"])
- if len(res) == 0:
- raise CommandError('"%s" does not have a FSMO roleowner' % roledn)
- master_owner = res[0]["fSMORoleOwner"][0]
- return master_owner
+ try:
+ res = samdb.search(roledn,
+ scope=ldb.SCOPE_BASE, attrs=["fSMORoleOwner"])
+ except LdbError, (num, msg):
+ if num == ldb.ERR_NO_SUCH_OBJECT:
+ return "* The '%s' role is not present in this domain" % role
+ raise
+
+ if 'fSMORoleOwner' in res[0]:
+ master_owner = res[0]["fSMORoleOwner"][0]
+ return master_owner
+ else:
+ master_owner = "* The '%s' role does not have an FSMO roleowner" % role
+ return master_owner
def transfer_dns_role(outf, sambaopts, credopts, role, samdb):
@@ -54,23 +63,23 @@ def transfer_dns_role(outf, sambaopts, credopts, role, samdb):
forest_dn = samba.dn_from_dns_name(samdb.forest_dns_name())
role_object = "CN=Infrastructure,DC=ForestDnsZones," + forest_dn
- try:
- res = samdb.search(role_object,
- attrs=["fSMORoleOwner"],
- scope=ldb.SCOPE_BASE,
- controls=["extended_dn:1:1"])
+ res = samdb.search(role_object,
+ attrs=["fSMORoleOwner"],
+ scope=ldb.SCOPE_BASE,
+ controls=["extended_dn:1:1"])
- if 'fSMORoleOwner' in res[0]:
- try:
- master_guid = str(misc.GUID(ldb.Dn(samdb,
- res[0]['fSMORoleOwner'][0])
- .get_extended_component('GUID')))
- master_owner = str(ldb.Dn(samdb, res[0]['fSMORoleOwner'][0]))
- except LdbError, (num, msg):
- raise CommandError("GUID not found in partition naming master DN %s : %s \n" %
- (res[0]['fSMORoleOwner'][0], msg))
- except LdbError, (num, msg):
- raise CommandError("DNS partion %s not found : %s" % (role, msg))
+ if 'fSMORoleOwner' in res[0]:
+ try:
+ master_guid = str(misc.GUID(ldb.Dn(samdb,
+ res[0]['fSMORoleOwner'][0])
+ .get_extended_component('GUID')))
+ master_owner = str(ldb.Dn(samdb, res[0]['fSMORoleOwner'][0]))
+ except LdbError, (num, msg):
+ raise CommandError("No GUID found in naming master DN %s : %s \n" %
+ (res[0]['fSMORoleOwner'][0], msg))
+ else:
+ outf.write("* The '%s' role does not have an FSMO roleowner\n" % role)
+ return False
if role == "domaindns":
master_dns_name = '%s._msdcs.%s' % (master_guid,
@@ -150,12 +159,12 @@ def transfer_role(outf, role, samdb):
m = ldb.Message()
m.dn = ldb.Dn(samdb, "")
if role == "rid":
- master_owner = get_fsmo_roleowner(samdb, rid_dn)
+ master_owner = get_fsmo_roleowner(samdb, rid_dn, role)
m["becomeRidMaster"]= ldb.MessageElement(
"1", ldb.FLAG_MOD_REPLACE,
"becomeRidMaster")
elif role == "pdc":
- master_owner = get_fsmo_roleowner(samdb, domain_dn)
+ master_owner = get_fsmo_roleowner(samdb, domain_dn, role)
res = samdb.search(domain_dn,
scope=ldb.SCOPE_BASE, attrs=["objectSid"])
@@ -165,34 +174,38 @@ def transfer_role(outf, role, samdb):
sid, ldb.FLAG_MOD_REPLACE,
"becomePdc")
elif role == "naming":
- master_owner = get_fsmo_roleowner(samdb, naming_dn)
+ master_owner = get_fsmo_roleowner(samdb, naming_dn, role)
m["becomeDomainMaster"]= ldb.MessageElement(
"1", ldb.FLAG_MOD_REPLACE,
"becomeDomainMaster")
elif role == "infrastructure":
- master_owner = get_fsmo_roleowner(samdb, infrastructure_dn)
+ master_owner = get_fsmo_roleowner(samdb, infrastructure_dn, role)
m["becomeInfrastructureMaster"]= ldb.MessageElement(
"1", ldb.FLAG_MOD_REPLACE,
"becomeInfrastructureMaster")
elif role == "schema":
- master_owner = get_fsmo_roleowner(samdb, schema_dn)
+ master_owner = get_fsmo_roleowner(samdb, schema_dn, role)
m["becomeSchemaMaster"]= ldb.MessageElement(
"1", ldb.FLAG_MOD_REPLACE,
"becomeSchemaMaster")
else:
raise CommandError("Invalid FSMO role.")
- if master_owner != new_owner:
- try:
- samdb.modify(m)
- except LdbError, (num, msg):
- raise CommandError("Transfer of '%s' role failed: %s" %
- (role, msg))
+ if not '*' in master_owner:
+ if master_owner != new_owner:
+ try:
+ samdb.modify(m)
+ except LdbError, (num, msg):
+ raise CommandError("Transfer of '%s' role failed: %s" %
+ (role, msg))
- outf.write("FSMO transfer of '%s' role successful\n" % role)
- return True
+ outf.write("FSMO transfer of '%s' role successful\n" % role)
+ return True
+ else:
+ outf.write("This DC already has the '%s' FSMO role\n" % role)
+ return False
else:
- outf.write("This DC already has the '%s' FSMO role\n" % role)
+ outf.write("%s\n" % master_owner)
return False
class cmd_fsmo_seize(Command):
@@ -210,7 +223,7 @@ class cmd_fsmo_seize(Command):
Option("-H", "--URL", help="LDB URL for database or target server",
type=str, metavar="URL", dest="H"),
Option("--force",
- help="Force seizing of the role without attempting to transfer first.",
+ help="Force seizing of role without attempting to transfer.",
action="store_true"),
Option("--role", type="choice", choices=["rid", "pdc", "infrastructure",
"schema", "naming", "domaindns", "forestdns", "all"],
@@ -253,32 +266,41 @@ You must provide an Admin user and password."""),
raise CommandError("Invalid FSMO role.")
#first try to transfer to avoid problem if the owner is still active
seize = False
- master_owner = get_fsmo_roleowner(samdb, m.dn)
- if master_owner != serviceName:
- if force is None:
- self.message("Attempting transfer...")
- if not transfer_role(self.outf, role, samdb):
- #transfer failed, use the big axe...
- seize = True
- self.message("Transfer unsuccessful, seizing...")
- else:
- self.message("Not seizing role as transfer was successful")
-
- if force is not None or seize == True:
- self.message("Seizing %s FSMO role..." % role)
- m["fSMORoleOwner"]= ldb.MessageElement(
- serviceName, ldb.FLAG_MOD_REPLACE,
- "fSMORoleOwner")
- try:
- samdb.modify(m)
- except LdbError, (num, msg):
- raise CommandError("Failed to seize '%s' role: %s" %
- (role, msg))
- self.outf.write("FSMO seize of '%s' role successful\n" % role)
- return True
+ master_owner = get_fsmo_roleowner(samdb, m.dn, role)
+ if not '*' in master_owner:
+ # if there is a different owner
+ if master_owner != serviceName:
+ # if --force isn't given, attempt transfer
+ if force is None:
+ self.message("Attempting transfer...")
+ try:
+ transfer_role(self.outf, role, samdb)
+ except:
+ #transfer failed, use the big axe...
+ seize = True
+ self.message("Transfer unsuccessful, seizing...")
+ else:
+ self.message("Transfer successful, not seizing role")
+ return True
+ else:
+ self.outf.write("This DC already has the '%s' FSMO role\n" %
+ role)
+ return False
else:
- self.outf.write("This DC already has the '%s' FSMO role\n" % role)
- return False
+ seize = True
+
+ if force is not None or seize == True:
+ self.message("Seizing %s FSMO role..." % role)
+ m["fSMORoleOwner"]= ldb.MessageElement(
+ serviceName, ldb.FLAG_MOD_REPLACE,
+ "fSMORoleOwner")
+ try:
+ samdb.modify(m)
+ except LdbError, (num, msg):
+ raise CommandError("Failed to seize '%s' role: %s" %
+ (role, msg))
+ self.outf.write("FSMO seize of '%s' role successful\n" % role)
+ return True
def seize_dns_role(self, role, samdb, credopts, sambaopts,
versionopts, force):
@@ -299,33 +321,43 @@ You must provide an Admin user and password."""),
raise CommandError("Invalid FSMO role.")
#first try to transfer to avoid problem if the owner is still active
seize = False
- master_owner = get_fsmo_roleowner(samdb, m.dn)
- if master_owner != serviceName:
- if force is None:
- self.message("Attempting transfer...")
- if not transfer_dns_role(self.outf, sambaopts, credopts, role,
- samdb):
- #transfer failed, use the big axe...
- seize = True
- self.message("Transfer unsuccessful, seizing...")
- else:
- self.message("Not seizing role as transfer was successful\n")
-
- if force is not None or seize == True:
- self.message("Seizing %s FSMO role..." % role)
- m["fSMORoleOwner"]= ldb.MessageElement(
- serviceName, ldb.FLAG_MOD_REPLACE,
- "fSMORoleOwner")
- try:
- samdb.modify(m)
- except LdbError, (num, msg):
- raise CommandError("Failed to seize '%s' role: %s" %
- (role, msg))
- self.outf.write("FSMO seize of '%s' role successful\n" % role)
- return True
+ master_owner = get_fsmo_roleowner(samdb, m.dn, role)
+ if not '*' in master_owner:
+ # if there is a different owner
+ if master_owner != serviceName:
+ # if --force isn't given, attempt transfer
+ if force is None:
+ self.message("Attempting transfer...")
+ try:
+ transfer_dns_role(self.outf, sambaopts, credopts, role,
+ samdb)
+ except:
+ #transfer failed, use the big axe...
+ seize = True
+ self.message("Transfer unsuccessful, seizing...")
+ else:
+ self.message("Transfer successful, not seizing role\n")
+ return True
+ else:
+ self.outf.write("This DC already has the '%s' FSMO role\n" %
+ role)
+ return False
else:
- self.outf.write("This DC already has the '%s' FSMO role\n" % role)
- return False
+ seize = True
+
+ if force is not None or seize == True:
+ self.message("Seizing %s FSMO role..." % role)
+ m["fSMORoleOwner"]= ldb.MessageElement(
+ serviceName, ldb.FLAG_MOD_REPLACE,
+ "fSMORoleOwner")
+ try:
+ samdb.modify(m)
+ except LdbError, (num, msg):
+ raise CommandError("Failed to seize '%s' role: %s" %
+ (role, msg))
+ self.outf.write("FSMO seize of '%s' role successful\n" % role)
+ return True
+
def run(self, force=None, H=None, role=None,
credopts=None, sambaopts=None, versionopts=None):
@@ -388,13 +420,16 @@ class cmd_fsmo_show(Command):
domaindns_dn = "CN=Infrastructure,DC=DomainDnsZones," + domain_dn
forestdns_dn = "CN=Infrastructure,DC=ForestDnsZones," + forest_dn
- infrastructureMaster = get_fsmo_roleowner(samdb, infrastructure_dn)
- pdcEmulator = get_fsmo_roleowner(samdb, domain_dn)
- namingMaster = get_fsmo_roleowner(samdb, naming_dn)
- schemaMaster = get_fsmo_roleowner(samdb, schema_dn)
- ridMaster = get_fsmo_roleowner(samdb, rid_dn)
- domaindnszonesMaster = get_fsmo_roleowner(samdb, domaindns_dn)
- forestdnszonesMaster = get_fsmo_roleowner(samdb, forestdns_dn)
+ infrastructureMaster = get_fsmo_roleowner(samdb, infrastructure_dn,
+ "infrastructure")
+ pdcEmulator = get_fsmo_roleowner(samdb, domain_dn, "pdc")
+ namingMaster = get_fsmo_roleowner(samdb, naming_dn, "naming")
+ schemaMaster = get_fsmo_roleowner(samdb, schema_dn, "schema")
+ ridMaster = get_fsmo_roleowner(samdb, rid_dn, "rid")
+ domaindnszonesMaster = get_fsmo_roleowner(samdb, domaindns_dn,
+ "domaindns")
+ forestdnszonesMaster = get_fsmo_roleowner(samdb, forestdns_dn,
+ "forestdns")
self.message("SchemaMasterRole owner: " + schemaMaster)
self.message("InfrastructureMasterRole owner: " + infrastructureMaster)
@@ -449,8 +484,10 @@ You must provide an Admin user and password."""),
transfer_role(self.outf, "naming", samdb)
transfer_role(self.outf, "infrastructure", samdb)
transfer_role(self.outf, "schema", samdb)
- transfer_dns_role(self.outf, sambaopts, credopts, "domaindns", samdb)
- transfer_dns_role(self.outf, sambaopts, credopts, "forestdns", samdb)
+ transfer_dns_role(self.outf, sambaopts, credopts,
+ "domaindns", samdb)
+ transfer_dns_role(self.outf, sambaopts, credopts, "forestdns",
+ samdb)
else:
if role == "domaindns" or role == "forestdns":
transfer_dns_role(self.outf, sambaopts, credopts, role, samdb)
diff --git a/python/samba/tests/samba_tool/fsmo.py b/python/samba/tests/samba_tool/fsmo.py
new file mode 100644
index 0000000..7058277
--- /dev/null
+++ b/python/samba/tests/samba_tool/fsmo.py
@@ -0,0 +1,29 @@
+# Unix SMB/CIFS implementation.
+# Copyright (C) Rowland Penny <rpenny@samba.org> 2016
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+import os
+from samba.tests.samba_tool.base import SambaToolCmdTest
+
+class FsmoCmdTestCase(SambaToolCmdTest):
+ """Test for samba-tool fsmo show subcommand"""
+
+ def test_fsmoget(self):
+ """Run fsmo show to see if it errors"""
+ (result, out, err) = self.runsubcmd("fsmo", "show")
+
+ self.assertCmdSuccess(result)
+ self.assertEquals(err,"","Shouldn't be any error messages")
diff --git a/selftest/knownfail b/selftest/knownfail
index 1678cd0..997d29c 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -211,6 +211,7 @@
^samba3.smb2.setinfo.setinfo
^samba3.smb2.session.*reauth5 # some special anonymous checks?
^samba3.smb2.compound.interim2 # wrong return code (STATUS_CANCELLED)
+^samba3.smb2.replay.channel-sequence
^samba3.smb2.replay.replay3
^samba3.smb2.replay.replay4
^samba3.smb2.lock.*replay
diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c
index c7319ad..375905a 100644
--- a/source3/auth/token_util.c
+++ b/source3/auth/token_util.c
@@ -672,6 +672,7 @@ static NTSTATUS create_token_from_sid(TALLOC_CTX *mem_ctx,
TALLOC_CTX *tmp_ctx = talloc_stackframe();
gid_t *gids;
struct dom_sid *group_sids;
+ struct dom_sid tmp_sid;
uint32_t num_group_sids;
uint32_t num_gids;
uint32_t i;
@@ -753,7 +754,6 @@ static NTSTATUS create_token_from_sid(TALLOC_CTX *mem_ctx,
*uid = sam_acct->unix_pw->pw_uid;
} else if (sid_check_is_in_unix_users(user_sid)) {
- struct dom_sid tmp_sid;
uint32_t getgroups_num_group_sids;
/* This is a unix user not in passdb. We need to ask nss
* directly, without consulting passdb */
diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c
index e381822..9dbb233 100644
--- a/source3/client/smbspool.c
+++ b/source3/client/smbspool.c
@@ -250,7 +250,7 @@ main(int argc, /* I - Number of command-line arguments */
* Setup the SAMBA server state...
*/
- setup_logging("smbspool", DEBUG_STDOUT);
+ setup_logging("smbspool", DEBUG_STDERR);
smb_init_locale();
diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c
index e19fd92..d26a7a6 100644
--- a/source3/client/smbspool_krb5_wrapper.c
+++ b/source3/client/smbspool_krb5_wrapper.c
@@ -24,12 +24,15 @@
#include "system/passwd.h"
#include <errno.h>
+#include <stdlib.h>
#include <string.h>
#include <cups/backend.h>
#include "dynconfig/dynconfig.h"
+#undef calloc
+
enum cups_smb_dbglvl_e {
CUPS_SMB_LOG_DEBUG = 0,
CUPS_SMB_LOG_ERROR,
@@ -195,7 +198,14 @@ int main(int argc, char *argv[])
* Make sure we do not have LD_PRELOAD or other security relevant
* environment variables set.
*/
+#ifdef HAVE_CLEARENV
clearenv();
+#else
+ {
+ extern char **environ;
+ environ = calloc(1, sizeof(*environ));
+ }
+#endif
CUPS_SMB_DEBUG("Setting KRB5CCNAME to '%s'", gen_cc);
setenv("KRB5CCNAME", gen_cc, 1);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index c18ea59..fb3b8aa 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -237,6 +237,8 @@ typedef struct files_struct {
uint32_t access_mask; /* NTCreateX access bits (FILE_READ_DATA etc.) */
uint32_t share_access; /* NTCreateX share constants (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE). */
+ bool kernel_share_modes_taken;
+
bool update_write_time_triggered;
struct tevent_timer *update_write_time_event;
bool update_write_time_on_close;
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 93df7ef..d5b8f45 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1298,6 +1298,16 @@ static NTSTATUS db_ctdb_parse_record(struct db_context *db, TDB_DATA key,
ret = ctdbd_parse(messaging_ctdbd_connection(), ctx->db_id, key,
state.ask_for_readonly_copy, parser, private_data);
if (ret != 0) {
+ if (ret == ENOENT) {
+ /*
+ * This maps to
+ * NT_STATUS_OBJECT_NAME_NOT_FOUND. Our upper
+ * layers expect NT_STATUS_NOT_FOUND for "no
+ * record around". We need to convert dbwrap
+ * to 0/errno away from NTSTATUS ... :-)
+ */
+ return NT_STATUS_NOT_FOUND;
+ }
return map_nt_error_from_unix(ret);
}
return NT_STATUS_OK;
diff --git a/source3/lib/dumpcore.c b/source3/lib/dumpcore.c
index 487ccec..c72aa88 100644
--- a/source3/lib/dumpcore.c
+++ b/source3/lib/dumpcore.c
@@ -251,21 +251,6 @@ void dump_core_setup(const char *progname, const char *log_file)
goto out;
}
-
-#ifdef HAVE_GETRLIMIT
-#ifdef RLIMIT_CORE
- {
- struct rlimit rlp;
- getrlimit(RLIMIT_CORE, &rlp);
- rlp.rlim_cur = MAX(16*1024*1024,rlp.rlim_cur);
- setrlimit(RLIMIT_CORE, &rlp);
- getrlimit(RLIMIT_CORE, &rlp);
- DEBUG(3,("Maximum core file size limits now %d(soft) %d(hard)\n",
- (int)rlp.rlim_cur,(int)rlp.rlim_max));
- }
-#endif
-#endif
-
/* FIXME: if we have a core-plus-pid facility, configurably set
* this up here.
*/
diff --git a/source3/lib/sysquotas_4B.c b/source3/lib/sysquotas_4B.c
index e3adc35..ee56432 100644
--- a/source3/lib/sysquotas_4B.c
+++ b/source3/lib/sysquotas_4B.c
@@ -81,6 +81,12 @@ static void xlate_qblk_to_smb(const struct dqblk * const qblk,
dp->hardlimit = XLATE_TO_BLOCKS(qblk->dqb_bhardlimit);
dp->curblocks = XLATE_TO_BLOCKS(qblk->dqb_curbytes);
#undef XLATE_TO_BLOCKS
+#else
+ dp->bsize = DEV_BSIZE;
+
+ dp->softlimit = qblk->dqb_bsoftlimit;
+ dp->hardlimit = qblk->dqb_bhardlimit;
+ dp->curblocks = qblk->dqb_curblocks;
#endif
dp->ihardlimit = qblk->dqb_ihardlimit;
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 9a7a1e7..4774a9f 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -47,33 +47,44 @@ kerb_prompter(krb5_context ctx, void *data,
krb5_prompt prompts[])
{
if (num_prompts == 0) return 0;
-#if HAVE_KRB5_PROMPT_TYPE
-
- /*
- * only heimdal has a prompt type and we need to deal with it here to
- * avoid loops.
- *
- * removing the prompter completely is not an option as at least these
- * versions would crash: heimdal-1.0.2 and heimdal-1.1. Later heimdal
- * version have looping detection and return with a proper error code.
- */
-
- if ((num_prompts == 2) &&
- (prompts[0].type == KRB5_PROMPT_TYPE_NEW_PASSWORD) &&
- (prompts[1].type == KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN)) {
+ if (num_prompts == 2) {
/*
- * We don't want to change passwords here. We're
- * called from heimal when the KDC returns
- * KRB5KDC_ERR_KEY_EXPIRED, but at this point we don't
- * have the chance to ask the user for a new
- * password. If we return 0 (i.e. success), we will be
- * spinning in the endless for-loop in
- * change_password() in
- * source4/heimdal/lib/krb5/init_creds_pw.c:526ff
+ * only heimdal has a prompt type and we need to deal with it here to
+ * avoid loops.
+ *
+ * removing the prompter completely is not an option as at least these
+ * versions would crash: heimdal-1.0.2 and heimdal-1.1. Later heimdal
+ * version have looping detection and return with a proper error code.
*/
- return KRB5KDC_ERR_KEY_EXPIRED;
+
+#if HAVE_KRB5_PROMPT_TYPE /* Heimdal */
+ if (prompts[0].type == KRB5_PROMPT_TYPE_NEW_PASSWORD &&
+ prompts[1].type == KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN) {
+ /*
+ * We don't want to change passwords here. We're
+ * called from heimal when the KDC returns
+ * KRB5KDC_ERR_KEY_EXPIRED, but at this point we don't
+ * have the chance to ask the user for a new
+ * password. If we return 0 (i.e. success), we will be
+ * spinning in the endless for-loop in
+ * change_password() in
+ * source4/heimdal/lib/krb5/init_creds_pw.c:526ff
+ */
+ return KRB5KDC_ERR_KEY_EXPIRED;
+ }
+#elif defined(HAVE_KRB5_GET_PROMPT_TYPES) /* MIT */
+ krb5_prompt_type *prompt_types = NULL;
+
+ prompt_types = krb5_get_prompt_types(ctx);
+ if (prompt_types != NULL) {
+ if (prompt_types[0] == KRB5_PROMPT_TYPE_NEW_PASSWORD &&
+ prompt_types[1] == KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN) {
+ return KRB5KDC_ERR_KEY_EXP;
+ }
+ }
+#endif
}
-#endif /* HAVE_KRB5_PROMPT_TYPE */
+
memset(prompts[0].reply->data, '\0', prompts[0].reply->length);
if (prompts[0].reply->length > 0) {
if (data) {
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index ef6c995..a28864d 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -463,6 +463,7 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
size_t num_spns = 0;
char *spn = NULL;
bool ok;
+ const char **netbios_aliases = NULL;
/* Find our DN */
@@ -524,6 +525,65 @@ static ADS_STATUS libnet_join_set_machine_spn(TALLOC_CTX *mem_ctx,
}
}
+ netbios_aliases = lp_netbios_aliases();
+ if (netbios_aliases != NULL) {
+ for (; *netbios_aliases != NULL; netbios_aliases++) {
+ /*
+ * Add HOST/NETBIOSNAME
+ */
+ spn = talloc_asprintf(mem_ctx, "HOST/%s", *netbios_aliases);
+ if (spn == NULL) {
+ TALLOC_FREE(spn);
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
+ if (!strupper_m(spn)) {
+ TALLOC_FREE(spn);
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
+
+ ok = ads_element_in_array(spn_array, num_spns, spn);
+ if (ok) {
+ TALLOC_FREE(spn);
+ continue;
+ }
+ ok = add_string_to_array(spn_array, spn,
+ &spn_array, &num_spns);
+ if (!ok) {
+ TALLOC_FREE(spn);
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
+ TALLOC_FREE(spn);
+
+ /*
+ * Add HOST/netbiosname.domainname
+ */
+ if (r->out.dns_domain_name == NULL) {
+ continue;
+ }
+ fstr_sprintf(my_fqdn, "%s.%s",
+ *netbios_aliases,
+ r->out.dns_domain_name);
+
+ spn = talloc_asprintf(mem_ctx, "HOST/%s", my_fqdn);
+ if (spn == NULL) {
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
+
+ ok = ads_element_in_array(spn_array, num_spns, spn);
+ if (ok) {
+ TALLOC_FREE(spn);
+ continue;
+ }
+ ok = add_string_to_array(spn_array, spn,
+ &spn_array, &num_spns);
+ if (!ok) {
+ TALLOC_FREE(spn);
+ return ADS_ERROR_LDAP(LDAP_NO_MEMORY);
+ }
+ TALLOC_FREE(spn);
+ }
+ }
+
/* make sure to NULL terminate the array */
spn_array = talloc_realloc(mem_ctx, spn_array, const char *, num_spns + 1);
if (spn_array == NULL) {
diff --git a/source3/librpc/idl/smbXsrv.idl b/source3/librpc/idl/smbXsrv.idl
index 4c6895a..1bfa51e 100644
--- a/source3/librpc/idl/smbXsrv.idl
+++ b/source3/librpc/idl/smbXsrv.idl
@@ -430,6 +430,7 @@ interface smbXsrv
uint32 durable_timeout_msec;
boolean8 durable;
DATA_BLOB backend_cookie;
+ hyper channel_sequence;
} smbXsrv_open_global0;
typedef union {
@@ -470,6 +471,8 @@ interface smbXsrv
[ignore] files_struct *compat;
smbXsrv_open_flags flags;
uint32 create_action;
+ hyper request_count;
+ hyper pre_request_count;
} smbXsrv_open;
typedef union {
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index c9f4060..a17d918 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -262,6 +262,7 @@ NTSTATUS cli_smb2_create_fnum_recv(struct tevent_req *req, uint16_t *pfnum,
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
+ state->cli->raw_status = status;
return status;
}
if (pfnum != NULL) {
@@ -270,6 +271,7 @@ NTSTATUS cli_smb2_create_fnum_recv(struct tevent_req *req, uint16_t *pfnum,
if (cr != NULL) {
*cr = state->cr;
}
+ state->cli->raw_status = NT_STATUS_OK;
return NT_STATUS_OK;
}
@@ -390,7 +392,11 @@ static void cli_smb2_close_fnum_done(struct tevent_req *subreq)
NTSTATUS cli_smb2_close_fnum_recv(struct tevent_req *req)
{
- return tevent_req_simple_recv_ntstatus(req);
+ struct cli_smb2_close_fnum_state *state = tevent_req_data(
+ req, struct cli_smb2_close_fnum_state);
+ NTSTATUS status = tevent_req_simple_recv_ntstatus(req);
+ state->cli->raw_status = status;
+ return status;
}
NTSTATUS cli_smb2_close_fnum(struct cli_state *cli, uint16_t fnum)
@@ -2302,6 +2308,7 @@ NTSTATUS cli_smb2_read_recv(struct tevent_req *req,
req, struct cli_smb2_read_state);
if (tevent_req_is_nterror(req, &status)) {
+ state->cli->raw_status = status;
return status;
}
/*
@@ -2311,6 +2318,7 @@ NTSTATUS cli_smb2_read_recv(struct tevent_req *req,
*/
*received = (ssize_t)state->received;
*rcvbuf = state->buf;
+ state->cli->raw_status = NT_STATUS_OK;
return NT_STATUS_OK;
}
@@ -2409,6 +2417,7 @@ NTSTATUS cli_smb2_write_recv(struct tevent_req *req,
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
+ state->cli->raw_status = status;
tevent_req_received(req);
return status;
}
@@ -2416,6 +2425,7 @@ NTSTATUS cli_smb2_write_recv(struct tevent_req *req,
if (pwritten != NULL) {
*pwritten = (size_t)state->written;
}
+ state->cli->raw_status = NT_STATUS_OK;
tevent_req_received(req);
return NT_STATUS_OK;
}
@@ -2573,11 +2583,13 @@ NTSTATUS cli_smb2_writeall_recv(struct tevent_req *req,
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
+ state->cli->raw_status = status;
return status;
}
if (pwritten != NULL) {
*pwritten = (size_t)state->written;
}
+ state->cli->raw_status = NT_STATUS_OK;
return NT_STATUS_OK;
}
@@ -2838,12 +2850,14 @@ NTSTATUS cli_smb2_splice_recv(struct tevent_req *req, off_t *written)
NTSTATUS status;
if (tevent_req_is_nterror(req, &status)) {
+ state->cli->raw_status = status;
tevent_req_received(req);
return status;
}
if (written != NULL) {
*written = state->written;
}
+ state->cli->raw_status = NT_STATUS_OK;
tevent_req_received(req);
return NT_STATUS_OK;
}
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 0e790cd..684f263 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4593,7 +4593,7 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, uint16_t setup_val,
status = cli_trans(talloc_tos(), cli, SMBtrans2, NULL, -1, 0, 0,
setup, 1, 0,
param, param_len, 2,
- data, data_len, CLI_BUFFER_SIZE,
+ data, data_len, 0,
NULL,
NULL, 0, NULL, /* rsetup */
NULL, 0, NULL, /* rparam */
diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c
index fe105e3..4e9de03 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -441,6 +441,11 @@ static int share_mode_data_destructor(struct share_mode_data *d)
TALLOC_FREE(d->record);
/*
+ * Release the dptr as well before reparenting to NULL
+ * (in-memory cache) context.
+ */
+ TALLOC_FREE(data.dptr);
+ /*
* Reparent d into the in-memory cache so it can be reused if the
* sequence number matches. See parse_share_modes()
* for details.
diff --git a/source3/modules/vfs_fake_dfq.c b/source3/modules/vfs_fake_dfq.c
index e476e16..bf49860 100644
--- a/source3/modules/vfs_fake_dfq.c
+++ b/source3/modules/vfs_fake_dfq.c
@@ -110,6 +110,12 @@ static int dfq_get_quota(struct vfs_handle_struct *handle, const char *path,
section = talloc_asprintf(talloc_tos(), "g%llu",
(unsigned long long)id.gid);
break;
+ case SMB_USER_FS_QUOTA_TYPE:
+ section = talloc_strdup(talloc_tos(), "udflt");
+ break;
+ case SMB_GROUP_FS_QUOTA_TYPE:
+ section = talloc_strdup(talloc_tos(), "gdflt");
+ break;
default:
break;
}
@@ -118,7 +124,7 @@ static int dfq_get_quota(struct vfs_handle_struct *handle, const char *path,
goto dflt;
}
- bsize = dfq_load_param(snum, rpath, section, "block size", 0);
+ bsize = dfq_load_param(snum, rpath, section, "block size", 4096);
if (bsize == 0) {
goto dflt;
}
@@ -129,6 +135,12 @@ static int dfq_get_quota(struct vfs_handle_struct *handle, const char *path,
goto out;
}
+ if (dfq_load_param(snum, rpath, section, "nosys", 0) != 0) {
+ errno = ENOSYS;
+ rc = -1;
+ goto out;
+ }
+
ZERO_STRUCTP(qt);
qt->bsize = bsize;
@@ -140,6 +152,7 @@ static int dfq_get_quota(struct vfs_handle_struct *handle, const char *path,
qt->isoftlimit =
dfq_load_param(snum, rpath, section, "inode soft limit", 0);
qt->curinodes = dfq_load_param(snum, rpath, section, "cur inodes", 0);
+ qt->qflags = dfq_load_param(snum, rpath, section, "qflags", QUOTAS_DENY_DISK);
if (dfq_load_param(snum, rpath, section, "edquot", 0) != 0) {
errno = EDQUOT;
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index cb0d284..89e9412 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -132,6 +132,7 @@ struct fruit_config_data {
bool unix_info_enabled;
bool copyfile_enabled;
bool veto_appledouble;
+ bool posix_rename;
/*
* Additional options, all enabled by default,
@@ -1355,6 +1356,9 @@ static int init_fruit_config(vfs_handle_struct *handle)
config->use_copyfile = lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME,
"copyfile", false);
+ config->posix_rename = lp_parm_bool(
+ SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME, "posix_rename", true);
+
config->readdir_attr_rsize = lp_parm_bool(
SNUM(handle->conn), "readdir_attr", "aapl_rsize", true);
@@ -3427,7 +3431,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
fsp->aapl_copyfile_supported = true;
}
- if (fsp->is_directory) {
+ if (config->posix_rename && fsp->is_directory) {
/*
* Enable POSIX directory rename behaviour
*/
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index c65fb08..50ab3a7 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -1005,7 +1005,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
entry,
"gecos",
ctx);
- if (unix_pw.pw_gecos) {
+ if (unix_pw.pw_gecos == NULL) {
unix_pw.pw_gecos = fullname;
}
unix_pw.pw_dir = smbldap_talloc_single_attribute(
@@ -1013,7 +1013,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
entry,
"homeDirectory",
ctx);
- if (unix_pw.pw_dir) {
+ if (unix_pw.pw_dir == NULL) {
unix_pw.pw_dir = discard_const_p(char, "");
}
unix_pw.pw_shell = smbldap_talloc_single_attribute(
@@ -1021,7 +1021,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
entry,
"loginShell",
ctx);
- if (unix_pw.pw_shell) {
+ if (unix_pw.pw_shell == NULL) {
unix_pw.pw_shell = discard_const_p(char, "");
}
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index c32fbc7..74ae708 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -904,6 +904,7 @@ out_free:
const char *binding_string = NULL;
char *user, *domain, *q;
const char *host;
+ int signing_state = SMB_SIGNING_IPC_DEFAULT;
/* make sure the vars that get altered (4th field) are in
a fixed location or certain compilers complain */
@@ -1077,6 +1078,16 @@ out_free:
}
}
+ signing_state = get_cmdline_auth_info_signing_state(rpcclient_auth_info);
+ switch (signing_state) {
+ case SMB_SIGNING_OFF:
+ lp_set_cmdline("client ipc signing", "no");
+ break;
+ case SMB_SIGNING_REQUIRED:
+ lp_set_cmdline("client ipc signing", "required");
+ break;
+ }
+
if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {
flags |= CLI_FULL_CONNECTION_USE_KERBEROS |
CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;
@@ -1084,6 +1095,9 @@ out_free:
if (get_cmdline_auth_info_use_ccache(rpcclient_auth_info)) {
flags |= CLI_FULL_CONNECTION_USE_CCACHE;
}
+ if (get_cmdline_auth_info_use_pw_nt_hash(rpcclient_auth_info)) {
+ flags |= CLI_FULL_CONNECTION_USE_NT_HASH;
+ }
user = talloc_strdup(frame, get_cmdline_auth_info_username(rpcclient_auth_info));
SMB_ASSERT(user != NULL);
@@ -1104,7 +1118,7 @@ out_free:
get_cmdline_auth_info_domain(rpcclient_auth_info),
get_cmdline_auth_info_password(rpcclient_auth_info),
flags,
- get_cmdline_auth_info_signing_state(rpcclient_auth_info));
+ SMB_SIGNING_IPC_DEFAULT);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(0,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status)));
diff --git a/source3/script/tests/test_dfree_quota.sh b/source3/script/tests/test_dfree_quota.sh
index 5392d3d..26199cc 100755
--- a/source3/script/tests/test_dfree_quota.sh
+++ b/source3/script/tests/test_dfree_quota.sh
@@ -64,6 +64,12 @@ trygrp1:g$gid:block size = 4096:hard limit = 60:soft limit = 60:cur blocks = 55
trygrp2:df:block size = 4096:disk free = 10:disk size = 80
trygrp2:u$uid:block size = 4096:hard limit = 0:soft limit = 0:cur blocks = 41
trygrp2:g$gid:block size = 4096:hard limit = 60:soft limit = 60:cur blocks = 56
+notenforce:df:block size = 4096:disk free = 10:disk size = 80
+notenforce:u$uid:block size = 4096:hard limit = 40:soft limit = 40:cur blocks = 37
+notenforce:udflt:block size = 4096:qflags = 0
+nfs:df:block size = 4096:disk free = 10:disk size = 80
+nfs:u$uid:block size = 4096:hard limit = 40:soft limit = 40:cur blocks = 37
+nfs:udflt:nosys = 1
ABC
}
@@ -170,5 +176,11 @@ test_smbclient_dfree "Test quota->dfree inode hard limit" "subdir1" "ihlimit sub
test_smbclient_dfree "Test quota->dfree err try group" "subdir1" "trygrp1 subdir1" "240 1024. 20" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
test_smbclient_dfree "Test quota->dfree no-quota try group" "subdir1" "trygrp2 subdir1" "240 1024. 16" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
+#quota configured but not enforced
+test_smbclient_dfree "Test dfree share root quota not enforced" "." "notenforce ." "320 1024. 40" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
+
+#FS quota not implemented (NFS case)
+test_smbclient_dfree "Test dfree share root FS quota not implemented" "." "nfs ." "160 1024. 12" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
+
setup_conf
exit $failed
diff --git a/source3/script/tests/test_rpcclient_pw_nt_hash.sh b/source3/script/tests/test_rpcclient_pw_nt_hash.sh
new file mode 100755
index 0000000..c03d22f
--- /dev/null
+++ b/source3/script/tests/test_rpcclient_pw_nt_hash.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Blackbox tests for the rpcclient --pw-nt-hash option
+#
+
+if [ $# -lt 4 ]; then
+cat <<EOF
+Usage: test_rpcclient_pw_nt_hash.sh USERNAME PASSWORD SERVER RPCCLIENT
+EOF
+exit 1;
+fi
+
+USERNAME="$1"
+PASSWORD="$2"
+SERVER="$3"
+RPCCLIENT="$4"
+
+HASH=`echo -n $PASSWORD | iconv -t utf16le | openssl md4 |cut -d ' ' -f2`
+
+RPCCLIENTCMD="$RPCCLIENT $SERVER --pw-nt-hash -U$USERNAME%$HASH -c queryuser"
+
+incdir=$(dirname $0)/../../../testprogs/blackbox
+. $incdir/subunit.sh
+
+testit "rpcclient --pw-nt-hash" $RPCCLIENTCMD || failed=`expr $failed + 1`
+
+testok $0 $failed
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index ce26212..753cff6 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -461,6 +461,11 @@ plantestsuite("samba3.blackbox.rpcclient_srvsvc", "simpleserver",
"$USERNAME", "$PASSWORD", "$SERVER",
os.path.join(bindir(), "rpcclient"), "tmp"])
+plantestsuite("samba3.blackbox.rpcclient.pw-nt-hash", "simpleserver",
+ [os.path.join(samba3srcdir, "script/tests/test_rpcclient_pw_nt_hash.sh"),
+ "$USERNAME", "$PASSWORD", "$SERVER",
+ os.path.join(bindir(), "rpcclient")])
+
options_list = ["", "-e"]
for options in options_list:
plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local",
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 1cb5460..3ab04b7 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -246,7 +246,6 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
const struct security_token *del_nt_token = NULL;
bool got_tokens = false;
bool normal_close;
- int ret_flock;
/* Ensure any pending write time updates are done. */
if (fsp->update_write_time_event) {
@@ -470,12 +469,16 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
pop_sec_ctx();
}
- /* remove filesystem sharemodes */
- ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0);
- if (ret_flock == -1) {
- DEBUG(2, ("close_remove_share_mode: removing kernel flock for "
- "%s failed: %s\n", fsp_str_dbg(fsp),
- strerror(errno)));
+ if (fsp->kernel_share_modes_taken) {
+ int ret_flock;
+
+ /* remove filesystem sharemodes */
+ ret_flock = SMB_VFS_KERNEL_FLOCK(fsp, 0, 0);
+ if (ret_flock == -1) {
+ DEBUG(2, ("close_remove_share_mode: removing kernel "
+ "flock for %s failed: %s\n",
+ fsp_str_dbg(fsp), strerror(errno)));
+ }
}
if (!del_share_mode(lck, fsp)) {
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index f2c9184..e89575d 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -940,34 +940,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
TALLOC_FREE(found_name);
} /* end else */
-#ifdef DEVELOPER
- /*
- * This sucks!
- * We should never provide different behaviors
- * depending on DEVELOPER!!!
- */
- if (VALID_STAT(smb_fname->st)) {
- bool delete_pending;
- uint32_t name_hash;
-
- status = file_name_hash(conn,
- smb_fname_str_dbg(smb_fname),
- &name_hash);
- if (!NT_STATUS_IS_OK(status)) {
- goto fail;
- }
-
- get_file_infos(vfs_file_id_from_sbuf(conn,
- &smb_fname->st),
- name_hash,
- &delete_pending, NULL);
- if (delete_pending) {
- status = NT_STATUS_DELETE_PENDING;
- goto fail;
- }
- }
-#endif
-
/*
* Add to the dirpath that we have resolved so far.
*/
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index 15f29a8..9e3e95c 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -727,6 +727,13 @@ struct smbd_smb2_request {
struct files_struct *compat_chain_fsp;
/*
+ * Keep track of whether the outstanding request counters
+ * had been updated in dispatch, so that they need to be
+ * adapted again in reply.
+ */
+ bool request_counters_updated;
+
+ /*
* The sub request for async backend calls.
* This is used for SMB2 Cancel.
*/
diff --git a/source3/smbd/notifyd/notifyd.c b/source3/smbd/notifyd/notifyd.c
index 49fb9c9..45b029b 100644
--- a/source3/smbd/notifyd/notifyd.c
+++ b/source3/smbd/notifyd/notifyd.c
@@ -1246,7 +1246,10 @@ static int notifyd_peer_destructor(struct notifyd_peer *p)
struct notifyd_state *state = p->state;
size_t i;
- dbwrap_traverse_read(p->db, notifyd_db_del_syswatches, NULL, NULL);
+ if (p->db != NULL) {
+ dbwrap_traverse_read(p->db, notifyd_db_del_syswatches,
+ NULL, NULL);
+ }
for (i = 0; i<state->num_peers; i++) {
if (p == state->peers[i]) {
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 0d90c99..61b7145 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3084,6 +3084,8 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
return NT_STATUS_SHARING_VIOLATION;
}
+
+ fsp->kernel_share_modes_taken = true;
}
/*
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 4f108d9..4ce3a1d 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -190,6 +190,7 @@ bool update_num_read_oplocks(files_struct *fsp, struct share_mode_lock *lck)
/*
* If we're the only one, we don't need a brlock entry
*/
+ remove_stale_share_mode_entries(d);
SMB_ASSERT(d->num_share_modes == 1);
SMB_ASSERT(EXCLUSIVE_OPLOCK_TYPE(d->share_modes[0].op_type));
return true;
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 8e41416..d71b0a0 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -683,9 +683,24 @@ bool disk_quotas(connection_struct *conn, const char *path, uint64_t *bsize,
SMB_DISK_QUOTA D;
unid_t id;
- id.uid = geteuid();
+ /*
+ * First of all, check whether user quota is
+ * enforced. If the call fails, assume it is
+ * not enforced.
+ */
+ ZERO_STRUCT(D);
+ id.uid = -1;
+ r = SMB_VFS_GET_QUOTA(conn, path, SMB_USER_FS_QUOTA_TYPE, id, &D);
+ if (r == -1 && errno != ENOSYS) {
+ goto try_group_quota;
+ }
+ if (r == 0 && (D.qflags & QUOTAS_DENY_DISK) == 0) {
+ goto try_group_quota;
+ }
ZERO_STRUCT(D);
+ id.uid = geteuid();
+
r = SMB_VFS_GET_QUOTA(conn, path, SMB_USER_QUOTA_TYPE, id, &D);
/* Use softlimit to determine disk space, except when it has been exceeded */
@@ -722,6 +737,21 @@ bool disk_quotas(connection_struct *conn, const char *path, uint64_t *bsize,
return True;
try_group_quota:
+ /*
+ * First of all, check whether group quota is
+ * enforced. If the call fails, assume it is
+ * not enforced.
+ */
+ ZERO_STRUCT(D);
+ id.gid = -1;
+ r = SMB_VFS_GET_QUOTA(conn, path, SMB_GROUP_FS_QUOTA_TYPE, id, &D);
+ if (r == -1 && errno != ENOSYS) {
+ return false;
+ }
+ if (r == 0 && (D.qflags & QUOTAS_DENY_DISK) == 0) {
+ return false;
+ }
+
id.gid = getegid();
ZERO_STRUCT(D);
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index ba8946d..0c70250 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -181,6 +181,7 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
bool set_current_service(connection_struct *conn, uint16_t flags, bool do_chdir)
{
int snum;
+ enum remote_arch_types ra_type;
if (!conn) {
last_conn = NULL;
@@ -206,28 +207,35 @@ bool set_current_service(connection_struct *conn, uint16_t flags, bool do_chdir)
last_conn = conn;
last_flags = flags;
- /* Obey the client case sensitivity requests - only for clients that support it. */
+ /*
+ * Obey the client case sensitivity requests - only for clients that
+ * support it. */
switch (lp_case_sensitive(snum)) {
- case Auto:
- {
- /* We need this uglyness due to DOS/Win9x clients that lie about case insensitivity. */
- enum remote_arch_types ra_type = get_remote_arch();
- if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) {
- /* Client can't support per-packet case sensitive pathnames. */
- conn->case_sensitive = False;
- } else {
- conn->case_sensitive = !(flags & FLAG_CASELESS_PATHNAMES);
- }
- }
- break;
- case True:
- conn->case_sensitive = True;
- break;
- default:
- conn->case_sensitive = False;
- break;
- }
- return(True);
+ case Auto:
+ /*
+ * We need this uglyness due to DOS/Win9x clients that lie
+ * about case insensitivity. */
+ ra_type = get_remote_arch();
+ if (conn->sconn->using_smb2) {
+ conn->case_sensitive = false;
+ } else if ((ra_type != RA_SAMBA) && (ra_type != RA_CIFSFS)) {
+ /*
+ * Client can't support per-packet case sensitive
+ * pathnames. */
+ conn->case_sensitive = false;
+ } else {
+ conn->case_sensitive =
+ !(flags & FLAG_CASELESS_PATHNAMES);
+ }
+ break;
+ case True:
+ conn->case_sensitive = true;
+ break;
+ default:
+ conn->case_sensitive = false;
+ break;
+ }
+ return true;
}
/****************************************************************************
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 62dc49e..c058eac 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -130,6 +130,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
struct smbXsrv_connection *xconn = req->xconn;
struct smbd_server_connection *sconn = req->sconn;
uint16_t action = 0;
+ bool is_authenticated = false;
NTTIME now = timeval_to_nttime(&req->request_time);
struct smbXsrv_session *session = NULL;
uint16_t smb_bufsize = SVAL(req->vwv+2, 0);
@@ -336,12 +337,13 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req)
sconn->num_users++;
if (security_session_user_level(session_info, NULL) >= SECURITY_USER) {
+ is_authenticated = true;
session->compat->homes_snum =
register_homes_share(session_info->unix_info->unix_name);
}
if (srv_is_signing_negotiated(xconn) &&
- action == 0 &&
+ is_authenticated &&
session->global->signing_key.length > 0)
{
/*
@@ -601,6 +603,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
struct auth_session_info *session_info = NULL;
uint16_t smb_flag2 = req->flags2;
uint16_t action = 0;
+ bool is_authenticated = false;
NTTIME now = timeval_to_nttime(&req->request_time);
struct smbXsrv_session *session = NULL;
NTSTATUS nt_status;
@@ -1038,12 +1041,13 @@ void reply_sesssetup_and_X(struct smb_request *req)
sconn->num_users++;
if (security_session_user_level(session_info, NULL) >= SECURITY_USER) {
+ is_authenticated = true;
session->compat->homes_snum =
register_homes_share(session_info->unix_info->unix_name);
}
if (srv_is_signing_negotiated(xconn) &&
- action == 0 &&
+ is_authenticated &&
session->global->signing_key.length > 0)
{
/*
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 68d637e..8a4aa96 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -46,6 +46,7 @@ static const struct smbd_smb2_dispatch_table {
bool as_root;
uint16_t fileid_ofs;
bool allow_invalid_fileid;
+ bool modify;
} smbd_smb2_table[] = {
#define _OP(o) .opcode = o, .name = #o
{
@@ -98,6 +99,7 @@ static const struct smbd_smb2_dispatch_table {
.need_session = true,
.need_tcon = true,
.fileid_ofs = 0x10,
+ .modify = true,
},{
_OP(SMB2_OP_LOCK),
.need_session = true,
@@ -109,6 +111,7 @@ static const struct smbd_smb2_dispatch_table {
.need_tcon = true,
.fileid_ofs = 0x08,
.allow_invalid_fileid = true,
+ .modify = true,
},{
_OP(SMB2_OP_CANCEL),
.as_root = true,
@@ -135,6 +138,7 @@ static const struct smbd_smb2_dispatch_table {
.need_session = true,
.need_tcon = true,
.fileid_ofs = 0x10,
+ .modify = true,
},{
_OP(SMB2_OP_BREAK),
.need_session = true,
@@ -2107,6 +2111,121 @@ bool smbXsrv_is_partially_signed(uint8_t signing_flags)
(signing_flags & SMBXSRV_PROCESSED_SIGNED_PACKET));
}
+static NTSTATUS smbd_smb2_request_dispatch_update_counts(
+ struct smbd_smb2_request *req,
+ bool modify_call)
+{
+ struct smbXsrv_connection *xconn = req->xconn;
+ const uint8_t *inhdr;
+ uint16_t channel_sequence;
+ uint32_t flags;
+ int cmp;
+ struct smbXsrv_open *op;
+ bool update_open = false;
+ NTSTATUS status = NT_STATUS_OK;
+
+ req->request_counters_updated = false;
+
+ if (xconn->protocol < PROTOCOL_SMB2_22) {
+ return NT_STATUS_OK;
+ }
+
+ if (req->compat_chain_fsp == NULL) {
+ return NT_STATUS_OK;
+ }
+
+ op = req->compat_chain_fsp->op;
+ if (op == NULL) {
+ return NT_STATUS_OK;
+ }
+
+ inhdr = SMBD_SMB2_IN_HDR_PTR(req);
+ flags = IVAL(inhdr, SMB2_HDR_FLAGS);
+ channel_sequence = SVAL(inhdr, SMB2_HDR_CHANNEL_SEQUENCE);
+
+ cmp = channel_sequence - op->global->channel_sequence;
+
+ if (abs(cmp) > INT16_MAX) {
+ /*
+ * [MS-SMB2] 3.3.5.2.10 - Verifying the Channel Sequence Number:
+ *
+ * If the channel sequence number of the request and the one
+ * known to the server are not equal, the channel sequence
+ * number and outstanding request counts are only updated
+ * "... if the unsigned difference using 16-bit arithmetic
+ * between ChannelSequence and Open.ChannelSequence is less than
+ * or equal to 0x7FFF ...".
+ * Otherwise, an error is returned for the modifying
+ * calls write, set_info, and ioctl.
+ *
+ * There are currently two issues with the description:
+ *
+ * * For the other calls, the document seems to imply
+ * that processing continues without adapting the
+ * counters (if the sequence numbers are not equal).
+ *
+ * TODO: This needs clarification!
+ *
+ * * Also, the behaviour if the difference is larger
+ * than 0x7FFF is not clear. The document seems to
+ * imply that if such a difference is reached,
+ * the server starts to ignore the counters or
+ * in the case of the modifying calls, return errors.
+ *
+ * TODO: This needs clarification!
+ *
+ * At this point Samba tries to be a little more
+ * clever than the description in the MS-SMB2 document
+ * by heuristically detecting and properly treating
+ * a 16 bit overflow of the client-submitted sequence
+ * number:
+ *
+ * If the stored channel squence number is more than
+ * 0x7FFF larger than the one from the request, then
+ * the client-provided sequence number has likely
+ * overflown. We treat this case as valid instead
+ * of as failure.
+ *
+ * The MS-SMB2 behaviour would be setting cmp = -1.
+ */
+ cmp *= -1;
+ }
+
+ if (!(flags & SMB2_HDR_FLAG_REPLAY_OPERATION)) {
+ if (cmp == 0) {
+ op->request_count += 1;
+ req->request_counters_updated = true;
+ } else if (cmp > 0) {
+ op->pre_request_count += op->request_count;
+ op->request_count = 1;
+ op->global->channel_sequence = channel_sequence;
+ update_open = true;
+ req->request_counters_updated = true;
+ } else if (modify_call) {
+ return NT_STATUS_FILE_NOT_AVAILABLE;
+ }
+ } else {
+ if (cmp == 0 && op->pre_request_count == 0) {
+ op->request_count += 1;
+ req->request_counters_updated = true;
+ } else if (cmp > 0 && op->pre_request_count == 0) {
+ op->pre_request_count += op->request_count;
+ op->request_count = 1;
+ op->global->channel_sequence = channel_sequence;
+ update_open = true;
+ req->request_counters_updated = true;
+ } else if (modify_call) {
+ return NT_STATUS_FILE_NOT_AVAILABLE;
+ }
+ }
+
+ if (update_open) {
+ status = smbXsrv_open_update(op);
+ }
+
+ return status;
+}
+
NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
{
struct smbXsrv_connection *xconn = req->xconn;
@@ -2404,6 +2523,11 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
}
}
+ status = smbd_smb2_request_dispatch_update_counts(req, call->modify);
+ if (!NT_STATUS_IS_OK(status)) {
+ return smbd_smb2_request_error(req, status);
+ }
+
if (call->as_root) {
SMB_ASSERT(call->fileid_ofs == 0);
/* This call needs to be run as root */
@@ -2552,6 +2676,42 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req)
return return_value;
}
+static void smbd_smb2_request_reply_update_counts(struct smbd_smb2_request *req)
+{
+ struct smbXsrv_connection *xconn = req->xconn;
+ const uint8_t *inhdr;
+ uint16_t channel_sequence;
+ struct smbXsrv_open *op;
+
+ if (!req->request_counters_updated) {
+ return;
+ }
+
+ if (xconn->protocol < PROTOCOL_SMB2_22) {
+ return;
+ }
+
+ if (req->compat_chain_fsp == NULL) {
+ return;
+ }
+
+ op = req->compat_chain_fsp->op;
+ if (op == NULL) {
+ return;
+ }
+
+ inhdr = SMBD_SMB2_IN_HDR_PTR(req);
+ channel_sequence = SVAL(inhdr, SMB2_HDR_CHANNEL_SEQUENCE);
+
+ if (op->global->channel_sequence == channel_sequence) {
+ SMB_ASSERT(op->request_count > 0);
+ op->request_count -= 1;
+ } else {
+ SMB_ASSERT(op->pre_request_count > 0);
+ op->pre_request_count -= 1;
+ }
+}
+
static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
{
struct smbXsrv_connection *xconn = req->xconn;
@@ -2565,6 +2725,9 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
req->subreq = NULL;
TALLOC_FREE(req->async_te);
+ /* MS-SMB2: 3.3.4.1 Sending Any Outgoing Message */
+ smbd_smb2_request_reply_update_counts(req);
+
if (req->do_encryption &&
(firsttf->iov_len == 0) &&
(req->first_key.length == 0) &&
diff --git a/source3/utils/net_printing.c b/source3/utils/net_printing.c
index 6f805eb..cc82e51 100644
--- a/source3/utils/net_printing.c
+++ b/source3/utils/net_printing.c
@@ -264,27 +264,66 @@ static int net_printing_dump(struct net_context *c, int argc,
}
if (strncmp((const char *)kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) == 0) {
- dump_form(ctx, (const char *)kbuf.dptr+strlen(FORMS_PREFIX), dbuf.dptr, dbuf.dsize);
+ char *key_name = NULL;
+ size_t converted_size = 0;
+ bool ok;
+
+ ok = pull_ascii_talloc(ctx,
+ &key_name,
+ (const char *) kbuf.dptr + strlen(FORMS_PREFIX),
+ &converted_size);
+ if (!ok) {
+ continue;
+ }
+
+ dump_form(ctx, key_name, dbuf.dptr, dbuf.dsize);
+ TALLOC_FREE(key_name);
SAFE_FREE(dbuf.dptr);
continue;
}
if (strncmp((const char *)kbuf.dptr, DRIVERS_PREFIX, strlen(DRIVERS_PREFIX)) == 0) {
+ char *key_name = NULL;
+ size_t converted_size = 0;
+ bool ok;
+
+ ok = pull_ascii_talloc(ctx,
+ &key_name,
+ (const char *) kbuf.dptr + strlen(DRIVERS_PREFIX),
+ &converted_size);
+ if (!ok) {
+ continue;
+ }
+
dump_driver(ctx,
- (const char *)kbuf.dptr+strlen(DRIVERS_PREFIX),
+ key_name,
dbuf.dptr,
dbuf.dsize,
do_string_conversion);
+ TALLOC_FREE(key_name);
SAFE_FREE(dbuf.dptr);
continue;
}
if (strncmp((const char *)kbuf.dptr, PRINTERS_PREFIX, strlen(PRINTERS_PREFIX)) == 0) {
+ char *key_name = NULL;
+ size_t converted_size = 0;
+ bool ok;
+
+ ok = pull_ascii_talloc(ctx,
+ &key_name,
+ (const char *) kbuf.dptr + strlen(PRINTERS_PREFIX),
+ &converted_size);
+ if (!ok) {
+ continue;
+ }
+
dump_printer(ctx,
- (const char *)kbuf.dptr+strlen(PRINTERS_PREFIX),
+ key_name,
dbuf.dptr,
dbuf.dsize,
do_string_conversion);
+ TALLOC_FREE(key_name);
SAFE_FREE(dbuf.dptr);
continue;
}
@@ -357,33 +396,72 @@ static NTSTATUS printing_migrate_internal(struct net_context *c,
}
if (strncmp((const char *) kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) == 0) {
+ char *key_name = NULL;
+ size_t converted_size = 0;
+ bool ok;
+
+ ok = pull_ascii_talloc(tmp_ctx,
+ &key_name,
+ (const char *) kbuf.dptr + strlen(FORMS_PREFIX),
+ &converted_size);
+ if (!ok) {
+ continue;
+ }
+
printing_tdb_migrate_form(tmp_ctx,
winreg_pipe,
- (const char *) kbuf.dptr + strlen(FORMS_PREFIX),
+ key_name,
dbuf.dptr,
dbuf.dsize);
+ TALLOC_FREE(key_name);
SAFE_FREE(dbuf.dptr);
continue;
}
if (strncmp((const char *) kbuf.dptr, DRIVERS_PREFIX, strlen(DRIVERS_PREFIX)) == 0) {
+ char *key_name = NULL;
+ size_t converted_size = 0;
+ bool ok;
+
+ ok = pull_ascii_talloc(tmp_ctx,
+ &key_name,
+ (const char *) kbuf.dptr + strlen(DRIVERS_PREFIX),
+ &converted_size);
+ if (!ok) {
+ continue;
+ }
+
printing_tdb_migrate_driver(tmp_ctx,
winreg_pipe,
- (const char *) kbuf.dptr + strlen(DRIVERS_PREFIX),
+ key_name,
dbuf.dptr,
dbuf.dsize,
do_string_conversion);
+ TALLOC_FREE(key_name);
SAFE_FREE(dbuf.dptr);
continue;
}
if (strncmp((const char *) kbuf.dptr, PRINTERS_PREFIX, strlen(PRINTERS_PREFIX)) == 0) {
+ char *key_name = NULL;
+ size_t converted_size = 0;
+ bool ok;
+
+ ok = pull_ascii_talloc(tmp_ctx,
+ &key_name,
+ (const char *) kbuf.dptr + strlen(PRINTERS_PREFIX),
+ &converted_size);
+ if (!ok) {
+ continue;
+ }
+
printing_tdb_migrate_printer(tmp_ctx,
winreg_pipe,
- (const char *) kbuf.dptr + strlen(PRINTERS_PREFIX),
+ key_name,
dbuf.dptr,
dbuf.dsize,
do_string_conversion);
+ TALLOC_FREE(key_name);
SAFE_FREE(dbuf.dptr);
continue;
}
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c
index 27cb416..b65493b 100644
--- a/source3/utils/ntlm_auth.c
+++ b/source3/utils/ntlm_auth.c
@@ -27,6 +27,7 @@
#include "includes.h"
#include "lib/param/param.h"
#include "popt_common.h"
+#include "libcli/security/security.h"
#include "utils/ntlm_auth.h"
#include "../libcli/auth/libcli_auth.h"
#include "auth/ntlmssp/ntlmssp.h"
@@ -710,18 +711,58 @@ static NTSTATUS ntlm_auth_generate_session_info(struct auth4_context *auth_conte
uint32_t session_info_flags,
struct auth_session_info **session_info_out)
{
- char *unix_username = (char *)server_returned_info;
- struct auth_session_info *session_info = talloc_zero(mem_ctx, struct auth_session_info);
- if (!session_info) {
+ const char *unix_username = (const char *)server_returned_info;
+ bool ok;
+ struct dom_sid *sids = NULL;
+ struct auth_session_info *session_info = NULL;
+
+ session_info = talloc_zero(mem_ctx, struct auth_session_info);
+ if (session_info == NULL) {
return NT_STATUS_NO_MEMORY;
}
session_info->unix_info = talloc_zero(session_info, struct auth_user_info_unix);
- if (!session_info->unix_info) {
+ if (session_info->unix_info == NULL) {
+ TALLOC_FREE(session_info);
+ return NT_STATUS_NO_MEMORY;
+ }
+ session_info->unix_info->unix_name = talloc_strdup(session_info->unix_info,
+ unix_username);
+ if (session_info->unix_info->unix_name == NULL) {
+ TALLOC_FREE(session_info);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ session_info->security_token = talloc_zero(session_info, struct security_token);
+ if (session_info->security_token == NULL) {
TALLOC_FREE(session_info);
return NT_STATUS_NO_MEMORY;
}
- session_info->unix_info->unix_name = talloc_steal(session_info->unix_info, unix_username);
+
+ sids = talloc_zero_array(session_info->security_token,
+ struct dom_sid, 3);
+ if (sids == NULL) {
+ TALLOC_FREE(session_info);
+ return NT_STATUS_NO_MEMORY;
+ }
+ ok = dom_sid_parse(SID_WORLD, &sids[0]);
+ if (!ok) {
+ TALLOC_FREE(session_info);
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+ ok = dom_sid_parse(SID_NT_NETWORK, &sids[1]);
+ if (!ok) {
+ TALLOC_FREE(session_info);
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+ ok = dom_sid_parse(SID_NT_AUTHENTICATED_USERS, &sids[2]);
+ if (!ok) {
+ TALLOC_FREE(session_info);
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+
+ session_info->security_token->num_sids = talloc_array_length(sids);
+ session_info->security_token->sids = sids;
*session_info_out = session_info;
diff --git a/source3/wscript b/source3/wscript
index 72fe0c8..cd63f74 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -110,7 +110,7 @@ def configure(conf):
conf.CHECK_FUNCS('getpwnam', headers='sys/types.h pwd.h')
conf.CHECK_FUNCS('fdopendir')
conf.CHECK_FUNCS('fstatat')
- conf.CHECK_FUNCS('getpwent_r setenv strcasecmp fcvt fcvtl')
+ conf.CHECK_FUNCS('getpwent_r setenv clearenv strcasecmp fcvt fcvtl')
conf.CHECK_FUNCS('syslog vsyslog timegm setlocale')
conf.CHECK_FUNCS_IN('nanosleep', 'rt')
conf.CHECK_FUNCS('lutimes futimes utimensat futimens')
diff --git a/source4/heimdal/kdc/misc.c b/source4/heimdal/kdc/misc.c
index b0bc38a..6fd5119 100644
--- a/source4/heimdal/kdc/misc.c
+++ b/source4/heimdal/kdc/misc.c
@@ -40,7 +40,7 @@ _kdc_db_fetch(krb5_context context,
krb5_kdc_configuration *config,
krb5_const_principal principal,
unsigned flags,
- krb5uint32 *kvno_ptr,
+ krb5int32 *kvno_ptr,
HDB **db,
hdb_entry_ex **h)
{
diff --git a/source4/heimdal/lib/asn1/krb5.asn1 b/source4/heimdal/lib/asn1/krb5.asn1
index f3ae6bb..c2f40c0 100644
--- a/source4/heimdal/lib/asn1/krb5.asn1
+++ b/source4/heimdal/lib/asn1/krb5.asn1
@@ -360,7 +360,7 @@ LastReq ::= SEQUENCE OF SEQUENCE {
EncryptedData ::= SEQUENCE {
etype[0] ENCTYPE, -- EncryptionType
- kvno[1] krb5uint32 OPTIONAL,
+ kvno[1] krb5int32 OPTIONAL,
cipher[2] OCTET STRING -- ciphertext
}
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index a2f2203..c829608 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -537,6 +537,10 @@ planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.unix")
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.dcerpc.srvsvc")
planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.samba_tool.timecmd")
+# test fsmo show
+for env in ["ad_dc_ntvfs", "fl2000dc", "fl2003dc", "fl2008r2dc"]:
+ planpythontestsuite(env + ":local", "samba.tests.samba_tool.fsmo")
+
# We run this test against both AD DC implemetnations because it is
# the only test we have of GPO get/set behaviour, and this involves
# the file server as well as the LDAP server.
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 2bc9649..6fd2b80 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -3183,7 +3183,7 @@ static bool check_pw_with_krb5(struct torture_context *tctx,
const char *old_password = cli_credentials_get_old_password(credentials);
int kvno = cli_credentials_get_kvno(credentials);
int expected_kvno = 0;
- krb5uint32 t_kvno = 0;
+ krb5int32 t_kvno = 0;
const char *host = torture_setting_string(tctx, "host", NULL);
krb5_error_code k5ret;
krb5_boolean k5ok;
diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c
index c32533b..91bb568 100644
--- a/source4/torture/smb2/replay.c
+++ b/source4/torture/smb2/replay.c
@@ -94,7 +94,7 @@
#define BASEDIR "replaytestdir"
-static struct {
+struct break_info {
struct torture_context *tctx;
struct smb2_handle handle;
uint8_t level;
@@ -102,7 +102,16 @@ static struct {
int count;
int failures;
NTSTATUS failure_status;
-} break_info;
+};
+
+static struct break_info break_info;
+
+static void torture_reset_break_info(struct torture_context *tctx,
+ struct break_info *r)
+{
+ ZERO_STRUCTP(r);
+ r->tctx = tctx;
+}
static void torture_oplock_ack_callback(struct smb2_request *req)
{
@@ -163,6 +172,61 @@ static bool torture_oplock_ack_handler(struct smb2_transport *transport,
}
/**
+ * Timer handler function notifies the registering function that time is up
+ */
+static void timeout_cb(struct tevent_context *ev,
+ struct tevent_timer *te,
+ struct timeval current_time,
+ void *private_data)
+{
+ bool *timesup = (bool *)private_data;
+ *timesup = true;
+ return;
+}
+
+/**
+ * Wait a short period of time to receive a single oplock break request
+ */
+static void torture_wait_for_oplock_break(struct torture_context *tctx)
+{
+ TALLOC_CTX *tmp_ctx = talloc_new(NULL);
+ struct tevent_timer *te = NULL;
+ struct timeval ne;
+ bool timesup = false;
+ int old_count = break_info.count;
+
+ /* Wait .1 seconds for an oplock break */
+ ne = tevent_timeval_current_ofs(0, 100000);
+
+ te = tevent_add_timer(tctx->ev, tmp_ctx, ne, timeout_cb, &timesup);
+ if (te == NULL) {
+ torture_comment(tctx, "Failed to wait for an oplock break. "
+ "test results may not be accurate.");
+ goto done;
+ }
+
+ while (!timesup && break_info.count < old_count + 1) {
+ if (tevent_loop_once(tctx->ev) != 0) {
+ torture_comment(tctx, "Failed to wait for an oplock "
+ "break. test results may not be "
+ "accurate.");
+ goto done;
+ }
+ }
+
+done:
+ /*
+ * We don't know if the timed event fired and was freed, we received
+ * our oplock break, or some other event triggered the loop. Thus,
+ * we create a tmp_ctx to be able to safely free/remove the timed
+ * event in all 3 cases.
+ */
+ talloc_free(tmp_ctx);
+
+ return;
+}
+
+/**
* Test what happens when SMB2_FLAGS_REPLAY_OPERATION is enabled for various
* commands. We want to verify if the server returns an error code or not.
*/
@@ -1428,6 +1492,271 @@ done:
return ret;
}
+static bool test_channel_sequence_table(struct torture_context *tctx,
+ struct smb2_tree *tree,
+ bool do_replay,
+ uint16_t opcode)
+{
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx = talloc_new(tctx);
+ struct smb2_handle handle;
+ struct smb2_handle *phandle = NULL;
+ struct smb2_create io;
+ struct GUID create_guid = GUID_random();
+ bool ret = true;
+ const char *fname = BASEDIR "\\channel_sequence.dat";
+ uint16_t csn = 0;
+ uint16_t limit = UINT16_MAX - 0x7fff;
+ int i;
+ struct {
+ uint16_t csn;
+ bool csn_rand_low;
+ bool csn_rand_high;
+ NTSTATUS expected_status;
+ } tests[] = {
+ {
+ .csn = 0,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 0x7fff + 1,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = 0x7fff + 2,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = -1,
+ .csn_rand_high = true,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = 0xffff,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = 0x7fff,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 0x7ffe,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = 0,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = -1,
+ .csn_rand_low = true,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = 0x7fff + 1,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 0xffff,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 0,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 1,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 0,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ },{
+ .csn = 1,
+ .expected_status = NT_STATUS_OK,
+ },{
+ .csn = 0xffff,
+ .expected_status = NT_STATUS_FILE_NOT_AVAILABLE,
+ }
+ };
+
+ smb2cli_session_reset_channel_sequence(tree->session->smbXcli, 0);
+
+ csn = smb2cli_session_current_channel_sequence(tree->session->smbXcli);
+ torture_comment(tctx, "Testing create with channel sequence number: 0x%04x\n", csn);
+
+ smb2_oplock_create_share(&io, fname,
+ smb2_util_share_access("RWD"),
+ smb2_util_oplock_level("b"));
+ io.in.durable_open = false;
+ io.in.durable_open_v2 = true;
+ io.in.create_guid = create_guid;
+ io.in.timeout = UINT32_MAX;
+
+ torture_assert_ntstatus_ok_goto(tctx,
+ smb2_create(tree, mem_ctx, &io),
+ ret, done, "failed to call smb2_create");
+
+ handle = io.out.file.handle;
+ phandle = &handle;
+
+ for (i=0; i <ARRAY_SIZE(tests); i++) {
+
+ const char *opstr = "";
+ union smb_fileinfo qfinfo;
+
+ csn = tests[i].csn;
+
+ if (tests[i].csn_rand_low) {
+ csn = rand() % limit;
+ } else if (tests[i].csn_rand_high) {
+ csn = rand() % limit + 0x7fff;
+ }
+
+ switch (opcode) {
+ case SMB2_OP_WRITE:
+ opstr = "write";
+ break;
+ case SMB2_OP_IOCTL:
+ opstr = "ioctl";
+ break;
+ case SMB2_OP_SETINFO:
+ opstr = "setinfo";
+ break;
+ default:
+ break;
+ }
+
+ smb2cli_session_reset_channel_sequence(tree->session->smbXcli, csn);
+ csn = smb2cli_session_current_channel_sequence(tree->session->smbXcli);
+
+ torture_comment(tctx, "Testing %s (replay: %s) with CSN 0x%04x, expecting: %s\n",
+ opstr, do_replay ? "true" : "false", csn,
+ nt_errstr(tests[i].expected_status));
+
+ if (do_replay) {
+ smb2cli_session_start_replay(tree->session->smbXcli);
+ }
+
+ switch (opcode) {
+ case SMB2_OP_WRITE: {
+ DATA_BLOB blob = data_blob_talloc(tctx, NULL, 255);
+
+ generate_random_buffer(blob.data, blob.length);
+
+ status = smb2_util_write(tree, handle, blob.data, 0, blob.length);
+ if (NT_STATUS_IS_OK(status)) {
+ struct smb2_read rd;
+
+ rd = (struct smb2_read) {
+ .in.file.handle = handle,
+ .in.length = blob.length,
+ .in.offset = 0
+ };
+
+ torture_assert_ntstatus_ok_goto(tctx,
+ smb2_read(tree, tree, &rd),
+ ret, done, "failed to read after write");
+
+ torture_assert_data_blob_equal(tctx,
+ rd.out.data, blob,
+ "read/write mismatch");
+ }
+ break;
+ }
+ case SMB2_OP_IOCTL: {
+ union smb_ioctl ioctl;
+ ioctl = (union smb_ioctl) {
+ .smb2.level = RAW_IOCTL_SMB2,
+ .smb2.in.file.handle = handle,
+ .smb2.in.function = FSCTL_CREATE_OR_GET_OBJECT_ID,
+ .smb2.in.max_response_size = 64,
+ .smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL
+ };
+ status = smb2_ioctl(tree, mem_ctx, &ioctl.smb2);
+ break;
+ }
+ case SMB2_OP_SETINFO: {
+ union smb_setfileinfo sfinfo;
+ ZERO_STRUCT(sfinfo);
+ sfinfo.generic.level = RAW_SFILEINFO_POSITION_INFORMATION;
+ sfinfo.generic.in.file.handle = handle;
+ sfinfo.position_information.in.position = 0x1000;
+ status = smb2_setinfo_file(tree, &sfinfo);
+ break;
+ }
+ default:
+ break;
+ }
+
+ qfinfo = (union smb_fileinfo) {
+ .generic.level = RAW_SFILEINFO_POSITION_INFORMATION,
+ .generic.in.file.handle = handle
+ };
+
+ torture_assert_ntstatus_ok_goto(tctx,
+ smb2_getinfo_file(tree, mem_ctx, &qfinfo),
+ ret, done, "failed to read after write");
+
+ if (do_replay) {
+ smb2cli_session_stop_replay(tree->session->smbXcli);
+ }
+
+ torture_assert_ntstatus_equal_goto(tctx,
+ status, tests[i].expected_status,
+ ret, done, "got unexpected failure code");
+
+ }
+done:
+ if (phandle != NULL) {
+ smb2_util_close(tree, *phandle);
+ }
+
+ smb2_util_unlink(tree, fname);
+
+ return ret;
+}
+
+static bool test_channel_sequence(struct torture_context *tctx,
+ struct smb2_tree *tree)
+{
+ TALLOC_CTX *mem_ctx = talloc_new(tctx);
+ bool ret = true;
+ const char *fname = BASEDIR "\\channel_sequence.dat";
+ struct smb2_transport *transport1 = tree->session->transport;
+ struct smb2_handle handle;
+ uint32_t server_capabilities;
+ uint16_t opcodes[] = { SMB2_OP_WRITE, SMB2_OP_IOCTL, SMB2_OP_SETINFO };
+ int i;
+
+ if (smbXcli_conn_protocol(transport1->conn) < PROTOCOL_SMB3_00) {
+ torture_skip(tctx, "SMB 3.X Dialect family required for "
+ "Replay tests\n");
+ }
+
+ server_capabilities = smb2cli_conn_server_capabilities(
+ tree->session->transport->conn);
+ if (!(server_capabilities & SMB2_CAP_MULTI_CHANNEL)) {
+ torture_skip(tctx,
+ "Server does not support multi-channel.");
+ }
+
+ torture_comment(tctx, "Testing channel sequence numbers\n");
+
+ torture_assert_ntstatus_ok_goto(tctx,
+ torture_smb2_testdir(tree, BASEDIR, &handle),
+ ret, done, "failed to setup test directory");
+
+ smb2_util_close(tree, handle);
+ smb2_util_unlink(tree, fname);
+
+ for (i=0; i <ARRAY_SIZE(opcodes); i++) {
+ torture_assert(tctx,
+ test_channel_sequence_table(tctx, tree, false, opcodes[i]),
+ "failed to test CSN without replay flag");
+ torture_assert(tctx,
+ test_channel_sequence_table(tctx, tree, true, opcodes[i]),
+ "failed to test CSN with replay flag");
+ }
+
+done:
+
+ smb2_util_unlink(tree, fname);
+ smb2_deltree(tree, BASEDIR);
+
+ talloc_free(tree);
+ talloc_free(mem_ctx);
+
+ return ret;
+}
+
/**
* Test Durablity V2 Create Replay Detection on Multi Channel
*/
@@ -1956,6 +2285,148 @@ done:
return ret;
}
+
+/**
+ * Test Error Codes when a DurableHandleReqV2 with matching CreateGuid is
+ * re-sent with or without SMB2_FLAGS_REPLAY_OPERATION
+ */
+static bool test_replay6(struct torture_context *tctx, struct smb2_tree *tree)
+{
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx = talloc_new(tctx);
+ struct smb2_handle _h;
+ struct smb2_handle *h = NULL;
+ struct smb2_create io, ref1;
+ union smb_fileinfo qfinfo;
+ struct GUID create_guid = GUID_random();
+ bool ret = true;
+ const char *fname = BASEDIR "\\replay6.dat";
+ struct smb2_transport *transport = tree->session->transport;
+
+ if (smbXcli_conn_protocol(transport->conn) < PROTOCOL_SMB3_00) {
+ torture_skip(tctx, "SMB 3.X Dialect family required for "
+ "replay tests\n");
+ }
+
+ torture_reset_break_info(tctx, &break_info);
+ tree->session->transport->oplock.handler = torture_oplock_ack_handler;
+ tree->session->transport->oplock.private_data = tree;
+
+ torture_comment(tctx, "Error Codes for DurableHandleReqV2 Replay\n");
+ smb2_util_unlink(tree, fname);
+ status = torture_smb2_testdir(tree, BASEDIR, &_h);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ smb2_util_close(tree, _h);
+ torture_wait_for_oplock_break(tctx);
+ CHECK_VAL(break_info.count, 0);
+ torture_reset_break_info(tctx, &break_info);
+
+ smb2_oplock_create_share(&io, fname,
+ smb2_util_share_access("RWD"),
+ smb2_util_oplock_level("b"));
+ io.in.durable_open = false;
+ io.in.durable_open_v2 = true;
+ io.in.persistent_open = false;
+ io.in.create_guid = create_guid;
+ io.in.timeout = UINT32_MAX;
+
+ status = smb2_create(tree, mem_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ ref1 = io;
+ _h = io.out.file.handle;
+ h = &_h;
+ CHECK_CREATED(&io, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+ CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b"));
+ CHECK_VAL(io.out.durable_open, false);
+ CHECK_VAL(io.out.durable_open_v2, true);
+
+ io.in.file_attributes = FILE_ATTRIBUTE_DIRECTORY;
+ io.in.create_disposition = NTCREATEX_DISP_OPEN;
+ smb2cli_session_start_replay(tree->session->smbXcli);
+ status = smb2_create(tree, mem_ctx, &io);
+ smb2cli_session_stop_replay(tree->session->smbXcli);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ CHECK_CREATE_OUT(&io, &ref1);
+ torture_wait_for_oplock_break(tctx);
+ CHECK_VAL(break_info.count, 0);
+ torture_reset_break_info(tctx, &break_info);
+
+ qfinfo = (union smb_fileinfo) {
+ .generic.level = RAW_SFILEINFO_POSITION_INFORMATION,
+ .generic.in.file.handle = *h
+ };
+ torture_comment(tctx, "Trying getinfo\n");
+ status = smb2_getinfo_file(tree, mem_ctx, &qfinfo);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ CHECK_VAL(qfinfo.position_information.out.position, 0);
+
+ smb2cli_session_start_replay(tree->session->smbXcli);
+ status = smb2_create(tree, mem_ctx, &io);
+ smb2cli_session_stop_replay(tree->session->smbXcli);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ torture_assert_u64_not_equal_goto(tctx,
+ io.out.file.handle.data[0],
+ ref1.out.file.handle.data[0],
+ ret, done, "data 0");
+ torture_assert_u64_not_equal_goto(tctx,
+ io.out.file.handle.data[1],
+ ref1.out.file.handle.data[1],
+ ret, done, "data 1");
+ torture_wait_for_oplock_break(tctx);
+ CHECK_VAL(break_info.count, 1);
+ CHECK_VAL(break_info.level, smb2_util_oplock_level("s"));
+ torture_reset_break_info(tctx, &break_info);
+
+ /*
+ * Resend the matching Durable V2 Create without
+ * SMB2_FLAGS_REPLAY_OPERATION. This triggers an oplock break and still
+ * gets NT_STATUS_DUPLICATE_OBJECTID
+ */
+ status = smb2_create(tree, mem_ctx, &io);
+ CHECK_STATUS(status, NT_STATUS_DUPLICATE_OBJECTID);
+ torture_wait_for_oplock_break(tctx);
+ CHECK_VAL(break_info.count, 0);
+ torture_reset_break_info(tctx, &break_info);
+
+ /*
+ * According to MS-SMB2 3.3.5.9.10 if Durable V2 Create is replayed and
+ * FileAttributes or CreateDisposition do not match the earlier Create
+ * request the Server fails request with
+ * NT_STATUS_INVALID_PARAMETER. But through this test we see that server
+ * does not really care about changed FileAttributes or
+ * CreateDisposition.
+ */
+ io.in.file_attributes = FILE_ATTRIBUTE_DIRECTORY;
+ io.in.create_disposition = NTCREATEX_DISP_OPEN;
+ smb2cli_session_start_replay(tree->session->smbXcli);
+ status = smb2_create(tree, mem_ctx, &io);
+ smb2cli_session_stop_replay(tree->session->smbXcli);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ torture_assert_u64_not_equal_goto(tctx,
+ io.out.file.handle.data[0],
+ ref1.out.file.handle.data[0],
+ ret, done, "data 0");
+ torture_assert_u64_not_equal_goto(tctx,
+ io.out.file.handle.data[1],
+ ref1.out.file.handle.data[1],
+ ret, done, "data 1");
+ torture_wait_for_oplock_break(tctx);
+ CHECK_VAL(break_info.count, 0);
+
+done:
+ if (h != NULL) {
+ smb2_util_close(tree, *h);
+ }
+
+ smb2_util_unlink(tree, fname);
+ smb2_deltree(tree, BASEDIR);
+
+ talloc_free(tree);
+ talloc_free(mem_ctx);
+
+ return ret;
+}
+
struct torture_suite *torture_smb2_replay_init(void)
{
struct torture_suite *suite =
@@ -1971,9 +2442,11 @@ struct torture_suite *torture_smb2_replay_init(void)
torture_suite_add_1smb2_test(suite, "replay-dhv2-lease2", test_replay_dhv2_lease2);
torture_suite_add_1smb2_test(suite, "replay-dhv2-lease3", test_replay_dhv2_lease3);
torture_suite_add_1smb2_test(suite, "replay-dhv2-lease-oplock", test_replay_dhv2_lease_oplock);
+ torture_suite_add_1smb2_test(suite, "channel-sequence", test_channel_sequence);
torture_suite_add_1smb2_test(suite, "replay3", test_replay3);
torture_suite_add_1smb2_test(suite, "replay4", test_replay4);
torture_suite_add_1smb2_test(suite, "replay5", test_replay5);
+ torture_suite_add_1smb2_test(suite, "replay6", test_replay6);
suite->description = talloc_strdup(suite, "SMB2 REPLAY tests");
diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
index 34f81b6..330bbd0 100644
--- a/wscript_configure_system_mitkrb5
+++ b/wscript_configure_system_mitkrb5
@@ -117,6 +117,7 @@ conf.CHECK_FUNCS('''
krb5_keyblock_init krb5_principal_set_realm krb5_principal_get_type
krb5_principal_set_type
krb5_warnx
+ krb5_get_prompt_types
''',
lib='krb5 k5crypto')
conf.CHECK_DECLS('''krb5_get_credentials_for_user