1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

79 Commits

Author SHA1 Message Date
Stefan Metzmacher
ca000d8901 s4:libcli: add fallback_to_anonymous to smb2_connect_send()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24 06:55:23 +02:00
Stefan Metzmacher
f20e607c15 s4:libcli: allow passing an already negotiated connection to smb2_connect_send()
It will just do the session setup and tree connect steps.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24 06:55:23 +02:00
Stefan Metzmacher
5ad5b81b6e s4:libcli: split out smb2_connect_session_start()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2018-07-24 06:55:23 +02:00
Ralph Boehme
8cbdc6a6df libcli/smb: add max_credits arg to smbXcli_negprot_send()
This allows source4/torture code to set the option for tests by
preparing a struct smbcli_options with max_credits set to some value and
pass that to a torture_smb2_connection_ext().

This will be used in subsequent smbtorture test for SMB2 creditting.

Behaviour of existing upper layers is unchanged, they simply pass the
wanted max credits value to smbXcli_negprot_send() instead of
retrofitting it with a call to smb2cli_conn_set_max_credits().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-03-03 21:55:27 +01:00
Stefan Metzmacher
5721234328 CVE-2016-2115: s4:libcli/smb2: use the configured min_protocol
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-04-12 19:25:26 +02:00
Stefan Metzmacher
d0a1995b93 s4:libcli/smb2: allow the caller to specify a specific value for max_protocol.
The default is still PROTOCOL_LATEST. As smb2_connect*() is about SMB2/3 only
we upgrade to PROTOCOL_LATEST if PROTOCOL_NT1 or lower is given.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-27 16:45:05 +01:00
Stefan Metzmacher
c723d57e66 s4:libcli/smb2: make use of smb2cli_tcon*() in connect.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-30 23:35:08 +02:00
Stefan Metzmacher
78e46d7349 s4:libcli/smb2: remove unused 'primary' argument of smb2_session_init()
This also gets rid of a talloc_reference() usage.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-24 19:07:05 +02:00
Michael Adam
596f802d5d s4:libcli:smb2: make smbcli_options argument to smb2_connect_(send|ext) const
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-05 14:04:07 +02:00
Stefan Metzmacher
0aac3c09f1 libcli/smb: pass smbXcli_session to smb2cli_tcon_set_values()
metze
2012-07-25 14:48:50 +02:00
Stefan Metzmacher
57fda88dfb s4:libcli/smb2: remove unused elements from smb2_tree
metze
2012-07-25 12:15:04 +02:00
Stefan Metzmacher
41538b17c5 s4:libcli/smb2: setup a smbXcli_tcon for each smb2_tree
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
49acba37e7 s4:libcli/smb2: use PROTOCOL_LATEST
metze
2012-05-06 14:50:39 +02:00
Michael Adam
1451e5f663 s4:libcli:smb2: store the share capabilites in the smb2_tree object 2012-03-03 17:03:07 +01:00
Michael Adam
5a5f98dc70 s4:libcli:smb2: allow max protocol 0x0224 2012-03-03 17:03:07 +01:00
Michael Adam
28b77605c4 s4:libcli:smb2: add a smb2_connect_ext variant of smb2_connect that takes a previous_session argument 2012-02-28 00:08:54 +01:00
Michael Adam
e9210987c6 s4:libcli:smb2: add a previous session argument to smb2_connect_send() 2012-02-28 00:08:53 +01:00
Michael Adam
69a64e6695 s4:libcli:smb2: add a previous session argument to smb2_session_setup_spnego()
So that we can do a session reconnect.
2012-02-28 00:08:53 +01:00
Michael Adam
6a93475dd0 s4:libcli:smb2: don't allocate the smb2_tree struct earlier than necessary in smb2_connect()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-02-03 11:10:30 +01:00
Michael Adam
97823b69e9 s4:libcli/torture:smb2: change smb2_tree_connect to take a smb2_session instead of smb2_tree arguement.
Only the tree->session is needed. This way it is less confusing.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-02-03 11:10:30 +01:00
Stefan Metzmacher
99ef6a4bec s4:libcli: do the nbss session request within smbcli_sock_connect_*()
metze
2011-11-30 13:41:09 +01:00
Stefan Metzmacher
300343d16c s4:libcli/smb2: implement on top of smbXcli_conn/req
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
f07274978a s4:libcli/smb2: s/SMB_SIGNING_SUPPORTED/SMB_SIGNING_IF_REQUIRED/
metze
2011-11-03 16:55:12 +01:00
Stefan Metzmacher
01ccd59ce0 s4:libcli/smb2: remove unused SMB_SIGNING_AUTO handling
metze
2011-11-03 16:55:11 +01:00
Stefan Metzmacher
22902ef9b8 s4:libcli/smb2: SMB_SIGNING_DEFAULT matches SMB_SIGNING_SUPPORTED on the client for now
metze
2011-11-03 16:55:11 +01:00
Stefan Metzmacher
f293438abd s4:libcli/smb2: let SMB_SIGNING_AUTO behave like SMB_SIGNING_SUPPORTED
This matches the smb1 behavior.

metze
2011-11-03 16:55:11 +01:00
Andrew Bartlett
a1f04e8abc libcli/util Rename common map_nt_error_from_unix to avoid duplicate symbol
The two error tables need to be combined, but for now seperate the names.

(As the common parts of the tree now use the _common function,
errmap_unix.c must be included in the s3 autoconf build).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun 20 08:12:03 CEST 2011 on sn-devel-104
2011-06-20 08:12:03 +02:00
Stefan Metzmacher
01cb5984ac s4:libcli/smb2: let smb2_session_setup_spnego_* use tevent_req
metze
2011-04-28 20:36:03 +02:00
Stefan Metzmacher
8116b19a28 s4:libcli/smb2: move smb2_connect_tcon_done()
It should be after smb2_connect_session_done().

metze
2011-04-28 20:35:59 +02:00
Stefan Metzmacher
eb0eb971ca s4:libcli/smb2: move smb2_connect_session_done()
It should be after smb2_connect_negprot_done().

metze
2011-04-28 20:35:57 +02:00
Stefan Metzmacher
ad65cf5b6a s4:libcli/smb2: move smb2_connect_negprot_done()
It should be after smb2_connect_socket_done().

metze
2011-04-28 20:35:56 +02:00
Stefan Metzmacher
1b4a167354 s4:libcli/smb2: move smb2_connect_socket_done()
It should be after smb2_connect_resolve_done().

metze
2011-04-28 20:35:54 +02:00
Stefan Metzmacher
87d2537b48 s4:libcli/smb2: move smb2_connect_resolve_done()
It should be after smb2_connect_send().

metze
2011-04-28 20:35:52 +02:00
Stefan Metzmacher
2e5b539ba9 s4:libcli/smb2: rename step functions of smb2_connect_*()
They should all start with a smb2_connect_ prefix.

metze
2011-04-28 20:35:51 +02:00
Stefan Metzmacher
578cbf1139 s4:libcli/smb2: convert smb2_connect_*() to tevent_req
metze
2011-04-28 20:35:49 +02:00
Andrew Tridgell
92786aebf1 s4-resolve: fixed a crash bug on timeout
We were creating the name resolution context as a child of lp_ctx,
which meant when we gave up on a connection the timer on name
resolution kept running, and when it timed out the callback crashed as
the socket was already removed.
2009-09-19 08:23:03 -07:00
Stefan Metzmacher
01b05df766 s4:libcli/smb2: use new SMB2_DIVELECT_REVISION constants
Also send them in the order a windows client would
send them (the lowest first).

metze
2009-05-26 09:50:43 +02:00
Stefan Metzmacher
5b55e47b71 s4:libcli/smb2: fill in transport->negotiate.secblob with the correct data
metze
2009-05-20 19:58:36 +02:00
Zach Loafman
8595f260eb s4 libcli: Add back Longhorn beta dialect as a constant
Also tweak how the dialect array and count is initialized.
2009-03-18 11:03:33 -07:00
Zach Loafman
6c08e329fa s4 libcli: Add SMB2.1 dialect to libcli
Negotiate 2.1 if possible, leave negotiate results in
transport->negotiate.dialect_revision.
2009-03-17 13:43:27 -07:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
29a20af75f Remove use of global_loadparm for SMB2 client connections. 2008-11-02 16:20:00 +01:00
Jelmer Vernooij
c537f7a914 Fix the build. 2008-11-02 05:49:36 +01:00
Jelmer Vernooij
b034c519f5 Add gensec_settings structure. This wraps loadparm_context for now, but
should in the future only contain some settings required for gensec.
2008-11-02 02:05:48 +01:00
Jelmer Vernooij
d9cbf2b0d9 Remove another use of global_loadparm. 2008-11-01 23:26:36 +01:00
Jelmer Vernooij
7942333712 Remove another use of global_loadparm. 2008-11-01 23:09:18 +01:00
Jelmer Vernooij
9293c59e25 Move calls to lp_* higher up in the call stack. 2008-11-01 22:42:09 +01:00
Jelmer Vernooij
57a60f0920 Move lp_*() calls a bit higher up the calls tack. 2008-11-01 22:13:47 +01:00
Stefan Metzmacher
95940d75ec s4:libcli/smb2: remove unused header
This hopefully fixes the build with internal popt.

metze
2008-09-29 07:43:50 +02:00
Andrew Tridgell
5a5e2df569 for use in python we need to use global_loadparm 2008-09-24 18:10:23 -07:00