[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Mon Jun 25 14:43:02 MDT 2012
The branch, master has been updated
via 5c31e5d s3:selftest: run SMB2-SESSION-RECONNECT
via fbad41b selftest/known: samba3.smb2.session.*reconnect passes now
via 45cd2bc s3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv
via 299b63f s3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE
via 8acf6c9 s3:smbXsrv_session: add smb2srv_session_close_previous_send/recv
via 9f2c89c s3:smbXsrv.idl: add smbXsrv_session_close*
via da40aa0 s3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE
via ed75069 s3:smb2_sesssetup: inline gensec_session_info() call
via 1b8bcae s3:smb2_sesssetup: make use of gensec_update_send/recv
via f32e99a s3:smb2_sesssetup: inline most of smbd_smb2_session_setup()
via ed96b39 s3:selftest: run raw.session
via c0b9fa8 s3:selftest: run rpc.samba3.smb-reauth1 and rpc.samba3.smb-reauth2
via e770002 s3:smbd/sesssetup: implement dynamic re-authentication and expire session if client supports it
via 842f1c8 s3:selftest: run smbtorture3 SMB2-SESSION-REAUTH
via ce22037 s3:selftest: run smb2.session as ntlm and krb5
via 500e646 selftest/knownfail: only reauth5 still fails
via d2e1058 s3:smb2_sesssetup: implement dynamic re-authentication and expire sessions
via f3c606b docs-xml: document "server max protocol" SMB3 and SMB3_00
via 6aec0ce docs-xml: fix reference from "server min protocol" to "server max protocol"
via 9146e56 selftest/Samba3: 'server max protocol = SMB3'
via 9798149 lib/param: add "SMB3" as alias for PROTOCOL_SMB3_00
via 9854ed6 s3:smbd: remove now unused invalidate_all_vuids()
via 77d1173 s3:smbd: remove now unused conn_close_all()
via d693ff5 s3:smbd: use smbXsrv_session_logoff_all() and smb1srv_tcon_disconnect_all() in exit_server_common()
via a129e27 s3:smbd: make use of smbXsrv_session for smb1
via faa8edc s3:smbd: make use of smbXsrv_tcon for smb1
via 463b308 s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2
via ef408e5 s3:smb2_sesssetup: add support for SMB 2.24/3.00 signing
via 02d206e s3:smb2_sesssetup: make use of the smbXsrv_session infrastructure
via 1fffd35 s3:smbXsrv_session: init and disconnect smbXsrv_tcon for SMB2/3
via c36bd67 s3:smbd: add smbXsrv_tcon infrastructure
via 80f9abf s3:smbXsrv.idl: add smbXsrv_tcon* structures
via f3dce4c sq smbXsrv_session_global_store no connection
via 85f8c14 s3:smbd: add smbXsrv_session infrastructure
via 5b3c07f s3:smbXsrv.idl: add smbXsrv_session* structures
via 130436f s3:smbd: add smbXsrv_version_* infrastructure
via e098060 s3:librpc/idl/smbXsrv.idl: add smbXsrv_version_* structures
via 47ddfe2 s3:librpc: add smbXsrv.idl
from cf244a1 s3:test: make shell code more porable by elimnating "local" keyword
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5c31e5d553c9db748e0ca83b83bf9f0ca3261440
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 22 14:08:30 2012 +0200
s3:selftest: run SMB2-SESSION-RECONNECT
metze
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Mon Jun 25 22:42:03 CEST 2012 on sn-devel-104
commit fbad41b1a4e8d7da59507c0e15ec2a04879925e8
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 22 14:26:42 2012 +0200
selftest/known: samba3.smb2.session.*reconnect passes now
metze
commit 45cd2bc2b33230b69eeaa6f82be6f7af36770f0a
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu May 17 00:32:40 2012 +0200
s3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv
metze
commit 299b63f8759c39cfda1d936dea154d085ca3264e
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon May 14 16:17:49 2012 +0200
s3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE
metze
commit 8acf6c90bdf2a2888c99d5216ef99a63c512292f
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Apr 17 20:39:58 2012 +0200
s3:smbXsrv_session: add smb2srv_session_close_previous_send/recv
metze
commit 9f2c89cbeaf98ee5041156a525c561dbc9536a1f
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 11 19:29:25 2012 +0200
s3:smbXsrv.idl: add smbXsrv_session_close*
metze
commit da40aa0e6839022f99786bd003bcd4ec587b4196
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Apr 18 12:44:12 2012 +0200
s3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE
metze
commit ed750694607827a3d35ad0980c3aad4a406108d0
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu May 17 00:30:43 2012 +0200
s3:smb2_sesssetup: inline gensec_session_info() call
metze
commit 1b8bcaeda3ea1b292c8b9a5a6c1a25e0d40aa2b6
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed May 16 16:05:48 2012 +0200
s3:smb2_sesssetup: make use of gensec_update_send/recv
metze
commit f32e99a0fc754916e611a90933b7874d7502db50
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed May 16 15:56:15 2012 +0200
s3:smb2_sesssetup: inline most of smbd_smb2_session_setup()
metze
commit ed96b397f74b3893e56065dd348fbcfd7a08fc50
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 22 12:11:43 2012 +0200
s3:selftest: run raw.session
Note: raw.session.reauth2 still fails:
failure: samba3.raw.session.reauth2(s3dc) [
_StringException: _StringException: ../source4/torture/raw/session.c:186: status
was NT_STATUS_ACCESS_DENIED, expected NT_STATUS_OK: 2nd open failed
But it's not critical as real clients won't reauth as anonymous.
metze
commit c0b9fa8b2cfdef6327bdb99de03a57a3b91c256f
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 22 13:06:41 2012 +0200
s3:selftest: run rpc.samba3.smb-reauth1 and rpc.samba3.smb-reauth2
metze
commit e77000259c9ccd8762f8b752555ff92c8fc41559
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Apr 25 19:36:20 2012 +0200
s3:smbd/sesssetup: implement dynamic re-authentication and expire session if client supports it
metze
commit 842f1c85b67b7a621a1ed98260809be85300494c
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 22 13:06:01 2012 +0200
s3:selftest: run smbtorture3 SMB2-SESSION-REAUTH
metze
commit ce2203762132391e8df117b89c9ad45b57c2143d
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Jun 22 13:03:16 2012 +0200
s3:selftest: run smb2.session as ntlm and krb5
This activates the smb2.session.expire1 test, when krb5 is used.
metze
commit 500e646e2d5ed7a10211ab2309f1f800560918e9
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu May 17 19:28:06 2012 +0200
selftest/knownfail: only reauth5 still fails
metze
commit d2e1058f42ad544dfeebfa80b4695cec6f46f00c
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon May 14 14:24:08 2012 +0200
s3:smb2_sesssetup: implement dynamic re-authentication and expire sessions
metze
commit f3c606b13178c56bd82aaef2a3c022d2bf8b195b
Author: Stefan Metzmacher <metze at samba.org>
Date: Sun Jun 3 23:09:33 2012 +0200
docs-xml: document "server max protocol" SMB3 and SMB3_00
metze
commit 6aec0ce288c36581d6e9911781892bc3dae5e674
Author: Stefan Metzmacher <metze at samba.org>
Date: Sun Jun 3 23:12:57 2012 +0200
docs-xml: fix reference from "server min protocol" to "server max protocol"
metze
commit 9146e56ebb414f48739238f8eab17f8565f7efc9
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri May 18 10:43:18 2012 +0200
selftest/Samba3: 'server max protocol = SMB3'
metze
commit 97981491ebb282730045ac5f3bbc893805232cc3
Author: Stefan Metzmacher <metze at samba.org>
Date: Sun Jun 3 23:03:54 2012 +0200
lib/param: add "SMB3" as alias for PROTOCOL_SMB3_00
metze
commit 9854ed6d0115d4a4ef562ccf87b879082eb480bb
Author: Stefan Metzmacher <metze at samba.org>
Date: Sun Jun 3 17:02:16 2012 +0200
s3:smbd: remove now unused invalidate_all_vuids()
Pair-Programmed-With: Michael Adam <obnox at samba.org>
metze
commit 77d1173aa2a74644ced83cd37ceb3481530670e6
Author: Michael Adam <obnox at samba.org>
Date: Tue May 22 13:23:13 2012 +0200
s3:smbd: remove now unused conn_close_all()
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
commit d693ff54dbb3fa7ab44034775de1609f419ac879
Author: Michael Adam <obnox at samba.org>
Date: Tue May 22 13:18:06 2012 +0200
s3:smbd: use smbXsrv_session_logoff_all() and smb1srv_tcon_disconnect_all() in exit_server_common()
This removes the use of conn_close_all() and invalidate_all_vuids()
Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
commit a129e271b5385853fb39a8e54b56b508b00a3e41
Author: Stefan Metzmacher <metze at samba.org>
Date: Sun Apr 1 21:19:53 2012 +0200
s3:smbd: make use of smbXsrv_session for smb1
Pair-Programmed-With: Michael Adam <obnox at samba.org>
metze
commit faa8edccef556fb281d24b76b9739c994128f6ef
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Mar 28 16:14:09 2012 +0200
s3:smbd: make use of smbXsrv_tcon for smb1
Pair-Programmed-With: Michael Adam <obnox at samba.org>
metze
commit 463b308f16733b5a0bd896c46347d39064cee170
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Mar 27 11:09:05 2012 +0200
s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2
The removes the protocol specific smbd_smb2_session and
smbd_smb2_tcon.
Pair-Programmed-With: Michael Adam <obnox at samba.org>
metze
commit ef408e5068255449eda9b4fc5c483713e91e560d
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Mar 16 15:01:27 2012 +0100
s3:smb2_sesssetup: add support for SMB 2.24/3.00 signing
metze
commit 02d206ee64d8b08d40204a948b696bf0b4156c5b
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Mar 16 15:01:27 2012 +0100
s3:smb2_sesssetup: make use of the smbXsrv_session infrastructure
We still have smbd_smb2_session as primary structure,
but that will went away once we got rid of smbd_smb2_tcon.
metze
commit 1fffd35692c58349267079f770ced1eb33201553
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 4 10:30:27 2012 +0200
s3:smbXsrv_session: init and disconnect smbXsrv_tcon for SMB2/3
metze
commit c36bd677f325f052869418d3e74811e86567d206
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Mar 16 16:32:28 2012 +0100
s3:smbd: add smbXsrv_tcon infrastructure
Pair-Programmed-With: Michael Adam <obnox at samba.org>
metze
commit 80f9abf637c0959666b6d8d79dd8efb4115a1f3f
Author: Stefan Metzmacher <metze at samba.org>
Date: Fri Mar 16 16:18:40 2012 +0100
s3:smbXsrv.idl: add smbXsrv_tcon* structures
struct smbXsrv_tcon will represent a SMB 1 or SMB 2
tree connect. It will replace 'struct smbd_smb2_tcon' and
'connection_struct' will be changed to handle just the protocol
independent glue for the SMB_VFS layer.
metze
commit f3dce4cc9526840ec0d9b451b36e08525f06041b
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 25 09:17:40 2012 +0200
sq smbXsrv_session_global_store no connection
commit 85f8c14f3084121f58f31ebd11d80bfa01c8d6ce
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Dec 15 14:45:56 2011 +0100
s3:smbd: add smbXsrv_session infrastructure
Pair-Programmed-With: Michael Adam <obnox at samba.org>
metze
commit 5b3c07fa898604791401050f1772844ef2ac622a
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Dec 15 14:45:56 2011 +0100
s3:smbXsrv.idl: add smbXsrv_session* structures
struct smbXsrv_session will represent a SMB 1 or SMB 2
session. It will replace 'struct smbd_smb2_session' and
'user_struct' will be changed to handle just the protocol
independent glue for the SMB_VFS layer.
metze
commit 130436f2fcb7926ad5b27b4255700082ee3ece76
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue May 8 16:01:21 2012 +0200
s3:smbd: add smbXsrv_version_* infrastructure
metze
commit e09806000b31a3653f44ec65eeaf94b961ebef7a
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue May 8 15:57:22 2012 +0200
s3:librpc/idl/smbXsrv.idl: add smbXsrv_version_* structures
metze
commit 47ddfe2e59998b3184d6ac5ae8af8c46d58d1a6a
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Dec 15 14:45:56 2011 +0100
s3:librpc: add smbXsrv.idl
metze
-----------------------------------------------------------------------
Summary of changes:
docs-xml/smbdotconf/protocol/servermaxprotocol.xml | 11 +-
docs-xml/smbdotconf/protocol/serverminprotocol.xml | 2 +-
lib/param/param_enums.c | 1 +
librpc/wscript_build | 2 +-
selftest/knownfail | 6 +-
selftest/target/Samba3.pm | 2 +-
source3/Makefile.in | 4 +
source3/include/smb.h | 1 -
source3/include/vfs.h | 1 +
source3/librpc/idl/messaging.idl | 3 +
source3/librpc/idl/smbXsrv.idl | 256 ++++
source3/librpc/idl/wscript_build | 4 +-
source3/librpc/wscript_build | 5 +
source3/selftest/tests.py | 8 +-
source3/smbd/conn.c | 118 --
source3/smbd/conn_idle.c | 102 +-
source3/smbd/files.c | 8 +-
source3/smbd/globals.h | 110 +-
source3/smbd/ipc.c | 24 +-
source3/smbd/password.c | 200 ---
source3/smbd/process.c | 86 +-
source3/smbd/proto.h | 18 +-
source3/smbd/reply.c | 84 +-
source3/smbd/server.c | 18 +-
source3/smbd/server_exit.c | 36 +-
source3/smbd/service.c | 54 +-
source3/smbd/sesssetup.c | 303 ++++-
source3/smbd/smb2_close.c | 2 +-
source3/smbd/smb2_create.c | 4 +-
source3/smbd/smb2_find.c | 2 +-
source3/smbd/smb2_getinfo.c | 2 +-
source3/smbd/smb2_glue.c | 6 +-
source3/smbd/smb2_notify.c | 2 +-
source3/smbd/smb2_read.c | 2 +-
source3/smbd/smb2_server.c | 133 ++-
source3/smbd/smb2_sesssetup.c | 535 +++++---
source3/smbd/smb2_setinfo.c | 2 +-
source3/smbd/smb2_tcon.c | 100 +-
source3/smbd/smb2_write.c | 2 +-
source3/smbd/smbXsrv_session.c | 1511 ++++++++++++++++++++
source3/smbd/smbXsrv_tcon.c | 1151 +++++++++++++++
source3/smbd/smbXsrv_version.c | 260 ++++
source3/wscript_build | 4 +
43 files changed, 4342 insertions(+), 843 deletions(-)
create mode 100644 source3/librpc/idl/smbXsrv.idl
create mode 100644 source3/smbd/smbXsrv_session.c
create mode 100644 source3/smbd/smbXsrv_tcon.c
create mode 100644 source3/smbd/smbXsrv_version.c
Changeset truncated at 500 lines:
diff --git a/docs-xml/smbdotconf/protocol/servermaxprotocol.xml b/docs-xml/smbdotconf/protocol/servermaxprotocol.xml
index 459bce8..5eb79f3 100644
--- a/docs-xml/smbdotconf/protocol/servermaxprotocol.xml
+++ b/docs-xml/smbdotconf/protocol/servermaxprotocol.xml
@@ -47,10 +47,19 @@
<para><constant>SMB2_22</constant>: Early Windows 8 SMB2 version.</para>
</listitem>
<listitem>
- <para><constant>SMB2_24</constant>: Windows 8 SMB2 version.</para>
+ <para><constant>SMB2_24</constant>: Windows 8 beta SMB2 version.</para>
</listitem>
</itemizedlist>
<para>By default SMB2 selects the SMB2_02 varient.</para>
+ <listitem>
+ <para><constant>SMB3</constant>: The same as SMB2.
+ Used by Windows 8. SMB3 has sub protocols available.</para>
+ <itemizedlist>
+ <listitem>
+ <para><constant>SMB3_00</constant>: Windows 8 SMB3 version. (mostly the same as SMB2_24)</para>
+ </listitem>
+ </itemizedlist>
+ <para>By default SMB3 selects the SMB3_00 varient.</para>
</listitem>
</itemizedlist>
diff --git a/docs-xml/smbdotconf/protocol/serverminprotocol.xml b/docs-xml/smbdotconf/protocol/serverminprotocol.xml
index c72ae59..d313908 100644
--- a/docs-xml/smbdotconf/protocol/serverminprotocol.xml
+++ b/docs-xml/smbdotconf/protocol/serverminprotocol.xml
@@ -6,7 +6,7 @@
<description>
<para>The value of the parameter (a string) is the
lowest SMB protocol dialect than Samba will support. Please refer
- to the <smbconfoption name="max protocol"/>
+ to the <smbconfoption name="server max protocol"/>
parameter for a list of valid protocol names and a brief description
of each. You may also wish to refer to the C source code in
<filename moreinfo="none">source/smbd/negprot.c</filename> for a listing of known protocol
diff --git a/lib/param/param_enums.c b/lib/param/param_enums.c
index afcf2f0..baf1696 100644
--- a/lib/param/param_enums.c
+++ b/lib/param/param_enums.c
@@ -29,6 +29,7 @@
static const struct enum_list enum_protocol[] = {
{PROTOCOL_SMB2_02, "SMB2"}, /* for now keep PROTOCOL_SMB2_02 */
+ {PROTOCOL_SMB3_00, "SMB3"}, /* for now keep PROTOCOL_SMB3_00 */
{PROTOCOL_SMB3_00, "SMB3_00"},
{PROTOCOL_SMB2_24, "SMB2_24"},
{PROTOCOL_SMB2_22, "SMB2_22"},
diff --git a/librpc/wscript_build b/librpc/wscript_build
index 46570ae..fbe0223 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -594,7 +594,7 @@ bld.SAMBA_LIBRARY('ndr-samba',
source=[],
deps='''NDR_DRSBLOBS NDR_DRSUAPI NDR_IDMAP NDR_NTLMSSP NDR_SCHANNEL NDR_MGMT
NDR_DNSP NDR_EPMAPPER NDR_XATTR NDR_UNIXINFO NDR_NAMED_PIPE_AUTH NDR_DCOM
- NDR_NTPRINTING NDR_FSRVP''',
+ NDR_NTPRINTING NDR_FSRVP NDR_OPEN_FILES NDR_SMBXSRV''',
private_library=True,
grouping_library=True
)
diff --git a/selftest/knownfail b/selftest/knownfail
index d7078d6..b888afc 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -19,6 +19,8 @@
^samba3.smbtorture_s3.plain\(dc\).NTTRANS-FSCTL # Fails against the s4 ntvfs server
^samba3.smbtorture_s3.plain\(dc\).SMB2-NEGPROT # Fails against the s4 ntvfs server
^samba3.smbtorture_s3.plain\(dc\).BAD-NBT-SESSION # Fails against the s4 ntvfs server
+^samba3.smbtorture_s3.plain\(dc\).SMB2-SESSION-REAUTH # Fails against the s4 ntvfs server
+^samba3.smbtorture_s3.plain\(dc\).SMB2-SESSION-RECONNECT # Fails against the s4 ntvfs server
^samba3.nbt.dgram.*netlogon2\(s3dc\)
^samba3.*rap.sam.*.useradd # Not provided by Samba 3
^samba3.*rap.sam.*.userdelete # Not provided by Samba 3
@@ -191,8 +193,8 @@
^samba3.smb2.streams.attributes
^samba3.smb2.getinfo.getinfo
^samba3.smb2.setinfo.setinfo
-^samba3.smb2.session.reconnect
-^samba3.smb2.session.reauth
+^samba3.smb2.session.*reauth5 # some special anonymous checks?
+^samba3.raw.session.*reauth2 # maybe fix this?
^samba3.rpc.spoolss.printer.addprinter.driver_info_winreg # knownfail or flapping?
^samba3.rpc.spoolss.printer.addprinterex.driver_info_winreg # knownfail or flapping?
#
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index a84b4e1..5dfafe4 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -892,7 +892,7 @@ sub provision($$$$$$)
# min receivefile size = 4000
- max protocol = SMB2
+ server max protocol = SMB3
read only = no
server signing = auto
diff --git a/source3/Makefile.in b/source3/Makefile.in
index abdeb72..4adbaa0 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -974,6 +974,10 @@ SMBD_OBJ_SRV = smbd/server_reload.o \
smbd/smb2_getinfo.o \
smbd/smb2_setinfo.o \
smbd/smb2_break.o \
+ autoconf/librpc/gen_ndr/ndr_smbXsrv.o \
+ smbd/smbXsrv_version.o \
+ smbd/smbXsrv_session.o \
+ smbd/smbXsrv_tcon.o \
$(MANGLE_OBJ) @VFS_STATIC@
SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 1c05459..f58095e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -673,7 +673,6 @@ enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K};
#define VUID_OFFSET 100 /* Amount to bias returned vuid numbers */
#define TID_FIELD_INVALID 0
-#define CNUM_OFFSET 1 /* shift for bitmap index */
#define FNUM_FIELD_INVALID 0
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index e6a9ef4..bd66d34 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -280,6 +280,7 @@ struct share_params {
typedef struct connection_struct {
struct connection_struct *next, *prev;
struct smbd_server_connection *sconn; /* can be NULL */
+ struct smbXsrv_tcon0 *tcon; /* can be NULL */
uint32_t cnum; /* an index passed over the wire */
struct share_params *params;
bool force_user;
diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl
index 5493d75..df1f321 100644
--- a/source3/librpc/idl/messaging.idl
+++ b/source3/librpc/idl/messaging.idl
@@ -103,6 +103,9 @@ interface messaging
/* event messages */
MSG_DUMP_EVENT_LIST = 0x0500,
+ /* smbXsrv messages */
+ MSG_SMBXSRV_SESSION_CLOSE = 0x0600,
+
/* dbwrap messages 4001-4999 (0x0FA0 - 0x1387) */
/* MSG_DBWRAP_TDB2_CHANGES = 4001, */
MSG_DBWRAP_G_LOCK_RETRY = 4002,
diff --git a/source3/librpc/idl/smbXsrv.idl b/source3/librpc/idl/smbXsrv.idl
new file mode 100644
index 0000000..9d9f855
--- /dev/null
+++ b/source3/librpc/idl/smbXsrv.idl
@@ -0,0 +1,256 @@
+#include "idl_types.h"
+
+import "server_id.idl";
+import "security.idl";
+import "auth.idl";
+
+/*
+ * The main server code should just work with
+ * 'struct smbXsrv_session' and never use
+ * smbXsrv_session0, smbXsrv_sessionU
+ * and smbXsrv_sessionB directly.
+ *
+ * If we need to change the smbXsrv_session,
+ * we can just point it to smbXsrv_session1
+ * and could implement transparent mapping.
+ */
+cpp_quote("#define smbXsrv_session smbXsrv_session0")
+
+/*
+ * The main server code should just work with
+ * 'struct smbXsrv_tcon' and never use
+ * smbXsrv_tcon0, smbXsrv_tconU
+ * and smbXsrv_tconB directly.
+ *
+ * If we need to change the smbXsrv_tcon,
+ * we can just point it to smbXsrv_tcon1
+ * and could implement transparent mapping.
+ */
+cpp_quote("#define smbXsrv_tcon smbXsrv_tcon0")
+
+[
+ uuid("07408340-ae31-11e1-97dc-539f7fddc06f"),
+ version(0.0),
+ pointer_default(unique),
+ helpstring("smbXsrv structures")
+]
+interface smbXsrv
+{
+ /*
+ * smbXsrv_version* is designed to allow
+ * rolling code upgrades in future (within a cluster).
+ *
+ * This just adds the infrastructure,
+ * but we does not implement it yet!
+ *
+ * Currently it only prevents that
+ * nodes with a different version numbers
+ * cannot run at the same time.
+ *
+ * Each node checks at startup, if the version
+ * matches the version of all other nodes.
+ * And it exits if the version does not match
+ * to avoid corruption.
+ *
+ * While it would be possible to add versioning
+ * to each of our internal databases it is easier
+ * use a dedicated database "smbXsrv_version_global.tdb"
+ * to hold the global version information.
+ *
+ * This removes extra complexity from the individual
+ * databases and allows that we add/remove databases
+ * or use different indexing keys.
+ *
+ */
+ typedef [v1_enum] enum {
+ /*
+ * NOTE: Version 0 is designed to be unstable and the format
+ * may change during development.
+ */
+ SMBXSRV_VERSION_0 = 0x00000000
+ } smbXsrv_version_values;
+
+ const uint32 SMBXSRV_VERSION_CURRENT = SMBXSRV_VERSION_0;
+
+ typedef struct {
+ server_id server_id;
+ smbXsrv_version_values min_version;
+ smbXsrv_version_values max_version;
+ smbXsrv_version_values current_version;
+ } smbXsrv_version_node0;
+
+ typedef struct {
+ [ignore] db_record *db_rec;
+ [range(1, 1024)] uint32 num_nodes;
+ smbXsrv_version_node0 nodes[num_nodes];
+ } smbXsrv_version_global0;
+
+ typedef union {
+ [case(0)] smbXsrv_version_global0 *info0;
+ [default] hyper *dummy;
+ } smbXsrv_version_globalU;
+
+ typedef [public] struct {
+ smbXsrv_version_values version;
+ uint32 seqnum;
+ [switch_is(version)] smbXsrv_version_globalU info;
+ } smbXsrv_version_globalB;
+
+ void smbXsrv_version_global_decode(
+ [in] smbXsrv_version_globalB blob
+ );
+
+ /* sessions */
+
+ typedef struct {
+ server_id server_id;
+ [charset(UTF8),string] char local_address[];
+ [charset(UTF8),string] char remote_address[];
+ [charset(UTF8),string] char remote_name[];
+ [noprint] DATA_BLOB signing_key;
+ uint32 auth_session_info_seqnum;
+ } smbXsrv_channel_global0;
+
+ typedef struct {
+ [ignore] db_record *db_rec;
+ uint32 session_global_id;
+ hyper session_wire_id;
+ NTTIME creation_time;
+ NTTIME expiration_time;
+ /*
+ * auth_session is NULL until the
+ * session is valid for the first time.
+ */
+ uint32 auth_session_info_seqnum;
+ auth_session_info *auth_session_info;
+ uint16 connection_dialect;
+ boolean8 signing_required;
+ boolean8 encryption_required;
+ [noprint] DATA_BLOB signing_key;
+ [noprint] DATA_BLOB encryption_key;
+ [noprint] DATA_BLOB decryption_key;
+ [noprint] DATA_BLOB application_key;
+ [range(1, 1024)] uint32 num_channels;
+ smbXsrv_channel_global0 channels[num_channels];
+ } smbXsrv_session_global0;
+
+ typedef union {
+ [case(0)] smbXsrv_session_global0 *info0;
+ [default] hyper *dummy;
+ } smbXsrv_session_globalU;
+
+ typedef [public] struct {
+ smbXsrv_version_values version;
+ uint32 seqnum;
+ [switch_is(version)] smbXsrv_session_globalU info;
+ } smbXsrv_session_globalB;
+
+ void smbXsrv_session_global_decode(
+ [in] smbXsrv_session_globalB blob
+ );
+
+ typedef struct {
+ [ignore] smbXsrv_session_table *table;
+ [ignore] db_record *db_rec;
+ [ignore] smbXsrv_connection *connection;
+ uint32 local_id;
+ [ref] smbXsrv_session_global0 *global;
+ NTSTATUS status;
+ NTTIME idle_time;
+ [ignore] gensec_security *gensec;
+ [ignore] user_struct *compat;
+ [ignore] smbXsrv_tcon_table *tcon_table;
+ } smbXsrv_session0;
+
+ typedef union {
+ [case(0)] smbXsrv_session0 *info0;
+ [default] hyper *dummy;
+ } smbXsrv_sessionU;
+
+ typedef [public] struct {
+ smbXsrv_version_values version;
+ [value(0)] uint32 reserved;
+ [switch_is(version)] smbXsrv_sessionU info;
+ } smbXsrv_sessionB;
+
+ void smbXsrv_session_decode(
+ [in] smbXsrv_sessionB blob
+ );
+
+ /*
+ * smbXsrv_session_close is use in the MSG_SMBXSRV_SESSION_CLOSE
+ * message
+ */
+ typedef struct {
+ uint32 old_session_global_id;
+ hyper old_session_wire_id;
+ NTTIME old_creation_time;
+ hyper new_session_wire_id;
+ } smbXsrv_session_close0;
+
+ typedef union {
+ [case(0)] smbXsrv_session_close0 *info0;
+ [default] hyper *dummy;
+ } smbXsrv_session_closeU;
+
+ typedef [public] struct {
+ smbXsrv_version_values version;
+ [value(0)] uint32 reserved;
+ [switch_is(version)] smbXsrv_session_closeU info;
+ } smbXsrv_session_closeB;
+
+ void smbXsrv_session_close_decode(
+ [in] smbXsrv_session_closeB blob
+ );
+
+ /* tree connects */
+
+ typedef struct {
+ [ignore] db_record *db_rec;
+ uint32 tcon_global_id;
+ uint32 tcon_wire_id;
+ server_id server_id;
+ NTTIME creation_time;
+ [charset(UTF8),string] char share_name[];
+ } smbXsrv_tcon_global0;
+
+ typedef union {
+ [case(0)] smbXsrv_tcon_global0 *info0;
+ [default] hyper *dummy;
+ } smbXsrv_tcon_globalU;
+
+ typedef [public] struct {
+ smbXsrv_version_values version;
+ uint32 seqnum;
+ [switch_is(version)] smbXsrv_tcon_globalU info;
+ } smbXsrv_tcon_globalB;
+
+ void smbXsrv_tcon_global_decode(
+ [in] smbXsrv_tcon_globalB blob
+ );
+
+ typedef struct {
+ [ignore] smbXsrv_tcon_table *table;
+ [ignore] db_record *db_rec;
+ uint32 local_id;
+ [ref] smbXsrv_tcon_global0 *global;
+ NTSTATUS status;
+ NTTIME idle_time;
+ [ignore] connection_struct *compat;
+ } smbXsrv_tcon0;
+
+ typedef union {
+ [case(0)] smbXsrv_tcon0 *info0;
+ [default] hyper *dummy;
+ } smbXsrv_tconU;
+
+ typedef [public] struct {
+ smbXsrv_version_values version;
+ [value(0)] uint32 reserved;
+ [switch_is(version)] smbXsrv_tconU info;
+ } smbXsrv_tconB;
+
+ void smbXsrv_tcon_decode(
+ [in] smbXsrv_tconB blob
+ );
+}
diff --git a/source3/librpc/idl/wscript_build b/source3/librpc/idl/wscript_build
index 949eecd..712108d 100644
--- a/source3/librpc/idl/wscript_build
+++ b/source3/librpc/idl/wscript_build
@@ -6,7 +6,9 @@ topinclude=os.path.join(bld.srcnode.abspath(), 'librpc/idl')
bld.SAMBA_PIDL_LIST('PIDL',
'''messaging.idl libnetapi.idl open_files.idl
- perfcount.idl secrets.idl libnet_join.idl''',
+ perfcount.idl secrets.idl libnet_join.idl
+ smbXsrv.idl
+ ''',
options='--includedir=%s --header --ndr-parser' % topinclude,
output_dir='../gen_ndr')
diff --git a/source3/librpc/wscript_build b/source3/librpc/wscript_build
index ab4c23f..c0dc9b4 100644
--- a/source3/librpc/wscript_build
+++ b/source3/librpc/wscript_build
@@ -20,6 +20,11 @@ bld.SAMBA3_SUBSYSTEM('NDR_OPEN_FILES',
public_deps='ndr NDR_SERVER_ID NDR_FILE_ID NDR_SECURITY'
)
+bld.SAMBA3_SUBSYSTEM('NDR_SMBXSRV',
+ source='gen_ndr/ndr_smbXsrv.c',
+ public_deps='ndr NDR_SERVER_ID NDR_SECURITY NDR_AUTH'
+ )
+
bld.SAMBA3_SUBSYSTEM('NDR_SECRETS',
source='gen_ndr/ndr_secrets.c',
public_deps='ndr'
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 4aedbf8..264f93a 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -87,6 +87,7 @@ tests=[ "FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", "LOCK5", "LOCK6", "LOCK7",
"CHAIN3",
"GETADDRINFO", "UID-REGRESSION-TEST", "SHORTNAME-TEST",
"CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", "SMB2-NEGPROT",
+ "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT",
"CLEANUP1",
"CLEANUP2",
"BAD-NBT-SESSION"]
@@ -257,7 +258,7 @@ raw = ["raw.acls", "raw.chkpath", "raw.close", "raw.composite", "raw.context", "
"raw.ioctl", "raw.lock", "raw.mkdir", "raw.mux", "raw.notify", "raw.open", "raw.oplock"
"raw.qfileinfo", "raw.qfsinfo", "raw.read", "raw.rename", "raw.search", "raw.seek",
"raw.sfileinfo.base", "raw.sfileinfo.bug", "raw.streams", "raw.unlink", "raw.write",
- "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename",
+ "raw.samba3hide", "raw.samba3badpath", "raw.sfileinfo.rename", "raw.session",
"raw.samba3caseinsensitive", "raw.samba3posixtimedlock",
"raw.samba3rootdirfid", "raw.sfileinfo.end-of-file",
"raw.bench-oplock", "raw.bench-lock", "raw.bench-open", "raw.bench-tcon",
@@ -270,6 +271,7 @@ rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", "rpc.samba3.sh
"rpc.samba3.getaliasmembership-0",
"rpc.samba3.netlogon", "rpc.samba3.sessionkey", "rpc.samba3.getusername",
"rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
+ "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
"rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
"rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", "rpc.spoolss.printer",
"rpc.spoolss.driver",
@@ -318,6 +320,10 @@ for t in tests:
plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
plansmbtorturetestsuite(t, "secshare", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
+ elif t == "raw.session" or t == "smb2.session":
+ plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
+ plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k no -U$USERNAME%$PASSWORD', 'ntlm')
+ plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -k yes -U$USERNAME%$PASSWORD', 'krb5')
else:
plansmbtorturetestsuite(t, "s3dc", '//$SERVER_IP/tmp -U$USERNAME%$PASSWORD')
plansmbtorturetestsuite(t, "plugin_s4_dc", '//$SERVER/tmp -U$USERNAME%$PASSWORD')
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 399935a..28e1850 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -24,22 +24,6 @@
#include "smbd/globals.h"
#include "lib/util/bitmap.h"
-/* The connections bitmap is expanded in increments of BITMAP_BLOCK_SZ. The
- * maximum size of the bitmap is the largest positive integer, but you will hit
- * the "max connections" limit, looong before that.
- */
-
-#define BITMAP_BLOCK_SZ 128
--
Samba Shared Repository
More information about the samba-cvs
mailing list