summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2019-11-21 16:44:37 +0100
committerJeremy Allison <jra@samba.org>2019-12-06 00:17:35 +0000
commitd95be9135890279a845cc6712a15236aaa87e4d7 (patch)
tree6dadf7debb9edd1eacec4cd0ea35a0af05003d13 /selftest
parent397ecd1feb3c46b861df7d37228b3033f27a06fa (diff)
downloadsamba-d95be9135890279a845cc6712a15236aaa87e4d7.tar.gz
s3:tests: add a blackbox test that confirms broken timestamp behaviour
This blackbox test confirms that Samba returns NTTIME=0 when a filesystem object has a UNIX timestamp value of 0, ie UNIX epoch start 1.1.1970. Here's an example output from running smbstatus allinfo on such a file: $ bin/smbclient -U slow%x //localhost/test -c "allinfo time_0_1970" altname: T11662~T create_time: NTTIME(0) access_time: NTTIME(0) write_time: NTTIME(0) change_time: NTTIME(0) attributes: (80) stream: [::$DATA], 0 bytes If you look at it with smbclient ls command, it munges the output to be 1970 so you don't notice the problem: $ bin/smbclient -U slow%x //localhost/test -c "ls time_0_1970" time_0_1970 N 0 Thu Jan 1 01:00:00 1970 The test also test other time_t values -1 and 4294967295 that are used as sentinel values in Samba code and shows that handling these values is equally broken. Same for time_t values < -1. Note that I'm adding a blackbox test *and* a torture test, as with this blackbox test I can directly control the server side, but with smbtorture I have to go through the SMB stack to create the files which doesn't work currently. 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>
Diffstat (limited to 'selftest')
-rw-r--r--selftest/knownfail.d/samba3.blackbox4
1 files changed, 4 insertions, 0 deletions
diff --git a/selftest/knownfail.d/samba3.blackbox b/selftest/knownfail.d/samba3.blackbox
new file mode 100644
index 00000000000..81e8232065e
--- /dev/null
+++ b/selftest/knownfail.d/samba3.blackbox
@@ -0,0 +1,4 @@
+^samba3.blackbox.timestamps.time=0\(fileserver\)
+^samba3.blackbox.timestamps.time=-1\(fileserver\)
+^samba3.blackbox.timestamps.time=-2\(fileserver\)
+^samba3.blackbox.timestamps.time=1968\(fileserver\)