1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source3/torture
Jeremy Allison ad5f6b82c3 s3: torture: Add a basic SMB2 SACL test.
Shows bits needed to set/get a SACL.  We need a script within Samba to run this
as it depends on a user with SeSecurityPrivilege to work.

Test does the following:

1). Create a test file.
2). Open with SEC_FLAG_SYSTEM_SECURITY *only*. ACCESS_DENIED.
    NB. SMB2-only behavior. SMB1 allows this as tested in SMB1-SYSTEM-SECURITY.
3). Open with SEC_FLAG_SYSTEM_SECURITY|FILE_WRITE_ATTRIBUTES.
4). Write SACL. Should fail with ACCESS_DENIED (seems to need WRITE_DAC).
5). Close (3).
6). Open with SEC_FLAG_SYSTEM_SECURITY|SEC_STD_WRITE_DAC.
7). Write SACL. Success.
8). Close (4).
9). Open with SEC_FLAG_SYSTEM_SECURITY|READ_ATTRIBUTES.
10). Read SACL. Success.
11). Read DACL. Should fail with ACCESS_DENIED (no READ_CONTROL).
12). Close (9).
13 - and on error). Delete test file.

Passes against Windows 10.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-04-21 18:37:39 +00:00
..
bench_pthreadpool.c torture3: Fix CID 1435119 Error handling issues (CHECKED_RETURN) 2018-04-24 19:41:14 +02:00
cmd_vfs.c smbd: move files_struct.is_directory to a bitfield 2020-04-03 19:05:44 +00:00
denytest.c
locktest2.c torture3: Use file_id_str_buf() in print_brl() 2019-11-12 20:56:34 +00:00
mangle_test.c
masktest.c Revert "s3:libsmb: Fix printing the session setup information" 2017-06-09 13:00:11 +02:00
msg_sink.c lib: Add lib/util/server_id.h 2017-01-22 18:30:11 +01:00
msg_source.c lib: Add lib/util/server_id.h 2017-01-22 18:30:11 +01:00
msgtest.c
nbench.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
nbio.c s3: libsmb: add replace support to cli_rename() 2017-03-28 17:45:19 +02:00
pdbtest.c smbdes: convert E_P24() and SMBOWFencrypt to use gnutls 2019-12-10 00:30:30 +00:00
proto.h s3: torture: Add a basic SMB2 SACL test. 2020-04-21 18:37:39 +00:00
rpc_open_tcp.c
scanner.c Correct "existence" typos. 2017-02-22 08:26:22 +01:00
test_addrchange.c s3: torture: Fix return values 2019-05-19 18:48:01 +00:00
test_async_echo.c
test_authinfo_structs.c
test_buffersize.c
test_case_insensitive.c
test_chain3.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
test_cleanup.c torture3: Remove cleanup3 2019-09-17 22:49:39 +00:00
test_dbwrap_ctdb.c s3: Rename server_messaging_context() to global_messaging_context() 2018-09-07 17:26:17 +02:00
test_dbwrap_do_locked.c dbwrap: Pass "value" to dbwrap_do_locked() callback 2019-11-22 23:57:46 +00:00
test_dbwrap_watch.c torture3: Test the next patch: No two waiters in one do_locked() 2019-11-22 23:57:47 +00:00
test_g_lock.c torture3: Add a test that contends with a READ, not a WRITE lock 2019-12-22 17:29:28 +00:00
test_hidenewfiles.c selftest: Test hide new files timeout 2018-11-09 03:49:55 +01:00
test_idmap_cache.c torture: Add tests for idmap cache 2019-02-28 12:57:24 +00:00
test_idmap_tdb_common.c idmap: remove unused function idmap_is_online() 2017-08-04 14:08:37 +02:00
test_messaging_fd_passing.c
test_messaging_read.c torture3: Extend read3 for the "messaging target re-inits" failure 2019-02-14 02:18:28 +01:00
test_messaging_send_all.c torture: Check messaging_send_all 2017-12-12 20:37:08 +01:00
test_namemap_cache.c gencache: Remove transaction-based tdb 2018-11-06 18:57:26 +01:00
test_notify_online.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
test_notify.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
test_nttrans_create.c
test_nttrans_fsctl.c
test_oplock_cancel.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
test_posix_append.c
test_pthreadpool_tevent.c
test_smb2.c s3: torture: Add a basic SMB2 SACL test. 2020-04-21 18:37:39 +00:00
test_smbsock_any_connect.c
torture.c s3: torture: Add a basic SMB2 SACL test. 2020-04-21 18:37:39 +00:00
utable.c
vfstest_chain.c
vfstest.c s3: torture: vfstest: Change from create_conn_struct_tos() -> create_conn_struct_tos_cwd(). 2019-09-11 18:24:28 +00:00
vfstest.h vfstest: use OpenDir() 2020-03-24 19:48:40 +00:00
wbc_async.c torture3: Don't duplicate set_blocking() 2019-08-06 21:49:28 +00:00
wbc_async.h