1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/source3/libsmb
David Disseldorp 7b7d4f740f libsmb: reuse connections derived from DFS referrals
[MS-DFSC] 3.2.1.1 and 3.2.1.2 states that DFS targets with the same site
location or relative cost are placed in random order in a DFS referral
response.

libsmbclient currently resolves DFS referrals on every API call, always
using the first entry in the referral response. With random ordering,
libsmbclient may open a new server connection, rather than reuse an
existing (cached) connection established in a previous DFS referred API
call.

This change sees libsmbclient check the connection cache for any of the
DFS referral response entries before creating a new connection.

This change is based on a patch by Har Gagan Sahai
<SHarGagan@novell.com>.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10123

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-01-19 06:48:05 +01:00
..
ABI libsmb: add ABI/smbclient-0.2.1.sigs 2013-06-11 10:50:41 -07:00
async_smb.c s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES anymore 2013-10-17 16:14:58 +02:00
auth_generic.c s3-librpc: Add cli_rpc_pipe_open_with_creds() 2014-10-17 12:57:07 +02:00
cli_smb2_fnum.c s3: libsmbclient - smb2. MacOSX 10 SMB2 server doesn't set STATUS_NO_MORE_FILES when handed a non-wildcard path. 2014-10-23 20:44:31 +02:00
cli_smb2_fnum.h libcli: Make cli_smb2_close_fnum async 2014-06-30 22:28:15 +02:00
cliconnect.c cli_connect_nb_send: don't segfault on host == NULL. 2015-01-19 06:48:05 +01:00
clidfs.c libsmb: reuse connections derived from DFS referrals 2015-01-19 06:48:05 +01:00
clidgram.c param: rename lp function and variable from 'piddir' to 'pid_directory' 2014-02-07 16:19:11 -08:00
clidgram.h Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout. 2012-05-22 16:25:14 -07:00
clientgen.c s3:libsmb: remove unused cli_set_username() function 2014-10-17 12:57:07 +02:00
clierror.c s3:libsmb: get rid of cli_state_disconnect 2012-05-28 14:49:49 +02:00
clifile.c libsmb: Make cli_ntcreate cancellable 2014-06-21 20:38:11 +02:00
clifsinfo.c auth/gensec: remove tevent_context argument from gensec_update() 2014-03-27 00:36:32 +01:00
clilist.c s3-client: smbclient shows no error if deleting a directory with del failed 2013-11-14 21:23:07 +01:00
climessage.c s3:libsmb: s/struct event_context/struct tevent_context 2013-02-19 23:47:54 +01:00
clioplock.c s3:libsmb: s/struct event_context/struct tevent_context 2013-02-19 23:47:54 +01:00
cliprint.c s3:libsmb: get rid of cli_state_server_time_zone 2012-05-28 14:49:48 +02:00
cliquota.c s3: client : Add extra return parameter to all client open calls. 2014-05-09 23:10:07 +02:00
clirap2.c libsmb: Fix CID 241313 Array compared against 0 2013-11-11 21:04:09 +01:00
clirap.c s3-libsmb: Make sure the stat structure is initialized. 2014-10-31 03:47:40 +01:00
clirap.h s3:libsmb: add function cli_qpathinfo3() 2013-10-30 15:23:51 -07:00
clireadwrite.c s3:libsmb: add support for SMB2 in cli_writeall() 2013-08-15 09:07:07 +02:00
clisecdesc.c s3:libsmb: Plumb cli_smb2_set_security_descriptor() inside cli_set_security_descriptor(). 2013-08-15 09:07:07 +02:00
clispnego.c s3: libsmb: Ensure all asn1_XX returns are checked. 2014-09-26 00:51:16 +02:00
clistr.c s3:libsmb: remove unused clistr_push_fn() 2011-07-07 19:16:28 +02:00
clisymlink.c s3: client : Add extra return parameter to all client open calls. 2014-05-09 23:10:07 +02:00
clitrans.c s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES anymore 2013-10-17 16:14:58 +02:00
conncache.c lib: Use "mem_ctx" arg in gencache_get 2013-09-05 20:09:21 +02:00
dsgetdcname.c addns: Remove support for dns_host_file. 2014-12-18 06:47:40 +01:00
errormap_wbc.c
errormap_wbc.h source3/libsmb/errormap_wbc.h: fix licence/copyright 2011-06-10 15:12:27 +02:00
errormap.c s3-lib: Do not walk past the end of the dos_to_ntstatus_map array 2014-09-08 07:26:34 +02:00
libsmb_cache.c Fix some blank line endings 2013-06-21 19:57:06 +02:00
libsmb_compat.c Fix some blank line endings 2013-06-21 19:57:06 +02:00
libsmb_context.c libsmbclient: Wrap more function calls in talloc_stackframe() to protect against talloc_tos() calls 2014-04-02 02:36:08 +02:00
libsmb_dir.c s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth(). 2013-08-05 10:30:00 +02:00
libsmb_file.c s3:libsmb: SMBC_getatr() if no method worked, try all methods again on next attempt 2013-10-30 15:23:51 -07:00
libsmb_misc.c Fix some blank line endings 2013-06-21 19:57:06 +02:00
libsmb_path.c Fix some blank line endings 2013-06-21 19:57:06 +02:00
libsmb_printjob.c Fix some blank line endings 2013-06-21 19:57:06 +02:00
libsmb_server.c s3:libsmb: avoid cli_set_username() in SMBC_server_internal() 2014-10-17 12:57:07 +02:00
libsmb_setget.c s3:libsmb: fix some function header comments. 2014-11-20 18:45:27 +01:00
libsmb_stat.c s3/libsmb: make use of smbXcli_tcon_is_dfs_share() 2013-10-17 16:17:27 +02:00
libsmb_thread_impl.c
libsmb_thread_posix.c
libsmb_xattr.c s3/libsmb_xattr: use security_ace_equal instead of sec_ace_equal 2014-05-29 01:08:25 +02:00
libsmb.h s3:libsmb: Add in the core of the libsmb client SMB2 functions. 2013-08-15 09:07:06 +02:00
namecache.c namecache: fix uninitialised pointer returns 2014-09-13 03:21:39 +02:00
namequery_dc.c s3-kerberos: remove unused kdc_name from create_local_private_krb5_conf_for_domain(). 2014-03-07 18:43:57 +01:00
namequery.c s3-libsmb: Remove obsolete support for dns_host_file. 2014-12-18 06:47:40 +01:00
nmblib.c s3-libsmb: Remove check if array is NULL. 2012-12-21 13:56:01 +01:00
nmblib.h source3/libsmb/nmblib.h: fix licence/copyright 2011-06-10 15:12:31 +02:00
ntlmssp_wrap.c auth/gensec: introduce gensec_internal.h 2013-08-10 09:19:02 +02:00
ntlmssp.c s3-libsmb: Duplicate the memory before we free it. 2014-12-02 21:46:53 +01:00
passchange.c s3:libsmb: Remove unused domain copy stored in cli_state 2014-10-17 12:57:07 +02:00
proto.h s3:libsmb: remove unused cli_set_username() function 2014-10-17 12:57:07 +02:00
pylibsmb.c s3: client : Add extra return parameter to all client open calls. 2014-05-09 23:10:07 +02:00
reparse_symlink.c s3: Fix symlink_reparse_buffer_parse 2011-07-03 11:31:29 +02:00
samlogon_cache.c libsmb: Simplify netsamlogon_cache_get 2014-12-12 20:47:06 +01:00
smb_share_modes.c s3: leases: libsmbsharemodes no longer works with SMB2 leases inside our locking.tdb. 2014-12-04 05:45:09 +01:00
smbclient.pc.in libsmbclient: add ABI checking and pc file 2011-10-18 11:24:55 +11:00
smberr.c s3:libsmb: remove unused smb_dos_errstr() 2011-07-08 14:09:10 +02:00
smbsock_connect.c s3:libsmb: make use of samba_tevent_context_init() 2013-02-19 23:47:46 +01:00
trustdom_cache.c lib: Use "mem_ctx" arg in gencache_get 2013-09-05 20:09:21 +02:00
trusts_util.c libsmb: Allow change of BDC trust account password 2014-12-11 19:14:06 +01:00
unexpected.c lib: Split out sys_[read|write] & friends 2014-12-07 00:12:07 +01:00
wscript Add smbc_getPort(), smbc_setPort(). Bump the .so minor number. 2013-06-11 10:50:41 -07:00