mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3: torture: Add a comprehensive SMB1 DFS path torture tester.
smbtorture3 test is: SMB1-DFS-PATHS Tests open, and then all 4 methods of renaming/hardlinking files: 1). SMBmv 2). SMBtrans2 SETPATHINFO 3). SMBtrans2 SETFILEINFO 4). SMBntrename Also added a test for SMB1findfirst. smbtorture3 test is: SMB1-DFS-SEARCH-PATHS. What this shows is that Windows strips off the SMB1findfirst mask *before* calling the DFS path parser (smbd currently does not). Added so we know how to fix the server code to match Windows behavior in parsing DFS paths in different calls going forward. Passes fully against Windows. Adds knownfails for smbd. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
This commit is contained in:
parent
3a37e4155c
commit
a8ed244148
@ -1 +1,3 @@
|
||||
^samba3.smbtorture_s3.smb2.SMB2-DFS-PATHS.smbtorture\(fileserver\)
|
||||
^samba3.smbtorture_s3.smb1.SMB1-DFS-PATHS.smbtorture\(fileserver\)
|
||||
^samba3.smbtorture_s3.smb1.SMB1-DFS-SEARCH-PATHS.smbtorture\(fileserver\)
|
||||
|
@ -246,6 +246,38 @@ plantestsuite("samba3.smbtorture_s3.smb2.SMB2-DFS-PATHS",
|
||||
smbtorture3,
|
||||
"-mSMB2"])
|
||||
|
||||
#
|
||||
# SMB1-DFS-PATHS needs to run against a special share msdfs-pathname-share
|
||||
# This is an empty DFS share with no links, used merely to test
|
||||
# incoming DFS pathnames and how they map to local paths.
|
||||
#
|
||||
plantestsuite("samba3.smbtorture_s3.smb1.SMB1-DFS-PATHS",
|
||||
"fileserver",
|
||||
[os.path.join(samba3srcdir,
|
||||
"script/tests/test_smbtorture_s3.sh"),
|
||||
'SMB1-DFS-PATHS',
|
||||
'//$SERVER_IP/msdfs-pathname-share',
|
||||
'$USERNAME',
|
||||
'$PASSWORD',
|
||||
smbtorture3,
|
||||
"-mNT1"])
|
||||
|
||||
#
|
||||
# SMB1-DFS-SEARCH-PATHS needs to run against a special share msdfs-pathname-share
|
||||
# This is an empty DFS share with no links, used merely to test
|
||||
# incoming DFS pathnames and how they map to local paths.
|
||||
#
|
||||
plantestsuite("samba3.smbtorture_s3.smb1.SMB1-DFS-SEARCH-PATHS",
|
||||
"fileserver",
|
||||
[os.path.join(samba3srcdir,
|
||||
"script/tests/test_smbtorture_s3.sh"),
|
||||
'SMB1-DFS-SEARCH-PATHS',
|
||||
'//$SERVER_IP/msdfs-pathname-share',
|
||||
'$USERNAME',
|
||||
'$PASSWORD',
|
||||
smbtorture3,
|
||||
"-mNT1"])
|
||||
|
||||
#
|
||||
# SMB2-STREAM-ACL needs to run against a special share - vfs_wo_fruit
|
||||
#
|
||||
|
@ -121,6 +121,8 @@ bool run_smb2_sacl(int dummy);
|
||||
bool run_smb2_quota1(int dummy);
|
||||
bool run_smb2_stream_acl(int dummy);
|
||||
bool run_smb2_dfs_paths(int dummy);
|
||||
bool run_smb1_dfs_paths(int dummy);
|
||||
bool run_smb1_dfs_search_paths(int dummy);
|
||||
bool run_list_dir_async_test(int dummy);
|
||||
bool run_delete_on_close_non_empty(int dummy);
|
||||
bool run_delete_on_close_nonwrite_delete_yes_test(int dummy);
|
||||
|
2339
source3/torture/test_smb1_dfs.c
Normal file
2339
source3/torture/test_smb1_dfs.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -15361,6 +15361,14 @@ static struct {
|
||||
.name = "SMB2-DFS-PATHS",
|
||||
.fn = run_smb2_dfs_paths,
|
||||
},
|
||||
{
|
||||
.name = "SMB1-DFS-PATHS",
|
||||
.fn = run_smb1_dfs_paths,
|
||||
},
|
||||
{
|
||||
.name = "SMB1-DFS-SEARCH-PATHS",
|
||||
.fn = run_smb1_dfs_search_paths,
|
||||
},
|
||||
{
|
||||
.name = "CLEANUP1",
|
||||
.fn = run_cleanup1,
|
||||
|
@ -35,6 +35,7 @@ bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
|
||||
test_notify_online.c
|
||||
test_chain3.c
|
||||
test_smb2.c
|
||||
test_smb1_dfs.c
|
||||
test_authinfo_structs.c
|
||||
test_smbsock_any_connect.c
|
||||
test_cleanup.c
|
||||
|
Loading…
Reference in New Issue
Block a user