1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/source3/torture
Ralph Boehme 69691dd0cd smbd: fix handling of sentinel timestamp values
This implements two core changes:

* use NTTIME instead of struct timespec at the database layer

* use struct timespec { .tv_nsec = SAMBA_UTIME_OMIT } as special sentinel
  value in smbd when processing timestamps

Using NTTIME at the database layer is only done to avoid storing the special
struct timespec sentinel values on disk. Instead, with NTTIME the sentinel value
for an "unset" timestamp is just 0 on-disk.

The NTTIME value of 0 gets translated by nt_time_to_full_timespec() to the
struct timespec sentinel value { .tv_nsec = SAMBA_UTIME_OMIT }.

The function is_omit_timespec() can be used to check this.

Beside nt_time_to_full_timespec(), there are various other new time conversion
functions with *full* in their name that can be used to safely convert between
different types with the changed sentinel value.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-12-06 00:17:36 +00:00
..
bench_pthreadpool.c
cmd_vfs.c smbd: fix handling of sentinel timestamp values 2019-12-06 00:17:36 +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
msg_sink.c
msg_source.c
msgtest.c
nbench.c s3:libsmb: pass impersonation_level to cli_ntcreate_send() 2018-12-13 08:52:24 +01:00
nbio.c
pdbtest.c pdbtest: Use dom_sid_str_buf 2019-02-27 01:35:18 +01:00
proto.h torture: Test g_lock deadlock detection 2019-11-23 01:25:12 +00:00
rpc_open_tcp.c
scanner.c
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
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 torture: Test g_lock deadlock detection 2019-11-23 01:25:12 +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
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
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 MS-FSA style terminating '/' and '\\' test - SMB2-PATH-SLASH. 2019-10-02 08:01:41 +00:00
test_smbsock_any_connect.c
torture.c torture: Test g_lock deadlock detection 2019-11-23 01:25:12 +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
wbc_async.c torture3: Don't duplicate set_blocking() 2019-08-06 21:49:28 +00:00
wbc_async.h