5b6493043f
s3/script/tests: Test smbclient -E redirects output to stderr
...
Add new test to ensure smbclient is writing to stderr (with '-E')
Add knownfail for this test (will be removed when issue is fixed in
later commit)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15075
Signed-off-by: Noel Power <noel.power@suse.com >
2022-05-24 09:33:31 +00:00
3145131809
selftest: Test for bug 15062 -- list "username" in netshareenum
...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15062
Signed-off-by: Volker Lendecke <vl@samba.org >
Reviewed-by: Jeremy Allison <jra@samba.org >
2022-05-18 16:50:34 +00:00
e8938c5667
s3:tests: Reformat test_local_s3.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
32ca178ecc
s3:tests: Reformat test_libwbclient_threads.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
15a0ae9ee7
s3:tests: Reformat test_large_acl.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
39cdbec04d
s3:tests: Reformat test_inherit_owner.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
4cc48c8d5b
s3:tests: Reformat test_homes.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
e9079b356a
s3:tests: Reformat test_guest_auth.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
db88210639
s3:tests: Reformat test_groupmap.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
268ae19147
s3:tests: Reformat test_give_owner.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Anoop C S <anoopcs@samba.org >
Reviewed-by: Alexander Bokovoy <ab@samba.org >
2022-05-18 06:58:35 +00:00
cda4db7d59
s3:tests: Reformat test_forceuser_validusers.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org >
Autobuild-Date(master): Thu May 5 11:53:51 UTC 2022 on sn-devel-184
2022-05-05 11:53:51 +00:00
f1e40238e4
s3:tests: Reformat test_force_user_unlink.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 11:00:35 +00:00
3c313a218a
s3:tests: Reformat test_force_group_change.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 11:00:35 +00:00
c72b48051b
s3:tests: Reformat test_force_create_mode.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 11:00:35 +00:00
2af74a2bdd
s3:tests: Reformat test_force_close_share.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 11:00:35 +00:00
ce301a78e3
s3:tests: Reformat test_fifo.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 11:00:35 +00:00
ce1a0119b7
s3:tests: Reformat test_failure.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 11:00:35 +00:00
cc606c7c78
s3:tests: Reformat test_durable_handle_reconnect.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org >
Autobuild-Date(master): Thu May 5 03:42:13 UTC 2022 on sn-devel-184
2022-05-05 03:42:13 +00:00
7366bd1178
s3:tests: Reformat test_dropbox.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 02:47:38 +00:00
4d79f8e158
s3:tests: Reformat test_dfree_quota.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 02:47:38 +00:00
fcbcfc8653
s3:tests: Reformat test_dfree_command.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 02:47:38 +00:00
cdecce9c07
s3:tests: Reformat test_delete_veto_files_only_rmdir.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-05 02:47:38 +00:00
45b648486b
s3:tests: Reformat test_deadtime.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org >
Autobuild-Date(master): Tue May 3 00:10:53 UTC 2022 on sn-devel-184
2022-05-03 00:10:53 +00:00
0d29cbf041
s3:tests: Reformat test_close_denied_share.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
9d32559fb1
s3:tests: Reformat test_chdir_cache.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
a3d0655ee0
s3:tests: Reformat test_async_req.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
6aaf527fc8
s3:tests: Reformat test_aio_outstanding.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
facc2c002c
s3:tests: Reformat test_acl_xattr.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
b4ee11d083
s3:tests: Reformat printing_var_exp_lpr_cmd.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
bfbae4f94c
s3:tests: Reformat dlopen.sh
...
shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-05-02 23:15:37 +00:00
af8747a28b
s3:tests Test "username map" for UNIX groups
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15041
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com >
Reviewed-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Noel Power <npower@samba.org >
2022-04-07 08:55:37 +00:00
012d81d0e2
Add missing final newline to end of sh file
...
find $(pwd) -type f -name "*.sh" | xargs sed -i -e '$a\'
Signed-off-by: Andreas Schneider <asn@samba.org >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
2022-04-01 10:29:31 +00:00
643da37fd1
smbd: remove itime and file_id logic and code
...
This bases File-Ids on the inode numbers again. The whole stuff was
added because at that time Apple clients
1. would be upset by inode number reusage and
2. had a client side bug in their fallback implemetentation that
assigns File-Ids on the client side in case the server provides
File-Ids of 0.
After discussion with folks at Apple it should be safe these days to
rely on the Mac to generate its own File-Ids and let Samba return 0
File-Ids.
Signed-off-by: Ralph Boehme <slow@samba.org >
Reviewed-by: Jeremy Allison <jra@samba.org >
2022-03-31 23:01:37 +00:00
ba9c5ba8ec
CI: add a test listing a snapshotted directory
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15035
Signed-off-by: Ralph Boehme <slow@samba.org >
Reviewed-by: Jeremy Allison <jra@samba.org >
2022-03-31 17:53:29 +00:00
b108e039ab
s3:tests: Add a test to check the output of smbstatus.
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14999
Signed-off-by: Jule Anger <janger@samba.org >
Reviewed-by: Volker Lendecke <vl@samba.org >
2022-03-07 14:35:36 +00:00
39d85c34d2
s3:script: Blackbox tests for the rpcclient DFS commands
...
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com >
Reviewed-by: Andrew Bartlett <abartlet@samba.org >
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz >
2022-03-06 23:05:40 +00:00
1097b1d077
CI: add a test for async dosmode on a file in a shadow_copy2 snapshot
...
Signed-off-by: Ralph Boehme <slow@samba.org >
Reviewed-by: Jeremy Allison <jra@samba.org >
2022-02-28 20:01:36 +00:00
a25c714c34
s3:selftest: Add test for virus scanner
...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14971
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com >
Pair-Programmed-With: Andreas Schneider <asn@samba.org >
Reviewed-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Andreas Schneider <asn@samba.org >
2022-02-10 21:14:33 +00:00
5f1ceead70
torture: Add a test to show that full_audit uses a ptr after free
...
Run vfstest with this vfstest.cmd under valgrind and you'll see what
happens. Exact explanation a few patches further down...
Signed-off-by: Volker Lendecke <vl@samba.org >
Reviewed-by: Jeremy Allison <jra@samba.org >
2022-02-10 18:16:36 +00:00
44cc9fb0e0
s3: tests: Add a new test test_msdfs_rename() that does simple renames on MSDFS root shares.
...
We fail this on SMB2 for a subtle reason.
Our client code called from smbclient only sets the SMB2_HDR_FLAG_DFS flag
in the outgoing packet on the SMB2_CREATE call, and SMB2 rename does the
following operations:
SMB2_CREATE(src_path) // We set SMB2_HDR_FLAG_DFS here for a MSDFS share.
SMB2_SETINFO: SMB2_FILE_RENAME_INFO(dst_path). // We don't set SMB2_HDR_FLAG_DFS
However, from smbclient, dst_path is a MSDFS path but we don't set the flag,
so even though the rename code inside smbd will cope with a MSDFS path
(as used in the SMB1 SMBmv call) it fails as the correct flag isn't set.
Add knownfail selftest/knownfail.d/msdfs-rename.
Note we need to add the new test to "selftest/knownfail.d/smb1-tests"
as test_smbclient_s3.sh is run against the (ad_member|nt4_member)
environments first using NT1 (SMB1) protocol and then using SMB3,
but the (ad_member|nt4_member) environments don't support SMB1.
Seems a bit strange to me, but all the other SMB1 tests inside
test_smbclient_s3.sh have already been added to "selftest/knownfail.d/smb1-tests"
so just go with the test environment.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14169
Signed-off-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Noel Power <npower@samba.org >
2022-02-04 11:10:33 +00:00
d7deb87605
s3: tests: Add a new test test_msdfs_hardlink() that does simple hardlinks on MSDFS root shares.
...
We pass this already as the cmd_hardlink in smbclient doesn't
do the DFS path conversion on the hardlink target. But it's
good to have the test.
Note we need to add the new test to "selftest/knownfail.d/smb1-tests"
as test_smbclient_s3.sh is run against the (ad_member|nt4_member)
environments first using NT1 (SMB1) protocol and then using SMB3,
but the (ad_member|nt4_member) environments don't support SMB1.
Seems a bit strange to me, but all the other SMB1 tests inside
test_smbclient_s3.sh have already been added to "selftest/knownfail.d/smb1-tests"
so just go with the test environment.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14169
Signed-off-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Noel Power <npower@samba.org >
2022-02-04 11:10:33 +00:00
a44435c6e7
CVE-2021-44141: s3: torture: Add a test samba3.blackbox.test_symlink_rename.SMB1.posix that shows we still leak target info across a SMB1+POSIX rename.
...
Add a knownfail.d/posix_sylink_rename
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14911
Signed-off-by: Jeremy Allison <jra@samba.org >
2022-01-31 15:27:37 +00:00
3e9f6d704d
CVE-2021-44141: s3: torture: In test_smbclient_s3, change the error codes expected for test_widelinks() and test_nosymlinks() from ACCESS_DENIED to NT_STATUS_OBJECT_NAME_NOT_FOUND.
...
For SMB1/2/3 (minus posix) we need to treat bad symlinks
as though they don't exist.
Add to knwownfail.d/symlink_traversal
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14911
Signed-off-by: Jeremy Allison <jra@samba.org >
2022-01-31 15:27:37 +00:00
4e75e24baa
CVE-2021-44141: s3: torture: Add samba3.blackbox.test_symlink_traversal.SMB1.posix
...
Add to knownfail.d/symlink_traversal.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14911
Signed-off-by: Jeremy Allison <jra@samba.org >
2022-01-31 15:27:37 +00:00
3bc85d615e
CVE-2021-44141: s3: torture: Add samba3.blackbox.test_symlink_traversal.SMB1.
...
Add to knownfail.d/symlink_traversal.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14911
Signed-off-by: Jeremy Allison <jra@samba.org >
2022-01-31 15:27:37 +00:00
1f7e870dda
CVE-2021-44141: s3: torture: Add samba3.blackbox.test_symlink_traversal.SMB2.
...
Add to knownfail.d/symlink_traversal
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14911
Signed-off-by: Jeremy Allison <jra@samba.org >
2022-01-31 15:27:37 +00:00
0d9d1546a7
s3: selftest: Add two tests that show we try and send an SMB1 request over an SMB2 connection to list servers if "-mSMB3" is selected.
...
Add knownfail: knownfail.d/list_servers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14939
Signed-off-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Noel Power <npower@samba.org >
2022-01-06 10:57:30 +00:00
89f284af61
s3: tests: Fix the samba3.blackbox.acl_xattr test to actually negotiate SMB1+POSIX before using POSIX calls.
...
Remove the following entries in knownfail.d/posix_infolevel_fails.
samba3.blackbox.acl_xattr.NT1.nt_affects_posix.*
samba3.blackbox.acl_xattr.NT1.nt_affects_chown.*
samba3.blackbox.acl_xattr.NT1.nt_affects_chgrp.*
Signed-off-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Ralph Boehme <slow@samba.org >
2021-12-11 11:14:31 +00:00
e7f2cfb544
s3: tests: Fix the samba3.blackbox.inherit_owner test to actually negotiate SMB1+POSIX before using POSIX calls.
...
Remove the following entry in knownfail.d/posix_infolevel_fails.
samba3.blackbox.inherit_owner.*.NT1.*verify.*unix\ owner.*
Signed-off-by: Jeremy Allison <jra@samba.org >
Reviewed-by: Ralph Boehme <slow@samba.org >
2021-12-11 11:14:31 +00:00
9faa317319
selftest: Add reproducer for bug 14908
...
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14908
Signed-off-by: Volker Lendecke <vl@samba.org >
Reviewed-by: Ralph Boehme <slow@samba.org >
2021-11-17 17:41:30 +00:00