summaryrefslogtreecommitdiff
path: root/selftest
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2019-03-15 15:20:21 +1300
committerKarolin Seeger <kseeger@samba.org>2019-04-08 10:27:34 +0000
commit6048103751afa33f1951539ce36224a03b276604 (patch)
tree92c802534a2006eb439d7a7ed68564000f458f74 /selftest
parent21d501bfa8f66d98d2b5dfd3ffa2a9dd07af5dbd (diff)
downloadsamba-6048103751afa33f1951539ce36224a03b276604.tar.gz
CVE-2019-3870 tests: Extend smbd tests to check for umask being overwritten
The smbd changes the umask - if the code fails to restore the umask to what it was, then this is very bad. Add an extra check to every smbd-related test that the umask at the end of the test is the same as what it was at the beginning (i.e. if the smbd code changed the umask then it correctly restored the value afterwards). As the selftest sets the umask for all tests to zero, it makes it hard to detect this problem, so the test setUp() needs to set it to something else first. This extra checking is added to the setUp()/tearDown() so that it applies to all test-cases. However, any failure that occur with this approach will not be able to be known-failed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13834 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'selftest')
-rw-r--r--selftest/knownfail.d/umask-leak3
1 files changed, 3 insertions, 0 deletions
diff --git a/selftest/knownfail.d/umask-leak b/selftest/knownfail.d/umask-leak
new file mode 100644
index 00000000000..5580beb4b68
--- /dev/null
+++ b/selftest/knownfail.d/umask-leak
@@ -0,0 +1,3 @@
+^samba.tests.ntacls_backup.samba.tests.ntacls_backup.NtaclsBackupRestoreTests.test_smbd_create_file
+^samba.tests.ntacls_backup.samba.tests.ntacls_backup.NtaclsBackupRestoreTests.test_backup_online
+^samba.tests.ntacls_backup.samba.tests.ntacls_backup.NtaclsBackupRestoreTests.test_backup_offline