1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
samba-mirror/source3/libsmb
Jeremy Allison 4f80f5f904 s3: libsmb: cli_state_save_tcon(). Don't deepcopy tcon struct when temporarily swapping out a connection on a cli_state.
This used to make a deep copy of either
cli->smb2.tcon or cli->smb1.tcon, but this leaves
the original tcon pointer in place which will then get
TALLOC_FREE()'d when the new tree connection is made on
this cli_state.

As there may be pipes open on the old tree connection with
talloc'ed state allocated using the original tcon pointer as a
talloc parent we can't deep copy and then free this pointer
as that will fire the destructors on the pipe memory and
mark them as not connected.

This call is used to temporarily swap out a tcon pointer
(whilst keeping existing pipes open) to allow a new tcon
on the same cli_state and all users correctly call
cli_state_restore_tcon() once they are finished with
the new tree connection.

Just return the existing pointer and set the old value to NULL.
We know we MUST be calling cli_state_restore_tcon() below
to restore the original tcon tree connection pointer before
closing the session.

Remove the knownfail.d entry.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb  2 21:05:25 UTC 2021 on sn-devel-184
2021-02-02 21:05:25 +00:00
..
ABI s3:libsmb: Use cli_credentials_set_smb_encryption() 2020-08-19 16:22:42 +00:00
async_smb.c
auth_generic.c
cli_smb2_fnum.c s3:libsmb: Fix clang warnings that fnum might be used uninitialized 2020-11-26 09:44:41 +00:00
cli_smb2_fnum.h libsmb: Remove unused sync cli_smb2_list() 2020-11-19 02:48:40 +00:00
cliconnect.c s3:libsmb: Pass cli_credentials to get_ipc_connect_master_ip() 2021-01-13 20:28:34 +00:00
clidfs.c s3: libsmb: Ensure we disconnect the temporary SMB1 tcon pointer on failure to set up encryption. 2021-02-02 19:54:34 +00:00
clidgram.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
clidgram.h libsmb: Pass "account_name/flags" through nb_getdc 2018-04-11 01:06:39 +02:00
clientgen.c s3: libsmb: cli_state_save_tcon(). Don't deepcopy tcon struct when temporarily swapping out a connection on a cli_state. 2021-02-02 21:05:25 +00:00
clierror.c libsmb: Remove unused cli_errstr() 2020-05-25 08:13:28 +00:00
clifile.c libsmb: Make cli_rename_send()/recv() smb2-capable 2020-11-16 19:53:46 +00:00
clifsinfo.c libsmb: Remove clistr_pull_talloc() 2020-05-28 19:11:38 +00:00
clilist.c libsmb: Use async cli_smb2_list_send() in cli_list_send() 2020-11-19 02:48:40 +00:00
climessage.c s3/libsmb: clang: Fix 'Value stored to 'p' is never read' 2019-10-22 17:28:27 +00:00
clioplock.c libsmb: Use cli_lockingx() in cli_oplock_ack() 2019-06-18 12:53:59 +00:00
cliprint.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
cliquota.c s3/libsmb: clang: Fix 'Value stored during initialization is never read' 2019-08-28 03:06:42 +00:00
clirap.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
clirap.h libsmb: Add async cli_qfileinfo_basic 2020-06-04 17:11:39 +00:00
clireadwrite.c s3/libsmb: clang: Fix 'warning: Assigned value is garbage or undefined ' 2019-08-28 00:22:49 +00:00
clisecdesc.c libsmb: Make cli_set_security_descriptor() async 2020-11-16 19:53:45 +00:00
clispnego.c CVE-2020-10704: lib util asn1: Add ASN.1 max tree depth 2020-05-04 02:59:31 +00:00
clistr.c libsmb: Remove clistr_pull_talloc() 2020-05-28 19:11:38 +00:00
clisymlink.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
clitrans.c libsmb: Make cli_trans_send cancellable 2018-11-21 16:53:41 +01:00
conncache.c lib: Remove gencache.h from proto.h 2018-10-19 18:52:50 +02:00
dsgetdcname.c libsmb: No need to call dns_lookup_list_async() in discover_dc_dns() 2020-12-11 18:29:32 +00:00
dsgetdcname.h libsmb: Give dsgetdcname.c its own header 2018-04-11 01:06:39 +02:00
errormap_wbc.c
errormap_wbc.h
errormap.c lib: Align integer types 2020-01-19 18:29:39 +00:00
libsmb_cache.c
libsmb_compat.c s3: libsmb: Added new API smbc_readdirplus2() 2019-10-30 20:44:31 +00:00
libsmb_context.c s3:libsmb: Use cli_credentials_set_smb_encryption() 2020-08-19 16:22:42 +00:00
libsmb_dir.c s3:libsmb: Use cli_credentials directly 2021-01-13 21:32:52 +00:00
libsmb_file.c s3:libsmb: Pass cli_credentials to cli_resolve_path(), using helper variables. 2020-10-09 19:16:46 +00:00
libsmb_misc.c libsmb: Make SMBC_dlist_contains return bool 2020-05-25 08:13:27 +00:00
libsmb_path.c libsmb: Use hex_byte() in urldecode_talloc() 2021-01-08 20:31:33 +00:00
libsmb_printjob.c
libsmb_server.c s3:libsmb: Remove force_encrypt from cli_check_msdfs_proxy() 2020-10-09 19:16:45 +00:00
libsmb_setget.c s3: libsmb: Added new API smbc_readdirplus2() 2019-10-30 20:44:31 +00:00
libsmb_stat.c libsmb: Use ZERO_STRUCTP 2020-10-21 19:04:38 +00:00
libsmb_thread_impl.c
libsmb_thread_posix.c
libsmb_xattr.c libsmb: Simplify add_ace() 2021-01-22 19:54:38 +00:00
libsmb.h
namecache.c s3: libsmb: Now we only have namecache_store_sa(), rename it back to namecache_store(). 2020-09-07 13:23:44 +00:00
namequery_dc.c s3: libsmb: Rename get_sorted_dc_list_sa() -> get_sorted_dc_list(). 2020-09-15 10:09:39 +00:00
namequery.c lib: Move sockaddr_storage_to_samba_sockaddr() to lib/ 2021-01-11 13:19:32 +00:00
namequery.h lib: Move sockaddr_storage_to_samba_sockaddr() to lib/ 2021-01-11 13:19:32 +00:00
nmblib.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
nmblib.h s3:libsmb: move cli_set_message() to source3/libsmb/nmblib.c 2020-02-26 19:45:36 +00:00
passchange.c s3:smbpasswd: Print debug message about Netbios 2019-01-09 18:40:44 +01:00
proto.h s3:libsmb: Pass cli_credentials to get_ipc_connect_master_ip() 2021-01-13 20:28:34 +00:00
pylibsmb.c s3:libsmb: Use C99 initializer for py_cli_notify_state_methods 2021-02-01 21:50:32 +00:00
reparse_symlink.c libsmb: Add overflow protection to symlink_reparse_buffer_marshall() 2020-06-15 17:59:39 +00:00
samlogon_cache.c lib:util: Move discard_const(_p) to own header for libndr.h 2019-02-14 15:59:26 +01:00
samlogon_cache.h samlogon_cache: add netsamlog_cache_for_all() 2017-07-03 19:59:09 +02:00
smbclient.pc.in
smberr.c
smbsock_connect.c s3/libsmb: clang: Fix 'Assigned value is garbage or undefined' 2019-10-22 17:28:27 +00:00
trusts_util.c s3/libsmb: clang: value stored to 'idx_current' is never read 2019-09-26 18:41:28 +00:00
unexpected.c libsmb: Fix an error path memleak 2018-02-13 16:42:22 +01:00
unexpected.h libnmb: Make nb_packet_read_recv return a talloc'ed pkt 2018-01-24 00:58:17 +01:00
wscript s3:libsmb: Use cli_credentials_set_smb_encryption() 2020-08-19 16:22:42 +00:00