Jeremy Allison
b4455f0487
s3: libsmb: In cli_posix_open_internal_send() (SMBtrans2:TRANSACT2_SETPATHINFO) check for DFS pathname.
...
See smbtorture3: SMB1-DFS-PATHS: test_smb1_setpathinfo_XXXX()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 15 19:44:00 UTC 2022 on sn-devel-184
2022-09-15 19:44:00 +00:00
Jeremy Allison
fa7e6899b3
s3: libsmb: In cli_qpathinfo_send() (SMBtrans2:TRANSACT2_QPATHINFO) check for DFS pathname.
...
See smbtorture3: SMB1-DFS-PATHS: test_smb1_qpathinfo()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
adc4a1b290
s3: libsmb: In cli_set_ea_path() (SMBtrans2:TRANSACT2_SETPATHINFO) check for DFS pathname.
...
See smbtorture3: SMB1-DFS-PATHS: test_smb1_setpathinfo_XXXX()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
5c083e8bc3
s3: libsmb: In cli_ctemp_send() (SMBctemp) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_ctemp() shows
SMBctemp uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
6a82167f11
s3: libsmb: In cli_chkpath_send() (SMBcheckpath) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_chkpath() shows
SMBcheckpath uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
a53c049c4d
s3: libsmb: In cli_setatr_send() (SMBsetatr) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_setatr() shows
SMBsetatr uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
75339aec0e
s3: libsmb: In cli_getatr_send() (SMBgetatr) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_getatr() shows
SMBgetatr uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
b58cee4251
s3: libsmb: In cli_openx_create() (SMBopenX) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_openx() shows
SMBopenX uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
ab12572264
s3: libsmb: In cli_nttrans_create_send() (SMBnttrans:NT_TRANSACT_CREATE) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_nttrans_create() shows
SMBnttrans:NT_TRANSACT_CREATE uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
198869afec
s3: libsmb: In cli_ntcreate1_send() (SMBntcreateX) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_ntcreatex() shows
SMBntcreateX uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
8561eaa02d
s3: libsmb: In cli_rmdir_send() (SMBrmdir) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_rmdir() shows
SMBrmdir uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
47cf519e98
s3: libsmb: In cli_mkdir_send() (SMBmkdir) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_mkdir() shows
SMBmkdir uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
e2efea7d1f
s3: libsmb: In cli_unlink_send() (SMBunlink) check for DFS pathname.
...
smbtorture3: SMB1-DFS-OPERATIONS: test_smb1_unlink() shows
SMBunlink uses DFS paths.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
73a6e2b14a
s3: libsmb: In cli_ntrename_internal_send() (SMBntrename) check for DFS dst pathname.
...
See smbtorture3: SMB1-DFS-PATHS: test_smb1_ntrename_rename().
and smbtorture3: SMB1-DFS-PATHS: test_smb1_ntrename_hardlink().
Remove the old code that stripped a DFS name from the
destination filename, and go through smb1_dfs_share_path()
as we did for fname_src in the last commit.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
f1765c9c7b
s3: libsmb: In cli_ntrename_internal_send() (SMBntrename) check for DFS source pathname.
...
smbtorture3: SMB1-DFS-PATHS: test_smb1_ntrename_rename() shows
SMBntrename uses DFS for src and dst.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
44bf2bc89a
s3: libsmb: In cli_cifs_rename_send() (SMBmv) check for DFS dst pathname.
...
See smbtorture3: SMB1-DFS-PATHS: test_smb1_mv().
Remove the old code that stripped a DFS name from the
destination filename, and go through smb1_dfs_share_path()
as we did for fname_src in the last commit.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
4da3c724d5
s3: libsmb: In cli_cifs_rename_send() (SMBmv) check for DFS source pathname.
...
smbtorture3: SMB1-DFS-PATHS: test_smb1_mv() shows
SMBmv uses DFS for src and dst.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
2d28696efe
s3: libsmb: Make cli_setpathinfo_send() (SMBtrans2: TRANSACT2_SETPATHINFO) DFS path aware.
...
See smbtorture3: SMB1-DFS-PATHS: test_smb1_setpathinfo_XXXX()
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
f34fad61fd
s3: smbcacls: Now cli_resolve_path() and cli_list() can handle DFS names we no longer need local_cli_resolve_path().
...
Remove local_cli_resolve_path(). No more special treatment for DFS names in smbcacls.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Noel Power <noel.power@suse.com>
2022-09-15 18:43:32 +00:00
Jeremy Allison
3c2a31b438
s3: libsmb: Fix cli_resolve_path() to cope with DFS paths passed in as well as local paths.
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
d9f0d92479
s3: libsmb: Fix SMB1 cli_list_old_send() to cope with DFS paths.
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
4a9458d03d
s3: libsmb: Fix SMB1 cli_list_trans_send() (SMBtrans2:TRANSACT2_FINDFIRST) to cope with DFS paths.
...
See smbtorture3: SMB1-DFS-SEARCH-PATHS: test_smb1_findfirst_path
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
c98d165e51
s3: libsmb: Add smb1_dfs_share_path() to convert a name into a DFS path if needed.
...
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
dd9cdfb3b1
s3: libsmb: For SMB2 opens on a DFS share, convert to a DFS path if not already done.
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
26b4a6951b
s3: libsmb: Add cli_dfs_is_already_full_path() function.
...
Returns true if it's already a fully qualified DFS path.
Not yet used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
070b73e3f9
s3: libsmb: In cli_list_old_send(), push state->mask into the packet, not just mask.
...
This doesn't matter right now, but it will when I
add DFS path awareness to cli_list().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
ad97a97bd8
s3: libsmb: Make cli_state_save_tcon()/cli_state_restore_tcon() static.
...
There are no external callers.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
4e3ea1b2e7
s3: smbcacls: In cli_lsa_lookup_domain_sid(), replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
There are now no more external users of cli_state_save_tcon()/cli_state_restore_tcon()
so we can make them static.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
fddade459f
s3: utils: In show_userlist() replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
d116a079e9
s3: torture: In run_tcon_test() replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Also fix a comment in run_uid_regression_test().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
cf02ed2f60
s3: torture: In run_smb2_basic(), replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
fcf090279e
s3: libsmb: In cli_check_msdfs_proxy() replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
83dab4238c
s3: libsmb: In cli_lsa_lookup_name() replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
73fde1fbbf
s3: libsmb: In cli_lsa_lookup_sid() replace cli_state_save_tcon()/cli_state_restore_tcon() with cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
c3c7164985
s3: libsmb: Add pair cli_state_save_tcon_share()/cli_state_restore_tcon_share().
...
Wraps cli_state_save_tcon()//cli_state_restore_tcon() but
also returns cli->sharename.
We are going to replace all uses of cli_state_save_tcon()/cli_state_restore_tcon()
so we also save/restore the cli->share for DFS purposes.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviwed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
dfd7c6ca78
s3: libsmb: Cleanup - remove unused fname_src parameter from cli_dfs_target_check().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
c7749103b2
s3: libsmb: Add missing memory allocation fail check in cli_openx_create().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
a213a371ae
s3: libsmb: Add missing memory allocation fail checks in cli_ntcreate1_send().
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-15 18:43:32 +00:00
Jeremy Allison
95bd776d2a
s3: smbtorture3: Add test_smb1_qpathinfo() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 14 18:37:06 UTC 2022 on sn-devel-184
2022-09-14 18:37:06 +00:00
Jeremy Allison
85dc30f959
s3: smbtorture3: Add test_smb1_ctemp() DFS test to run_smb1_dfs_operations().
...
NB. This passes against Windows, but SMBctemp is broken on a Windows DFS
share and always returns NT_STATUS_FILE_IS_A_DIRECTORY.
When we fix the Samba server to correctly process DFS
pathnames we'll have to change this test to understand
it's running against smbd and modify the expected behavior
to match a working server.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
7b5955dcd5
s3: smbtorture3: Add test_smb1_chkpath() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off--by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
5cbb8abc1b
s3: smbtorture3: Add test_smb1_setatr() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
243433bd57
s3: smbtorture3: Add test_smb1_getatr() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
cc3d76d877
s3: smbtorture3: Add test_smb1_create() DFS test to run_smb1_dfs_operations().
...
Tests SMBcreate and SMBmknew.
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
f1475e64b0
s3: smbtorture3: Add test_smb1_open() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
ad472f7741
s3: smbtorture3: Add test_smb1_openx() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
4e8e78e234
s3: smbtorture3: Add test_smb1_nttrans_create() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
18bdcd85e4
s3: smbtorture3: Add test_smb1_ntcreatex() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
f7b06ea37c
s3: smbtorture3: Add test_smb1_rmdir() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00
Jeremy Allison
2eb561f0a7
s3: smbtorture3: Add test_smb1_mkdir() DFS test to run_smb1_dfs_operations().
...
Passes against Windows.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2022-09-14 17:33:37 +00:00