mdw/samba.git
12 years agos4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0
Matthias Dieter Wallnöfer [Mon, 28 Nov 2011 19:55:37 +0000 (20:55 +0100)]
s4:lib/tls - call "gnutls_transport_set_lowat" only on GNUTLS < 3.0

This function call together with the lowat feature has been removed in release
3.0 as described in this mailing list post:
http://old.nabble.com/gnutls_transport_set_lowat-deprecated-td32554230.html.

Since we do not make any use of lowat (esprimed by each function call)
we are free to simply omit it on v3.0 and later.

This addresses bug #8537.

12 years agos4:torture/rpc/netlogon.c - factor out the computer name check in an own test function
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 16:38:14 +0000 (17:38 +0100)]
s4:torture/rpc/netlogon.c - factor out the computer name check in an own test function

This check is by no ways specific to "DsRGetSiteName" and hence it
should be factored out in an own function.
Samba atm does not implement the requested behaviour so I have added the
"torture_skip" action.

12 years agos4:torture/rpc/netlogon.c - enhance the "DsRGetDCName*" tests
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 09:20:24 +0000 (10:20 +0100)]
s4:torture/rpc/netlogon.c - enhance the "DsRGetDCName*" tests

To check for the expected behaviour (DS_* flags). Always according to
MS-NRPC 2.2.1.2.1.

12 years agos4:netlogon RPC server - dcesrv_netr_DsRGetSiteName - add a small explaination
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 16:03:00 +0000 (17:03 +0100)]
s4:netlogon RPC server - dcesrv_netr_DsRGetSiteName - add a small explaination

12 years agos3: Use tevent_req_simple_recv_ntstatus
Volker Lendecke [Thu, 24 Nov 2011 09:55:30 +0000 (10:55 +0100)]
s3: Use tevent_req_simple_recv_ntstatus

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Nov 28 17:14:27 CET 2011 on sn-devel-104

12 years agoFix Coverity ID 2638: OVERRUN_STATIC
Volker Lendecke [Mon, 28 Nov 2011 13:50:03 +0000 (14:50 +0100)]
Fix Coverity ID 2638: OVERRUN_STATIC

12 years agoFix Coverity ID 2639: UNUSED_VALUE
Volker Lendecke [Mon, 28 Nov 2011 13:34:00 +0000 (14:34 +0100)]
Fix Coverity ID 2639: UNUSED_VALUE

12 years agos3: Fix a crash in group_mapping.ldb->tdb conversion
Volker Lendecke [Mon, 28 Nov 2011 09:44:42 +0000 (10:44 +0100)]
s3: Fix a crash in group_mapping.ldb->tdb conversion

When we find a group_mapping.ldb entry without a comment, the upgrade code
would have crashed with a NULL dereference

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Nov 28 12:24:08 CET 2011 on sn-devel-104

12 years agos4:torture/ldap/cldap.c - remove the "test_cldap_netlogon_flag_ds_dns_forest" test
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 08:31:42 +0000 (09:31 +0100)]
s4:torture/ldap/cldap.c - remove the "test_cldap_netlogon_flag_ds_dns_forest" test

The test is wrong since the DNS_* (DS_DNS_CONTROLLER, DS_DNS_DOMAIN,
DS_DNS_FOREST_ROOT) flags are never set on the plain CLDAP pipe. They
get added only over the DsRGetDCName* calls over NETLOGON RPC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Nov 27 16:23:27 CET 2011 on sn-devel-104

12 years agos4:selftest/test_samba_tool.sh - add a basic unit test for the new "domain info"...
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 20:05:54 +0000 (21:05 +0100)]
s4:selftest/test_samba_tool.sh - add a basic unit test for the new "domain info" command

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agosamba-tool: domain info - add basic exception handling
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 20:29:18 +0000 (21:29 +0100)]
samba-tool: domain info - add basic exception handling

It is nicer to get an error message rather than a stacktrace on wrong IP
addresses.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agosamba-tool: add a domain info command to get basic info
Matthieu Patou [Wed, 28 Sep 2011 00:46:14 +0000 (17:46 -0700)]
samba-tool: add a domain info command to get basic info

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:netlogon RPC server - DsRGetDcNameEx - set the DNS name flags correctly
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 19:32:57 +0000 (20:32 +0100)]
s4:netlogon RPC server - DsRGetDcNameEx - set the DNS name flags correctly

The rules are explained in MS-NRPC 2.2.1.2.1.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4-netlogon: return WERR_NO_SUCH_DOMAIN instead of WERR_DS_UNAVAILABLE if we are...
Matthieu Patou [Tue, 27 Sep 2011 19:11:36 +0000 (15:11 -0400)]
s4-netlogon: return WERR_NO_SUCH_DOMAIN instead of WERR_DS_UNAVAILABLE if we are unable to translate the domain to a dn

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:cldap_server/netlogon.c - DS_SERVER_CLOSEST handling
Matthias Dieter Wallnöfer [Thu, 24 Nov 2011 08:25:35 +0000 (09:25 +0100)]
s4:cldap_server/netlogon.c - DS_SERVER_CLOSEST handling

DS_SERVER_CLOSEST is only set when the client and server site coincide.

MS-NRPC 2.2.1.2.1

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:netcmd/common.py: add a "netcmd" function to do a cldap netlogon request
Matthias Dieter Wallnöfer [Tue, 22 Nov 2011 21:26:38 +0000 (22:26 +0100)]
s4:netcmd/common.py: add a "netcmd" function to do a cldap netlogon request

This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter
Matthias Dieter Wallnöfer [Tue, 22 Nov 2011 21:26:06 +0000 (22:26 +0100)]
s4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter

This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:libnet/py_net.c - initialise optional keyword arguments
Matthias Dieter Wallnöfer [Tue, 22 Nov 2011 21:06:15 +0000 (22:06 +0100)]
s4:libnet/py_net.c - initialise optional keyword arguments

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:libcli/finddcs_cldap.c - let "finddcs_cldap" work either with the IP address or...
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 08:45:31 +0000 (09:45 +0100)]
s4:libcli/finddcs_cldap.c - let "finddcs_cldap" work either with the IP address or the domain name

This will be useful for a new "samba-tool domain info" command.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agosmbtorture: avoid sigsev if the password is not correct
Matthieu Patou [Wed, 28 Sep 2011 00:30:16 +0000 (17:30 -0700)]
smbtorture: avoid sigsev if the password is not correct

Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:update_keytab LDB module - no need to filter for the DN
Matthias Dieter Wallnöfer [Tue, 25 Oct 2011 18:06:45 +0000 (20:06 +0200)]
s4:update_keytab LDB module - no need to filter for the DN

We launch a search request with base scope on exactly the same DN (see
downwards).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agoidl:netlogon.idl - add the Active Directory Web Service bit (DS_SERVER_WEBSERV)
Matthias Dieter Wallnöfer [Wed, 23 Nov 2011 19:19:32 +0000 (20:19 +0100)]
idl:netlogon.idl - add the Active Directory Web Service bit (DS_SERVER_WEBSERV)

MS-NRPC 2.2.1.2.1

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:locking:posix: remove uses of SMB_ASSERT() from get_windows_lock_ref_count()
Michael Adam [Thu, 10 Nov 2011 22:11:54 +0000 (23:11 +0100)]
s3:locking:posix: remove uses of SMB_ASSERT() from  get_windows_lock_ref_count()

SMB_ASSERT is useless, since in non-developer build it does not actually
fail after the log message, but usual flow just continues.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Nov 25 14:59:53 CET 2011 on sn-devel-104

12 years agos3:locking:posix: adapt use of dbrwrap_fetch() to new NTSTATUS semantics
Michael Adam [Thu, 10 Nov 2011 21:55:28 +0000 (22:55 +0100)]
s3:locking:posix: adapt use of dbrwrap_fetch() to new NTSTATUS semantics

12 years agos3:registry: write INFO/version if we create registry.tdb
Gregor Beck [Mon, 7 Nov 2011 12:31:26 +0000 (13:31 +0100)]
s3:registry: write INFO/version if we create registry.tdb

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:dbwrap: do not burden the user of db_open_ctdb with ifdef voodoo
Gregor Beck [Tue, 25 Oct 2011 14:32:12 +0000 (16:32 +0200)]
s3:dbwrap: do not burden the user of db_open_ctdb with ifdef voodoo

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agos3:lib fix output of hex escapes > 0x7F with cbuf_print_quoted
Gregor Beck [Fri, 21 Oct 2011 08:49:45 +0000 (10:49 +0200)]
s3:lib fix output of hex escapes > 0x7F with cbuf_print_quoted
(cherry picked from commit a1fcb7e37a23dcc035686486d4afe32a67082ae1)

12 years agos3:net registry check: improve console output
Gregor Beck [Fri, 21 Oct 2011 13:32:27 +0000 (15:32 +0200)]
s3:net registry check: improve console output

Signed-off-by: Michael Adam <obnox@samba.org>
12 years agosocket_wrapper: use libreplace headers based on "#ifdef HAVE_LIBREPLACE"
Michael Adam [Sun, 20 Nov 2011 22:45:05 +0000 (23:45 +0100)]
socket_wrapper: use libreplace headers based on "#ifdef HAVE_LIBREPLACE"

instead of "#ifdef _SAMBA_BUILD_".

This is to be able to use socket_wrapper in other projects
that also use libreplace.

12 years agosocket_wrapper: simplify include path for replace.h
Michael Adam [Fri, 18 Nov 2011 14:37:07 +0000 (15:37 +0100)]
socket_wrapper: simplify include path for replace.h

12 years agos3: user_domain is not used in wb_getpwsid
Volker Lendecke [Thu, 24 Nov 2011 09:58:52 +0000 (10:58 +0100)]
s3: user_domain is not used in wb_getpwsid

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov 25 13:23:30 CET 2011 on sn-devel-104

12 years agos3: Add some const
Volker Lendecke [Fri, 25 Nov 2011 07:45:26 +0000 (08:45 +0100)]
s3: Add some const

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov 25 10:21:07 CET 2011 on sn-devel-104

12 years agos3:torture: test smb2cli_logoff and smb2cli_tdis
Stefan Metzmacher [Thu, 24 Nov 2011 11:33:19 +0000 (12:33 +0100)]
s3:torture: test smb2cli_logoff and smb2cli_tdis

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Nov 24 20:36:31 CET 2011 on sn-devel-104

12 years agos3:smb2cli: zero tid in smb2cli_tdis*
Stefan Metzmacher [Mon, 21 Nov 2011 15:30:09 +0000 (16:30 +0100)]
s3:smb2cli: zero tid in smb2cli_tdis*

metze

12 years agos3:smb2cli: free session in smb2cli_logoff*
Stefan Metzmacher [Mon, 21 Nov 2011 15:30:09 +0000 (16:30 +0100)]
s3:smb2cli: free session in smb2cli_logoff*

metze

12 years agos3:libsmb: Fix a typo
Volker Lendecke [Mon, 21 Nov 2011 11:12:53 +0000 (12:12 +0100)]
s3:libsmb: Fix a typo

12 years agos3:torture: add SMB2-SESSION-REAUTH
Stefan Metzmacher [Sat, 22 Oct 2011 08:37:34 +0000 (10:37 +0200)]
s3:torture: add SMB2-SESSION-REAUTH

metze

12 years agos3:torture: add SMB2-MULTI-CHANNEL test
Stefan Metzmacher [Sat, 22 Oct 2011 08:34:31 +0000 (10:34 +0200)]
s3:torture: add SMB2-MULTI-CHANNEL test

metze

12 years agos3:torture: add a new test SMB2-TCON-DEPENDENCE
Michael Adam [Mon, 19 Sep 2011 08:09:34 +0000 (10:09 +0200)]
s3:torture: add a new test SMB2-TCON-DEPENDENCE

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos3:torture:smb2: add SMB2-SESSION-RECONNECT test
Michael Adam [Mon, 19 Sep 2011 08:08:48 +0000 (10:08 +0200)]
s3:torture:smb2: add SMB2-SESSION-RECONNECT test

Signed-off-by: Stefan Metzmacher <metze@samba.org>
12 years agos4:libcli/smb2: use talloc_zero() in smb2_request_init()
Stefan Metzmacher [Sat, 24 Sep 2011 07:36:58 +0000 (09:36 +0200)]
s4:libcli/smb2: use talloc_zero() in smb2_request_init()

metze

12 years agos4:libcli/smb2: fix compiler warning in smb2_push_o16s16_string()
Stefan Metzmacher [Mon, 21 Nov 2011 16:43:11 +0000 (17:43 +0100)]
s4:libcli/smb2: fix compiler warning in smb2_push_o16s16_string()

metze

12 years agos4:libcli/smb2: implement on top of smbXcli_conn/req
Stefan Metzmacher [Tue, 20 Sep 2011 18:59:45 +0000 (20:59 +0200)]
s4:libcli/smb2: implement on top of smbXcli_conn/req

metze

12 years agos3:smbXcli: keep two fd per connection in order to work with the epoll tevent backend
Stefan Metzmacher [Sun, 25 Sep 2011 01:15:54 +0000 (03:15 +0200)]
s3:smbXcli: keep two fd per connection in order to work with the epoll tevent backend

metze

12 years agos4:torture/smb2: use tctx->ev as event context for polling
Stefan Metzmacher [Thu, 22 Sep 2011 19:30:13 +0000 (21:30 +0200)]
s4:torture/smb2: use tctx->ev as event context for polling

metze

12 years agos3:torture: use cli_tree_connect() instead of smb2cli_tcon()
Stefan Metzmacher [Thu, 24 Nov 2011 12:03:11 +0000 (13:03 +0100)]
s3:torture: use cli_tree_connect() instead of smb2cli_tcon()

metze

12 years agos3:client: make use of cli_tree_connect()
Stefan Metzmacher [Mon, 31 Oct 2011 16:51:47 +0000 (17:51 +0100)]
s3:client: make use of cli_tree_connect()

metze

12 years agos3:libsmb: make use of cli_tree_connect()
Stefan Metzmacher [Mon, 31 Oct 2011 16:51:11 +0000 (17:51 +0100)]
s3:libsmb: make use of cli_tree_connect()

metze

12 years agos3:nmbd: make use of cli_tree_connect()
Stefan Metzmacher [Mon, 31 Oct 2011 16:50:32 +0000 (17:50 +0100)]
s3:nmbd: make use of cli_tree_connect()

metze

12 years agos3:torture: make use of cli_tree_connect()
Stefan Metzmacher [Mon, 31 Oct 2011 16:49:29 +0000 (17:49 +0100)]
s3:torture: make use of cli_tree_connect()

metze

12 years agos3:utils: make use of cli_tree_connect()
Stefan Metzmacher [Mon, 31 Oct 2011 16:48:57 +0000 (17:48 +0100)]
s3:utils: make use of cli_tree_connect()

metze

12 years agos3:winbindd_cm: make use of cli_tree_connect()
Stefan Metzmacher [Mon, 31 Oct 2011 16:48:20 +0000 (17:48 +0100)]
s3:winbindd_cm: make use of cli_tree_connect()

metze

12 years agos3:libsmb: add cli_tree_connect() for a generic tree connect
Stefan Metzmacher [Tue, 20 Sep 2011 04:57:37 +0000 (06:57 +0200)]
s3:libsmb: add cli_tree_connect() for a generic tree connect

metze

12 years agos3:smb2cli: remove unused smb2cli_sesssetup_ntlmssp*
Stefan Metzmacher [Fri, 21 Oct 2011 08:08:39 +0000 (10:08 +0200)]
s3:smb2cli: remove unused smb2cli_sesssetup_ntlmssp*

metze

12 years agos3:torture: replace smb2cli_sesssetup_ntlmssp() with the more generic cli_session_setup()
Stefan Metzmacher [Tue, 27 Sep 2011 22:58:28 +0000 (00:58 +0200)]
s3:torture: replace smb2cli_sesssetup_ntlmssp() with the more generic cli_session_setup()

metze

12 years agos3:libsmb: add SMB2 support to cli_session_setup()
Stefan Metzmacher [Tue, 20 Sep 2011 03:07:27 +0000 (05:07 +0200)]
s3:libsmb: add SMB2 support to cli_session_setup()

metze

12 years agos3:libsmb: implement cli_trans* on top of smb1cli_trans*
Stefan Metzmacher [Sun, 28 Aug 2011 16:05:04 +0000 (18:05 +0200)]
s3:libsmb: implement cli_trans* on top of smb1cli_trans*

metze

12 years agosmbXcli: rework smb1cli_trans.c to use smbXcli_conn/smbXcli_req
Stefan Metzmacher [Sat, 17 Sep 2011 21:38:09 +0000 (23:38 +0200)]
smbXcli: rework smb1cli_trans.c to use smbXcli_conn/smbXcli_req

metze

12 years agosmbXcli: cp source3/libsmb/clitrans.c libcli/smb/smb1cli_trans.c
Stefan Metzmacher [Sat, 17 Sep 2011 21:34:12 +0000 (23:34 +0200)]
smbXcli: cp source3/libsmb/clitrans.c libcli/smb/smb1cli_trans.c

metze

12 years agos3:selftest: run SMB2-NEGPROT
Stefan Metzmacher [Tue, 30 Aug 2011 16:50:55 +0000 (18:50 +0200)]
s3:selftest: run SMB2-NEGPROT

metze

12 years agos3:torture: add SMB2-NEGPROT test
Stefan Metzmacher [Tue, 30 Aug 2011 16:50:35 +0000 (18:50 +0200)]
s3:torture: add SMB2-NEGPROT test

metze

12 years agos3:smb2cli: remove unused smb2cli_negprot()
Stefan Metzmacher [Sat, 17 Sep 2011 22:11:54 +0000 (00:11 +0200)]
s3:smb2cli: remove unused smb2cli_negprot()

metze

12 years agos3:SMB2-BASIC: use smbXcli_negprot() directly
Stefan Metzmacher [Tue, 30 Aug 2011 09:38:26 +0000 (11:38 +0200)]
s3:SMB2-BASIC: use smbXcli_negprot() directly

metze

12 years agos3:smb2cli: pass struct smbXcli_conn directly to smb2cli_req_create/_send()
Stefan Metzmacher [Wed, 7 Sep 2011 16:44:21 +0000 (18:44 +0200)]
s3:smb2cli: pass struct smbXcli_conn directly to smb2cli_req_create/_send()

metze

12 years agos3:libsmb: implement cli_state based functions on top of smbXcli_conn/smbXcli_req
Stefan Metzmacher [Thu, 22 Sep 2011 19:09:00 +0000 (21:09 +0200)]
s3:libsmb: implement cli_state based functions on top of smbXcli_conn/smbXcli_req

metze

12 years agosmbXcli: add smb2cli_req_set_notify_async()
Stefan Metzmacher [Thu, 27 Oct 2011 15:20:27 +0000 (17:20 +0200)]
smbXcli: add smb2cli_req_set_notify_async()

That can be used if the caller wants to be notified if
the async interim response arrives.

metze

12 years agosmbXcli: add support for tevent_req_cancel() on smbXcli_req
Stefan Metzmacher [Sat, 24 Sep 2011 04:06:46 +0000 (06:06 +0200)]
smbXcli: add support for tevent_req_cancel() on smbXcli_req

metze

12 years agosmbXcli: fix smb signing for SMBntcancel
Stefan Metzmacher [Fri, 18 Nov 2011 08:24:11 +0000 (09:24 +0100)]
smbXcli: fix smb signing for SMBntcancel

metze

12 years agosmbXcli: add smb2cli_session_create_channel()
Stefan Metzmacher [Mon, 19 Sep 2011 17:05:20 +0000 (19:05 +0200)]
smbXcli: add smb2cli_session_create_channel()

This makes it possible to implement SMB 2.22 Multi-Channel
for testing.

metze

12 years agos3:smb2cli: add forward declaration for struct cli_state
Stefan Metzmacher [Thu, 22 Sep 2011 20:16:51 +0000 (22:16 +0200)]
s3:smb2cli: add forward declaration for struct cli_state

metze

12 years agos3:smb2cli: make smb2cli_session_setup_send/recv non-static
Stefan Metzmacher [Mon, 19 Sep 2011 03:37:34 +0000 (05:37 +0200)]
s3:smb2cli: make smb2cli_session_setup_send/recv non-static

metze

12 years agos3:smb2cli: make use of smbXcli_session and setup the session key for SMB2 signing
Stefan Metzmacher [Sat, 3 Sep 2011 08:18:17 +0000 (10:18 +0200)]
s3:smb2cli: make use of smbXcli_session and setup the session key for SMB2 signing

metze

12 years agosmbXcli: add support for smb2 signing
Stefan Metzmacher [Sat, 3 Sep 2011 08:18:32 +0000 (10:18 +0200)]
smbXcli: add support for smb2 signing

metze

12 years agosmbXcli: add smbXcli_session infrastructure
Stefan Metzmacher [Sat, 3 Sep 2011 08:18:17 +0000 (10:18 +0200)]
smbXcli: add smbXcli_session infrastructure

metze

12 years agos3:smb2cli: implement smb2cli_negprot() on top of smbXcli_negprot()
Stefan Metzmacher [Fri, 16 Sep 2011 15:26:22 +0000 (17:26 +0200)]
s3:smb2cli: implement smb2cli_negprot() on top of smbXcli_negprot()

metze

12 years agosmbXcli: add support for PROTOCOL_SMB2_22 in smbXcli_negprot()
Stefan Metzmacher [Fri, 16 Sep 2011 14:12:50 +0000 (16:12 +0200)]
smbXcli: add support for PROTOCOL_SMB2_22 in smbXcli_negprot()

metze

12 years agosmbXcli: add support for SMB2 multi-credit requests
Stefan Metzmacher [Tue, 6 Sep 2011 15:52:02 +0000 (17:52 +0200)]
smbXcli: add support for SMB2 multi-credit requests

metze

12 years agosmbXcli: add support for 2.??? negprot and PROTOCOL_SMB2_10
Stefan Metzmacher [Tue, 30 Aug 2011 09:04:46 +0000 (11:04 +0200)]
smbXcli: add support for 2.??? negprot and PROTOCOL_SMB2_10

metze

12 years agosmbXcli: pass client_guid to smbXcli_conn_create()
Stefan Metzmacher [Thu, 15 Sep 2011 11:21:42 +0000 (13:21 +0200)]
smbXcli: pass client_guid to smbXcli_conn_create()

metze

12 years agosmbXcli: add smbXcli_negprot_*
Stefan Metzmacher [Thu, 15 Sep 2011 11:12:43 +0000 (13:12 +0200)]
smbXcli: add smbXcli_negprot_*

This supports negotiation of any SMB1 or SMB2 dialect.

metze

12 years agosmbXcli: add helper functions to access the negotiated features
Stefan Metzmacher [Thu, 15 Sep 2011 12:02:49 +0000 (14:02 +0200)]
smbXcli: add helper functions to access the negotiated features

metze

12 years agosmbXcli: also notify chained requests about broken connections
Stefan Metzmacher [Fri, 18 Nov 2011 09:30:33 +0000 (10:30 +0100)]
smbXcli: also notify chained requests about broken connections

metze

12 years agosmbXcli: simplify smb1cli_req_chain_submit()
Stefan Metzmacher [Fri, 18 Nov 2011 09:28:40 +0000 (10:28 +0100)]
smbXcli: simplify smb1cli_req_chain_submit()

We should hang everything on the first request in the chain,
as that's the one that gets added to the pending array.

metze

12 years agosmbXcli: remove unused smb1cli_have_andx_command()
Stefan Metzmacher [Wed, 16 Nov 2011 10:38:24 +0000 (11:38 +0100)]
smbXcli: remove unused smb1cli_have_andx_command()

metze

12 years agosmbXcli: reorder smb1cli_conn_dispatch_incoming() to avoid too much nesting
Stefan Metzmacher [Mon, 21 Nov 2011 12:08:58 +0000 (13:08 +0100)]
smbXcli: reorder smb1cli_conn_dispatch_incoming() to avoid too much nesting

metze

12 years agosmbXcli: rework smb1cli_req_recv() to expose an iov with 3 elements
Stefan Metzmacher [Wed, 16 Nov 2011 10:37:05 +0000 (11:37 +0100)]
smbXcli: rework smb1cli_req_recv() to expose an iov with 3 elements

Each smb1cli_req has 3 iov elements
[SMB HDR, SMB Parameter Block, SMB Data Block].

The 'inbuf' is still exposed if the caller requires it
(until we fix all legacy callers).

The can now pass an array of expected [status,wct] combinations,
instead of just one expected min_wct.

metze

12 years agosmbXcli: use smb1cli_inbuf_parse_chain() and remember more details per chain response
Stefan Metzmacher [Wed, 16 Nov 2011 10:35:50 +0000 (11:35 +0100)]
smbXcli: use smb1cli_inbuf_parse_chain() and remember more details per chain response

metze

12 years agosmbXcli: add smb1cli_inbuf_parse_chain()
Stefan Metzmacher [Wed, 16 Nov 2011 10:20:15 +0000 (11:20 +0100)]
smbXcli: add smb1cli_inbuf_parse_chain()

metze

12 years agosmbXcli: pass hdr to smb1cli_pull_raw_error()
Stefan Metzmacher [Wed, 16 Nov 2011 10:14:16 +0000 (11:14 +0100)]
smbXcli: pass hdr to smb1cli_pull_raw_error()

metze

12 years agosmbXcli: add state->smb1.recv_{cmd,status,iov}
Stefan Metzmacher [Wed, 16 Nov 2011 10:11:18 +0000 (11:11 +0100)]
smbXcli: add state->smb1.recv_{cmd,status,iov}

In the following commits we will need to remember a few more things.

metze

12 years agosmbXcli: split out a smb1cli_req_flags() function
Stefan Metzmacher [Wed, 7 Sep 2011 17:07:51 +0000 (19:07 +0200)]
smbXcli: split out a smb1cli_req_flags() function

metze

12 years agosmbXcli: set message id to UINT64_MAX for BREAK in smb2cli_req_create()
Stefan Metzmacher [Thu, 22 Sep 2011 19:24:42 +0000 (21:24 +0200)]
smbXcli: set message id to UINT64_MAX for BREAK in smb2cli_req_create()

This way the caller can register an oplock handler.

Note that smb2cli_req_compound_submit() will overwrite this
if a request is send over the wire.

metze

12 years agos3:smb2cli: replace smb2cli_base.c code with the more generic smbXcli_base.c code
Stefan Metzmacher [Thu, 15 Sep 2011 10:46:59 +0000 (12:46 +0200)]
s3:smb2cli: replace smb2cli_base.c code with the more generic smbXcli_base.c code

metze

12 years agosmbXcli: rework smb2cli_req to smbXcli_conn/smbXcli_req
Stefan Metzmacher [Thu, 15 Sep 2011 10:23:05 +0000 (12:23 +0200)]
smbXcli: rework smb2cli_req to smbXcli_conn/smbXcli_req

metze

12 years agolibcli/smb: copy smb2cli_req_* code to smbXcli_base.c
Stefan Metzmacher [Thu, 15 Sep 2011 09:47:11 +0000 (11:47 +0200)]
libcli/smb: copy smb2cli_req_* code to smbXcli_base.c

metze

12 years agosmbXcli: rework smbXcli_base.c to use smbXcli_conn/smbXcli_req
Stefan Metzmacher [Thu, 11 Aug 2011 11:29:59 +0000 (13:29 +0200)]
smbXcli: rework smbXcli_base.c to use smbXcli_conn/smbXcli_req

This splits the low level smb code from 'struct cli_state'
and makes it much more generic and useful for testing.

metze

12 years agosmbXcli: cp source3/libsmb/async_smb.c libcli/smb/smbXcli_base.c
Stefan Metzmacher [Mon, 18 Jul 2011 12:35:03 +0000 (14:35 +0200)]
smbXcli: cp source3/libsmb/async_smb.c libcli/smb/smbXcli_base.c

metze

12 years agosecurity: add local authority well-known SIDs
Christian Ambach [Thu, 1 Sep 2011 14:09:01 +0000 (16:09 +0200)]
security: add local authority well-known SIDs

add the S-1-2 well-known SID family

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Nov 24 19:01:08 CET 2011 on sn-devel-104

12 years agos3:smb2 report access_based_dir_enum in tcon reply
Christian Ambach [Thu, 24 Nov 2011 13:42:21 +0000 (14:42 +0100)]
s3:smb2 report access_based_dir_enum in tcon reply

let the client know when hide unreadable or hide unwriteable files
is set for a share

12 years agos3:smb2 do not set allow_namespace_caching flag for a share
Christian Ambach [Thu, 24 Nov 2011 12:49:17 +0000 (13:49 +0100)]
s3:smb2 do not set allow_namespace_caching flag for a share

this matches Win7/2002R2 behavior and clients also must ignore
this flag when set (MS-SMB 2.2.10), so we should not set it at all