[SCM] Samba Shared Repository - branch v4-2-test updated
Karolin Seeger
kseeger at samba.org
Wed May 20 08:34:08 MDT 2015
The branch, v4-2-test has been updated
via 60f1f76 libads: record service ticket endtime for sealed ldap connections
via 6db3de7 gencache: don't fail gencache_stabilize if there were records to delete.
via 691a887 s3: torture: Add regression test for bug #11249.
via 80db448 s3: smbd: VFS: fake_acl module called get_full_smb_filename() with a stream path, then used the result to call XATTR functions directly.
via 177d620 s3: smbd: VFS: For all EA and ACL calls use synthetic_smb_fname(), not synthetic_smb_fname_split().
via cf8235a s3: smbd: VFS: All the places that are currently calling vfs_stat_smb_fname() and vfs_lstat_smb_fname() should be calling vfs_stat_smb_basename().
via 87f2dd8 s3: smbd: VFS: Add vfs_stat_smb_basename() - to be called when we *know* stream name parsing has already been done.
via 86ed62a vfs_gpfs: move failure label before END_PROFILE
via 08a72cb vfp_gpfs: ensure END_PROFILE is always called
via c071f95 vfs_fruit: comment fix: the options are documented
via 37e5d67 vfs_fruit: add option "nfs_aces" that controls the NFS ACEs stuff
via ea27c56 s3:smbXsrv: refactor duplicate code into smbXsrv_session_clear_and_logoff()
via 688352c s3:selftest: run smb2.notify with --signing=required
via f8e64d7 s3:smb2_tcon: cancel pending requests on all connections on tdis
via abe61f4 s3:smb2_sesssetup: remove unused smbd_smb2_session_setup_* destructors
via 3a2b5ec s3:smb2_sesssetup: add smbd_smb2_session_setup_wrap_send/recv()
via 7a56711 s3:smb2_sesssetup: always assign smb2req->session when a session was created.
via b653861 s3:smb2_sesssetup: let smbd_smb2_logoff_* use smbXsrv_session_shutdown_*
via 6233772 s3:smbXsrv_session: cancel pending requests when we logoff a previous session
via 03263c7 s3:smbXsrv_session: add smb2srv_session_shutdown_send/recv helper functions
via 1340130 s3:smbXsrv_session: clear smb2req->session of pending requests in smbXsrv_session_logoff_all_callback()
via 72ceb73 s3:smbXsrv_session: clear smb2req->session of pending requests in smbXsrv_session_destructor()
via 09a5282 s4:torture/smb2: add smb2.notify.session-reconnect test
via 398400b s4:torture/smb2: add smb2.notify.invalid-reauth test
via e3bb691 s4:torture/smb2: add smb2.notify.close test
via ef5a649 s4:torture/smb2: verify STATUS_NOTIFY_CLEANUP return value
via 06a7050 s3:smbd: use STATUS_NOTIFY_CLEANUP on smb2 logoff (explicit and implicit) and tdis
via 26496f9 s3:smbd: use STATUS_NOTIFY_CLEANUP when closing a smb2 directory handle
via a4f1a49 s3:smbd: add a smbd_notify_cancel_by_map() helper function
from bd7bc99 s3: nmbd: Don't set work_changed = True inside update_server_ttl().
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-2-test
- Log -----------------------------------------------------------------
commit 60f1f761aa28e9ce891797afa40bd3e1af442a4d
Author: Uri Simchoni <urisimchoni at gmail.com>
Date: Sat May 9 22:59:17 2015 +0300
libads: record service ticket endtime for sealed ldap connections
When a ticket is obtained for binding a signed/sealed ldap connection,
its liftime should be recorded in the ads struct, in order to enable
reuse of the connection.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11267
Signed-off-by: Uri Simchoni <urisimchoni at gmail.com>
Reviewed-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Böhme <rb at sernet.de>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed May 13 04:32:16 CEST 2015 on sn-devel-104
(cherry picked from commit 40eac8e4d8bc85f2329b8ed6c5ba96a141dc20a3)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-2-test): Wed May 20 16:33:17 CEST 2015 on sn-devel-104
commit 6db3de71d373511d907ebcff50d77366bfc41d0b
Author: Michael Adam <obnox at samba.org>
Date: Wed Feb 4 14:47:20 2015 +0100
gencache: don't fail gencache_stabilize if there were records to delete.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11260
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 600b40db9d95c20c04fd517165dff81b20e35e8e)
commit 691a8875d7db5f0e55c1b70a467f7c20e4541d1b
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 1 21:08:21 2015 -0700
s3: torture: Add regression test for bug #11249.
Bug 11249 - Mangled names do not work with acl_xattr
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Tue May 5 16:37:18 CEST 2015 on sn-devel-104
(cherry picked from commit 9928d9832cccb11c4a605c5ce31be3af961c141f)
commit 80db4488051102e49430affb343735228d93d0d1
Author: Jeremy Allison <jra at samba.org>
Date: Mon May 4 19:56:39 2015 -0700
s3: smbd: VFS: fake_acl module called get_full_smb_filename() with a stream path, then used the result to call XATTR functions directly.
Ensure when pulling XATTR values, we don't allow a stream filename.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 0f23bf228ceb38b024a77fcf2916971ad4f6aa4d)
commit 177d620d13ffa11462b8832907118b7ed5f69ecf
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 1 21:06:20 2015 -0700
s3: smbd: VFS: For all EA and ACL calls use synthetic_smb_fname(), not synthetic_smb_fname_split().
EA's and ACL paths are all post-stream name checks (and shouldn't
get stream names). This one took a *long* time to find.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit ccb4f791fd19d9b3af79a205a15c0219ed7240ea)
commit cf8235a895fbb43bd0c458098ead9c57139aa9b2
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 1 13:09:36 2015 -0700
s3: smbd: VFS: All the places that are currently calling vfs_stat_smb_fname() and vfs_lstat_smb_fname() should be calling vfs_stat_smb_basename().
They are all post-stream name processing.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 14f4e254bb8d1f456ebb8da728f2fb812a9b3034)
commit 87f2dd82ee1d937aaeaa57f38d4598d860ebb46c
Author: Jeremy Allison <jra at samba.org>
Date: Fri May 1 12:50:51 2015 -0700
s3: smbd: VFS: Add vfs_stat_smb_basename() - to be called when we *know* stream name parsing has already been done.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11249
Signed-off-by: Jeremy Allison <jra at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Ralph Boehme <slow at samba.org>
(cherry picked from commit 044dabfd92d09de4f168a36a07ac3232f5647a1d)
commit 86ed62a0ccdd53564052f441a0c615a80bcef4c5
Author: Ralph Boehme <slow at samba.org>
Date: Thu Apr 30 12:29:57 2015 +0200
vfs_gpfs: move failure label before END_PROFILE
The label was added in 5e65ae14ddb74c648f31b4dfbacd4af9c02ca058 as part
of fix for bug 11244, but was wrongly placed behind END_PROFILE.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11244
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Thu May 7 19:22:00 CEST 2015 on sn-devel-104
(cherry picked from commit 3876e59826ad17466975ae9e9a65879c76737b2b)
commit 08a72cb73acd6a7a20e133d451af07478a59733b
Author: Ralph Boehme <slow at samba.org>
Date: Wed Apr 29 20:48:08 2015 +0200
vfp_gpfs: ensure END_PROFILE is always called
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11244
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Christof Schmitt <cs at samba.org>
Autobuild-User(master): Ralph Böhme <slow at samba.org>
Autobuild-Date(master): Thu Apr 30 19:34:41 CEST 2015 on sn-devel-104
(cherry picked from commit 5e65ae14ddb74c648f31b4dfbacd4af9c02ca058)
commit c071f959bc99af579ba064654a69cfb78a3e99f2
Author: Ralph Boehme <slow at samba.org>
Date: Wed Mar 25 12:56:07 2015 +0100
vfs_fruit: comment fix: the options are documented
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri May 8 21:27:45 CEST 2015 on sn-devel-104
(cherry picked from commit fe93f7d677995c41e15d4af68b4ec064796a4d5b)
commit 37e5d67b35973906315259acf2242ad1ee890892
Author: Ralph Boehme <slow at samba.org>
Date: Wed Mar 25 15:09:02 2015 +0100
vfs_fruit: add option "nfs_aces" that controls the NFS ACEs stuff
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11213
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 1b8a0e6a26bc212905a160c32b936ef0ea24c0b2)
commit ea27c56b37ac37ddf5b4348a9027bd8c2e5baea2
Author: Michael Adam <obnox at samba.org>
Date: Wed May 6 17:20:55 2015 +0200
s3:smbXsrv: refactor duplicate code into smbXsrv_session_clear_and_logoff()
This replaces code in smbXsrv_session_logoff_all_callback()
and smbXsrv_session_clear_and_logoff().
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Autobuild-User(master): Michael Adam <obnox at samba.org>
Autobuild-Date(master): Thu May 7 10:43:29 CEST 2015 on sn-devel-104
(cherry picked from commit c7fcab7999c763acbc0f9dadb7fe05b47a257c7a)
commit 688352c9a99f3719b0ee375680e4bfec25f1f1b4
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:26:41 2015 +0200
s3:selftest: run smb2.notify with --signing=required
This reproduces a bug withe implicit canceled requests.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit f8e64d702e1159c7aa89b3ae12ea8f156ddd95a4
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 16:50:55 2015 +0200
s3:smb2_tcon: cancel pending requests on all connections on tdis
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit f71941491bbba20f394bd2f44425d7c21e90ba92)
commit abe61f479ffff87c04832b541badf167632a8bf9
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:29:03 2015 +0200
s3:smb2_sesssetup: remove unused smbd_smb2_session_setup_* destructors
The cleanup of a failing session setup is now handled in
smbd_smb2_session_setup_wrap_*().
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 5871d3da871349cba058bb91218ae58107cf05c8)
commit 3a2b5ec5ad5ed05800d49b93ff93e5f826a63e56
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:21:25 2015 +0200
s3:smb2_sesssetup: add smbd_smb2_session_setup_wrap_send/recv()
The wrapper calls smbXsrv_session_shutdown_send/recv() in case of an error,
this makes sure a failing reauth shuts down the session like an explicit logoff.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 50aeb6b38b14d6c26229834ece3c32eb50f9e56a)
commit 7a5671170a92e1a725ff0d1ee8d7c561668fb777
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:27:26 2015 +0200
s3:smb2_sesssetup: always assign smb2req->session when a session was created.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 8f0d4d1132b74615dc6198ab736590dec52effda)
commit b653861c7449294bdfed20f511b508e5aeac3748
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:20:06 2015 +0200
s3:smb2_sesssetup: let smbd_smb2_logoff_* use smbXsrv_session_shutdown_*
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 95057fe375348b918cb2ca58109f4c110a4a5f77)
commit 62337720938f255750f3c7418efe9999fddf441f
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:13:27 2015 +0200
s3:smbXsrv_session: cancel pending requests when we logoff a previous session
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit cc9d52e10f4f1b192171e03674061d4e8e6bcc84)
commit 03263c74b6bbc73457e75c57d38494bf3ee98c6b
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 09:57:03 2015 +0200
s3:smbXsrv_session: add smb2srv_session_shutdown_send/recv helper functions
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 4fceb4531ccd6bb1fd6ebd7b6eb5b894959bc010)
commit 1340130dab57ce1801ff7984045527ded83bf947
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:17:34 2015 +0200
s3:smbXsrv_session: clear smb2req->session of pending requests in smbXsrv_session_logoff_all_callback()
smbXsrv_session_logoff_all_callback() is called when the last transport
connection is gone, which means we won't need to sign any response...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit b6c34a07760141bda3e78624d62eb556bb70da65)
commit 72ceb73ec8498f1cfb89f428891026bf6b6b366c
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 16:09:40 2015 +0200
s3:smbXsrv_session: clear smb2req->session of pending requests in smbXsrv_session_destructor()
This won't be needed typically needed as the caller is supposted to cancel
the requests already, but this makes sure we don't keep dangling pointers.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 7fea42110596e8e9da0155d726aaa72223107fbd)
commit 09a52822910d959d4159d0182486d5572a6124fa
Author: Stefan Metzmacher <metze at samba.org>
Date: Sat May 2 09:57:03 2015 +0200
s4:torture/smb2: add smb2.notify.session-reconnect test
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit f435c89d61385272bf5b79f82f6e1373908d2b94)
commit 398400b584dcfb4940031676654dacc1fee3f726
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:20:50 2015 +0200
s4:torture/smb2: add smb2.notify.invalid-reauth test
An invalid reauth closes the session.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit a8ec77e86b17213eeb6a51a835639d79e9486223)
commit e3bb691772bf15c931e3c89b4df07620fb397336
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:20:50 2015 +0200
s4:torture/smb2: add smb2.notify.close test
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 44f9e1052de81a0a3052997e7e19a01813fbec43)
commit ef5a64931ed5850ab97201534b08dcdb1a2c9872
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:19:42 2015 +0200
s4:torture/smb2: verify STATUS_NOTIFY_CLEANUP return value
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 4bfa6b024e530694741c7c07171fa09762578389)
commit 06a7050f9f7573ad796447eadf29396aa99ebcb6
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:02:38 2015 +0200
s3:smbd: use STATUS_NOTIFY_CLEANUP on smb2 logoff (explicit and implicit) and tdis
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 5169e9b20c69092d04b596f48ca0e69a46af438f)
commit 26496f9aa0385eab66f300176904a82d049f7f30
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:02:38 2015 +0200
s3:smbd: use STATUS_NOTIFY_CLEANUP when closing a smb2 directory handle
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit a5981d137461e5715c92a4fb4cdeaa650f34e999)
commit a4f1a49604288d7680858e912faeb6e7915dce39
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 1 20:04:55 2015 +0200
s3:smbd: add a smbd_notify_cancel_by_map() helper function
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182
Signed-off-by: Stefan Metzmacher <metze at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit 2c47fb16089602a42f62124520e58bdcd8c7d053)
-----------------------------------------------------------------------
Summary of changes:
docs-xml/manpages/vfs_fruit.8.xml | 9 +
selftest/knownfail | 1 -
selftest/target/Samba3.pm | 13 ++
source3/lib/gencache.c | 2 +-
source3/libads/sasl.c | 23 ++
source3/modules/nfs4_acls.c | 4 +-
source3/modules/non_posix_acls.c | 2 +-
source3/modules/vfs_acl_common.c | 19 +-
source3/modules/vfs_acl_tdb.c | 16 +-
source3/modules/vfs_fake_acls.c | 22 +-
source3/modules/vfs_fruit.c | 11 +-
source3/modules/vfs_gpfs.c | 15 +-
source3/modules/vfs_recycle.c | 2 +-
source3/modules/vfs_solarisacl.c | 2 +-
source3/modules/vfs_xattr_tdb.c | 4 +-
source3/script/tests/test_smbclient_s3.sh | 38 ++++
source3/selftest/tests.py | 3 +
source3/smbd/close.c | 15 +-
source3/smbd/globals.h | 5 +
source3/smbd/notify.c | 33 ++-
source3/smbd/posix_acls.c | 2 +-
source3/smbd/proto.h | 2 +
source3/smbd/smb2_sesssetup.c | 361 ++++++++++++++++--------------
source3/smbd/smb2_tcon.c | 66 +++---
source3/smbd/smbXsrv_session.c | 202 ++++++++++++++++-
source3/smbd/vfs.c | 26 +++
source4/torture/smb2/notify.c | 235 +++++++++++++++++++
27 files changed, 873 insertions(+), 260 deletions(-)
Changeset truncated at 500 lines:
diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml
index a9e2e6d..4e296a4 100644
--- a/docs-xml/manpages/vfs_fruit.8.xml
+++ b/docs-xml/manpages/vfs_fruit.8.xml
@@ -188,6 +188,15 @@
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>fruit:nfs_aces = yes | no</term>
+ <listitem>
+ <para>Whether support for querying and modifying the
+ UNIX mode of directory entries via NFS ACEs is enabled,
+ default <emphasis>yes</emphasis>.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
diff --git a/selftest/knownfail b/selftest/knownfail
index 2c35a58..febbd2e 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -188,7 +188,6 @@
^samba3.smb2.create.blob
^samba3.smb2.create.open
^samba3.smb2.notify.valid-req
-^samba3.smb2.notify.dir
^samba3.smb2.notify.rec
^samba3.smb2.durable-open.delete_on_close2
^samba3.smb2.durable-v2-open.app-instance
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index d8eb58c..09e6e2c 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -882,6 +882,9 @@ sub provision($$$$$$)
my $lease2_shrdir="$shrdir/SMB3_00";
push(@dirs,$lease2_shrdir);
+ my $manglenames_shrdir="$shrdir/manglenames";
+ push(@dirs,$manglenames_shrdir);
+
# this gets autocreated by winbindd
my $wbsockdir="$prefix_abs/winbindd";
my $wbsockprivdir="$lockdir/winbindd_privileged";
@@ -964,6 +967,12 @@ sub provision($$$$$$)
close(BADNAME_TARGET);
chmod 0666, $badname_target;
+ ##
+ ## create mangleable directory names in $manglenames_shrdir
+ ##
+ my $manglename_target = "$manglenames_shrdir/foo:bar";
+ mkdir($manglename_target, 0777);
+
my $conffile="$libdir/server.conf";
my $nss_wrapper_pl = "$ENV{PERL} $self->{srcdir}/lib/nss_wrapper/nss_wrapper.pl";
@@ -1232,6 +1241,10 @@ sub provision($$$$$$)
path = $badnames_shrdir
guest ok = yes
+[manglenames_share]
+ path = $manglenames_shrdir
+ guest ok = yes
+
[dynamic_share]
path = $shrdir/%R
guest ok = yes
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index ec96f5a..f09a816 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -681,7 +681,7 @@ bool gencache_stabilize(void)
}
res = tdb_traverse(cache_notrans->tdb, wipe_fn, NULL);
- if (res != 0) {
+ if (res < 0) {
DEBUG(10, ("tdb_traverse with wipe_fn on gencache_notrans.tdb "
"failed: %s\n",
tdb_errorstr_compat(cache_notrans->tdb)));
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 8a9e157..ea0b821 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -458,6 +458,8 @@ static ADS_STATUS ads_sasl_spnego_gsskrb5_bind(ADS_STRUCT *ads, const gss_name_t
DATA_BLOB unwrapped;
DATA_BLOB wrapped;
struct berval cred, *scred = NULL;
+ uint32_t context_validity = 0;
+ time_t context_endtime = 0;
status = ads_init_gssapi_cred(ads, &gss_cred);
if (!ADS_ERR_OK(status)) {
@@ -652,6 +654,26 @@ static ADS_STATUS ads_sasl_spnego_gsskrb5_bind(ADS_STRUCT *ads, const gss_name_t
goto failed;
}
+ gss_rc =
+ gss_context_time(&minor_status, context_handle, &context_validity);
+ if (gss_rc == GSS_S_COMPLETE) {
+ if (context_validity != 0) {
+ context_endtime = time(NULL) + context_validity;
+ DEBUG(10, ("context (service ticket) valid for "
+ "%u seconds\n",
+ context_validity));
+ } else {
+ DEBUG(10, ("context (service ticket) expired\n"));
+ }
+ } else {
+ DEBUG(1, ("gss_context_time failed (%d,%u) -"
+ " this will be a one-time context\n",
+ gss_rc, minor_status));
+ if (gss_rc == GSS_S_CONTEXT_EXPIRED) {
+ DEBUG(10, ("context (service ticket) expired\n"));
+ }
+ }
+
if (ads->ldap.wrap_type > ADS_SASLWRAP_TYPE_PLAIN) {
uint32 max_msg_size = ADS_SASL_WRAPPING_OUT_MAX_WRAPPED;
@@ -677,6 +699,7 @@ static ADS_STATUS ads_sasl_spnego_gsskrb5_bind(ADS_STRUCT *ads, const gss_name_t
context_handle = GSS_C_NO_CONTEXT;
}
+ ads->auth.tgs_expire = context_endtime;
status = ADS_SUCCESS;
failed:
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 1aa819a..c556b03 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -316,9 +316,9 @@ static int smbacl4_GetFileOwner(struct connection_struct *conn,
memset(psbuf, 0, sizeof(SMB_STRUCT_STAT));
/* Get the stat struct for the owner info. */
- if (vfs_stat_smb_fname(conn, filename, psbuf) != 0)
+ if (vfs_stat_smb_basename(conn, filename, psbuf) != 0)
{
- DEBUG(8, ("vfs_stat_smb_fname failed with error %s\n",
+ DEBUG(8, ("vfs_stat_smb_basename failed with error %s\n",
strerror(errno)));
return -1;
}
diff --git a/source3/modules/non_posix_acls.c b/source3/modules/non_posix_acls.c
index b1c2420..fca9979 100644
--- a/source3/modules/non_posix_acls.c
+++ b/source3/modules/non_posix_acls.c
@@ -32,7 +32,7 @@ int non_posix_sys_acl_blob_get_file_helper(vfs_handle_struct *handle,
struct xattr_sys_acl_hash_wrapper acl_wrapper = {};
struct smb_filename *smb_fname;
- smb_fname = synthetic_smb_fname_split(frame, path_p, NULL);
+ smb_fname = synthetic_smb_fname(frame, path_p, NULL, NULL);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
errno = ENOMEM;
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 920c811..625e7cb 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -620,7 +620,24 @@ static NTSTATUS get_nt_acl_internal(vfs_handle_struct *handle,
}
psbuf = &fsp->fsp_name->st;
} else {
- int ret = vfs_stat_smb_fname(handle->conn,
+ /*
+ * https://bugzilla.samba.org/show_bug.cgi?id=11249
+ *
+ * We are currently guaranteed that 'name' here is
+ * a smb_fname->base_name, which *cannot* contain
+ * a stream name (':'). vfs_stat_smb_fname() splits
+ * a name into a base name + stream name, which
+ * when we get here we know we've already done.
+ * So we have to call the stat or lstat VFS
+ * calls directly here. Else, a base_name that
+ * contains a ':' (from a demangled name) will
+ * get split again.
+ *
+ * FIXME.
+ * This uglyness will go away once smb_fname
+ * is fully plumbed through the VFS.
+ */
+ int ret = vfs_stat_smb_basename(handle->conn,
name,
&sbuf);
if (ret == -1) {
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 8ee4bd5..e02993b 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -159,7 +159,7 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
status = vfs_stat_fsp(fsp);
sbuf = fsp->fsp_name->st;
} else {
- int ret = vfs_stat_smb_fname(handle->conn, name, &sbuf);
+ int ret = vfs_stat_smb_basename(handle->conn, name, &sbuf);
if (ret == -1) {
status = map_nt_error_from_unix(errno);
}
@@ -282,12 +282,7 @@ static int rmdir_acl_tdb(vfs_handle_struct *handle, const char *path)
struct db_context *db = acl_db;
int ret = -1;
- if (lp_posix_pathnames()) {
- ret = vfs_lstat_smb_fname(handle->conn, path, &sbuf);
- } else {
- ret = vfs_stat_smb_fname(handle->conn, path, &sbuf);
- }
-
+ ret = vfs_stat_smb_basename(handle->conn, path, &sbuf);
if (ret == -1) {
return -1;
}
@@ -347,12 +342,7 @@ static int sys_acl_set_file_tdb(vfs_handle_struct *handle,
struct db_context *db = acl_db;
int ret = -1;
- if (lp_posix_pathnames()) {
- ret = vfs_lstat_smb_fname(handle->conn, path, &sbuf);
- } else {
- ret = vfs_stat_smb_fname(handle->conn, path, &sbuf);
- }
-
+ ret = vfs_stat_smb_basename(handle->conn, path, &sbuf);
if (ret == -1) {
return -1;
}
diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c
index 0e7ebb9..3887e86 100644
--- a/source3/modules/vfs_fake_acls.c
+++ b/source3/modules/vfs_fake_acls.c
@@ -115,8 +115,16 @@ static int fake_acls_stat(vfs_handle_struct *handle,
if (ret == 0) {
TALLOC_CTX *frame = talloc_stackframe();
char *path;
+ struct smb_filename smb_fname_base = {
+ .base_name = smb_fname->base_name
+ };
NTSTATUS status;
- status = get_full_smb_filename(frame, smb_fname, &path);
+ /*
+ * As we're calling getxattr directly here
+ * we need to use only the base_name, not
+ * the full name containing any stream name.
+ */
+ status = get_full_smb_filename(frame, &smb_fname_base, &path);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
TALLOC_FREE(frame);
@@ -148,8 +156,16 @@ static int fake_acls_lstat(vfs_handle_struct *handle,
if (ret == 0) {
TALLOC_CTX *frame = talloc_stackframe();
char *path;
+ struct smb_filename smb_fname_base = {
+ .base_name = smb_fname->base_name
+ };
NTSTATUS status;
- status = get_full_smb_filename(frame, smb_fname, &path);
+ /*
+ * As we're calling getxattr directly here
+ * we need to use only the base_name, not
+ * the full name containing any stream name.
+ */
+ status = get_full_smb_filename(frame, &smb_fname_base, &path);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
TALLOC_FREE(frame);
@@ -348,7 +364,7 @@ static int fake_acls_sys_acl_delete_def_file(vfs_handle_struct *handle, const ch
TALLOC_CTX *frame = talloc_stackframe();
struct smb_filename *smb_fname;
- smb_fname = synthetic_smb_fname_split(frame, path, NULL);
+ smb_fname = synthetic_smb_fname(frame, path, NULL, NULL);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
errno = ENOMEM;
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 980cbc4..adf283b 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -127,7 +127,7 @@ struct fruit_config_data {
bool unix_info_enabled;
/*
- * Additional undocumented options, all enabled by default,
+ * Additional options, all enabled by default,
* possibly useful for analyzing performance. The associated
* operations with each of them may be expensive, so having
* the chance to disable them individually gives a chance
@@ -1336,6 +1336,10 @@ static int init_fruit_config(vfs_handle_struct *handle)
config->use_aapl = true;
}
+ if (lp_parm_bool(-1, FRUIT_PARAM_TYPE_NAME, "nfs_aces", true)) {
+ config->unix_info_enabled = true;
+ }
+
if (lp_parm_bool(SNUM(handle->conn),
"readdir_attr", "aapl_rsize", true)) {
config->readdir_attr_rsize = true;
@@ -1829,8 +1833,9 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle,
* The client doesn't set the flag, so we can't check
* for it and just set it unconditionally
*/
- server_caps |= SMB2_CRTCTX_AAPL_SUPPORTS_NFS_ACE;
- config->unix_info_enabled = true;
+ if (config->unix_info_enabled) {
+ server_caps |= SMB2_CRTCTX_AAPL_SUPPORTS_NFS_ACE;
+ }
SBVAL(p, 0, server_caps);
ok = data_blob_append(req, &blob, p, 8);
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index e1e29fa..4d64983 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -78,8 +78,6 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
struct gpfs_config_data *config;
int ret = 0;
- START_PROFILE(syscall_kernel_flock);
-
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct gpfs_config_data,
return -1);
@@ -98,6 +96,8 @@ static int vfs_gpfs_kernel_flock(vfs_handle_struct *handle, files_struct *fsp,
return 0;
}
+ START_PROFILE(syscall_kernel_flock);
+
kernel_flock(fsp->fh->fd, share_mode, access_mask);
if (!set_gpfs_sharemode(fsp, access_mask, fsp->share_access)) {
@@ -131,14 +131,16 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
struct gpfs_config_data *config;
int ret=0;
- START_PROFILE(syscall_linux_setlease);
-
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct gpfs_config_data,
return -1);
- if (linux_set_lease_sighandler(fsp->fh->fd) == -1)
- return -1;
+ START_PROFILE(syscall_linux_setlease);
+
+ if (linux_set_lease_sighandler(fsp->fh->fd) == -1) {
+ ret = -1;
+ goto failure;
+ }
if (config->leases) {
/*
@@ -150,6 +152,7 @@ static int vfs_gpfs_setlease(vfs_handle_struct *handle, files_struct *fsp,
unbecome_root();
}
+failure:
END_PROFILE(syscall_linux_setlease);
return ret;
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index 00d7f34..9af78fd 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -188,7 +188,7 @@ static bool recycle_directory_exist(vfs_handle_struct *handle, const char *dname
{
SMB_STRUCT_STAT st;
- if (vfs_stat_smb_fname(handle->conn, dname, &st) == 0) {
+ if (vfs_stat_smb_basename(handle->conn, dname, &st) == 0) {
if (S_ISDIR(st.st_ex_mode)) {
return True;
}
diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c
index 9b3c4f6..efd2d75 100644
--- a/source3/modules/vfs_solarisacl.c
+++ b/source3/modules/vfs_solarisacl.c
@@ -167,7 +167,7 @@ int solarisacl_sys_acl_set_file(vfs_handle_struct *handle,
* that has not been specified in "type" from the file first
* and concatenate it with the acl provided.
*/
- if (vfs_stat_smb_fname(handle->conn, name, &s) != 0) {
+ if (vfs_stat_smb_basename(handle->conn, name, &s) != 0) {
DEBUG(10, ("Error in stat call: %s\n", strerror(errno)));
goto done;
}
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 63a12fd..2124d38 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -37,7 +37,7 @@ static int xattr_tdb_get_file_id(struct vfs_handle_struct *handle,
TALLOC_CTX *frame = talloc_stackframe();
struct smb_filename *smb_fname;
- smb_fname = synthetic_smb_fname_split(frame, path, NULL);
+ smb_fname = synthetic_smb_fname(frame, path, NULL, NULL);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
errno = ENOMEM;
@@ -414,7 +414,7 @@ static int xattr_tdb_rmdir(vfs_handle_struct *handle, const char *path)
TALLOC_FREE(frame); return -1;
});
- if (vfs_stat_smb_fname(handle->conn, path, &sbuf) == -1) {
+ if (vfs_stat_smb_basename(handle->conn, path, &sbuf) == -1) {
TALLOC_FREE(frame);
return -1;
}
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index f6f3705..e79228f 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -863,6 +863,40 @@ test_bad_names()
fi
}
+# Test accessing an share with a name that must be mangled - with acl_xattrs.
+# We know foo:bar gets mangled to FF4GBY~Q with the default name-mangling algorithm (hash2).
+test_mangled_names()
+{
+ tmpfile=$PREFIX/smbclient_interactive_prompt_commands
+ cat > $tmpfile <<EOF
+ls
+cd FF4GBY~Q
+ls
+quit
+EOF
+ cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/manglenames_share -I $SERVER_IP $ADDARGS < $tmpfile 2>&1'
+ eval echo "$cmd"
+ out=`eval $cmd`
+ ret=$?
+ rm -f $tmpfile
+
+ if [ $ret != 0 ] ; then
+ echo "$out"
+ echo "failed accessing manglenames_share with error $ret"
+ false
+ return
+ fi
+
+ echo "$out" | grep 'NT_STATUS'
+ ret=$?
+ if [ $ret == 0 ] ; then
+ echo "$out"
+ echo "failed - NT_STATUS_XXXX listing \\manglenames_share\\FF4GBY~Q"
+ false
+ fi
+}
+
+
LOGDIR_PREFIX=test_smbclient_s3
# possibly remove old logdirs:
@@ -942,6 +976,10 @@ testit "list a share with bad names (won't convert)" \
test_bad_names || \
failed=`expr $failed + 1`
+testit "list a share with a mangled name + acl_xattr object" \
+ test_mangled_names || \
+ failed=`expr $failed + 1`
+
testit "rm -rf $LOGDIR" \
rm -rf $LOGDIR || \
failed=`expr $failed + 1`
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 40599c3..476652e 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -372,6 +372,9 @@ for t in tests:
elif t == "vfs.fruit":
plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share1=vfs_fruit --option=torture:share2=tmp --option=torture:localdir=$SELFTEST_PREFIX/s3dc/share')
plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --option=torture:share1=vfs_fruit --option=torture:share2=tmp --option=torture:localdir=$SELFTEST_PREFIX/plugin_s4_dc/share')
+ elif t == "smb2.notify":
+ plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD --signing=required')
+ plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD --signing=required')
else:
plansmbtorture4testsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
plansmbtorture4testsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 4fbd442f..fc1d380 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -1050,6 +1050,13 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
NTSTATUS status1 = NT_STATUS_OK;
const struct security_token *del_nt_token = NULL;
const struct security_unix_token *del_token = NULL;
+ NTSTATUS notify_status;
+
+ if (fsp->conn->sconn->using_smb2) {
+ notify_status = STATUS_NOTIFY_CLEANUP;
+ } else {
+ notify_status = NT_STATUS_OK;
+ }
--
Samba Shared Repository
More information about the samba-cvs
mailing list