1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
samba-mirror/source4/torture/smb2
Stefan Metzmacher f9d7a930f0 s4:torture/smb2: add smb2.create.mkdir-visible
This reproduces a race where one client creates
a directory and other clients see it before
the directory is fully setup including the correct
permissions and similar things.

We have a DENY ACE for SEC_DIR_ADD_FILE, which means
that files can't be created. This is set on
a base directory 'mkdir_visible'.

Then we have a lot of async loops trying to create
a file called 'mkdir_visible\dir\file_NR'. These loop
as fast as possible expecting OBJECT_PATH_NOT_FOUND,
because 'mkdir_visible\dir' is not there.

Then we send a create for 'mkdir_visible\dir' and
expect that to work.

This should turn the 'mkdir_visible\dir\file_NR' loop
into getting ACCESS_DENIED, because the
DENY ACE for SEC_DIR_ADD_FILE should be inherited
before 'mkdir_visible\dir' is visible to other clients.

Because of the complex steps in mkdir_internal(),
smbd allows the creation 'mkdir_visible\dir\file_NR',
as 'mkdir_visible\dir' is already visible after the
mkdirat(), before the DENY ACE is inherited.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2024-08-21 08:02:30 +00:00
..
acls.c s4:torture/smb2: fix typo in acls.c 2023-10-11 11:47:44 +00:00
attr.c torture: add another simple DOS attributes test 2022-12-09 23:11:38 +00:00
bench.c s4:torture/smb2: add 'smb2.bench.session-setup' 2024-07-30 15:18:42 +00:00
block.c
block.h
charset.c
compound.c s4:torture:smb2: Fix code spelling 2023-08-14 21:45:30 +00:00
connect.c
create.c s4:torture/smb2: add smb2.create.mkdir-visible 2024-08-21 08:02:30 +00:00
credits.c
delete-on-close.c s4/torture: Remove already existing test_dir 2024-06-10 13:17:58 +00:00
deny.c
dir.c s4:torture:smb2: Fix code spelling 2023-08-14 21:45:30 +00:00
dosmode.c CI: add test "smb2.async_dosmode" 2022-02-28 20:01:36 +00:00
durable_open.c s4:torture: Initialize pointer with NULL 2024-07-18 12:47:29 +00:00
durable_v2_open.c s4: torture: Add regression test for re-opening a durable handle after calling SMB2 setinfo (end of file). 2022-03-24 16:28:37 +00:00
ea.c s4:torture:smb2: Fix code spelling 2023-08-14 21:45:30 +00:00
getinfo.c smbtorture: check required access for SMB2-GETINFO 2022-08-23 11:52:29 +00:00
ioctl.c s4:torture/smb2: add smb2.ioctl.copy_chunk_bug15644 2024-06-17 16:54:29 +00:00
lease_break_handler.c s4:torture/smb2: provide verbose output when we're waiting for potential lease/oplock breaks 2021-03-29 19:36:37 +00:00
lease_break_handler.h
lease.c s4:torture: Initialize struct smb2_handle consistently in lease.c 2024-07-05 07:45:32 +00:00
lock.c
mangle.c torture: test that a find with a mangled name works 2022-12-10 00:07:09 +00:00
max_allowed.c source4/torture: Add SEC_STD_DELETE to enable proper cleanup 2024-02-26 18:35:43 +00:00
maxfid.c s4/torture: move deletion out of close loop in torture_smb2_maxfid() 2021-01-28 08:11:49 +00:00
maxwrite.c
mkdir.c
multichannel.c Revert "s4:torture: Increase multichannel timeout" 2023-12-08 02:28:33 +00:00
notify_disabled.c s4:torture: Migrate smbtorture to new cmdline option parser 2021-06-16 00:34:38 +00:00
notify.c source4/torture: Drop unused variable mask 2022-02-17 18:12:52 +00:00
oplock_break_handler.c s4:torture/smb2: provide verbose output when we're waiting for potential lease/oplock breaks 2021-03-29 19:36:37 +00:00
oplock_break_handler.h
oplock.c s4:torture:smb2: Fix code spelling 2023-08-14 21:45:30 +00:00
read_write.c
read.c s4:torture/smb2: add smb2.read.bug14607 test 2021-07-15 23:04:34 +00:00
rename.c torture: add a test veryfing timestamps across rename 2022-12-09 23:11:38 +00:00
replay.c s4:torture:smb2: Fix code spelling 2023-08-14 21:45:30 +00:00
samba3misc.c s4:torture:smb2: Fix code spelling 2023-08-14 21:45:30 +00:00
scan.c s4:torture: Migrate smbtorture to new cmdline option parser 2021-06-16 00:34:38 +00:00
secleak.c
sessid.c
session.c s4:torture/smb2: let smb2.session.expire2* also check compound requests 2024-08-13 21:13:33 +00:00
setinfo.c
sharemode.c s4:torture: Initialize struct smb2_create 2024-07-16 11:41:33 +00:00
smb2.c CVE-2023-3347: CI: add a test for server-side mandatory signing 2023-07-21 12:05:35 +00:00
streams.c smbtorture: add test smb2.stream.attributes2 2022-08-22 08:02:35 +00:00
tcon.c
timestamps.c s4/torture: Fix misplaced positional arguments for u64 comparison 2024-03-27 13:00:29 +00:00
util.c s4:torture/smb2: make it possible to pass existing_conn to smb2_connect_ext() 2023-08-08 12:57:29 +00:00
wscript_build s4:torture/smb2: move benchmarking tests to bench.c 2023-06-01 07:20:31 +00:00