• Tim Beale's avatar
    CVE-2019-3870 tests: Extend smbd tests to check for umask being overwritten · 40af26fa
    Tim Beale authored
    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=13834Signed-off-by: 's avatarTim Beale <timbeale@catalyst.net.nz>
    Reviewed-by: 's avatarAndrew Bartlett <abartlet@samba.org>
    
    (This backport to Samba 4.9 by Andrew Bartlett was not a pure
    cherry-pick due to merge conflicts)
    40af26fa
Name
Last commit
Last update
..
flapping.d Loading commit data...
gnupg Loading commit data...
knownfail.d Loading commit data...
manage-ca Loading commit data...
target Loading commit data...
README Loading commit data...
SocketWrapper.pm Loading commit data...
Subunit.pm Loading commit data...
TODO Loading commit data...
devel_env.sh Loading commit data...
filter-subunit Loading commit data...
flapping Loading commit data...
format-subunit Loading commit data...
format-subunit-json Loading commit data...
gdb_backtrace Loading commit data...
gdb_backtrace_test.c Loading commit data...
gdb_run Loading commit data...
in_screen Loading commit data...
knownfail Loading commit data...
perf_tests.py Loading commit data...
quick Loading commit data...
save.env.sh Loading commit data...
selftest.pl Loading commit data...
selftest.pl.1 Loading commit data...
selftesthelpers.py Loading commit data...
skip Loading commit data...
skip.no-GSS_KRB5_CRED_NO_CI_FLAGS_X Loading commit data...
skip_mit_kdc Loading commit data...
slow Loading commit data...
subunithelper.py Loading commit data...
tap2subunit Loading commit data...
tests.py Loading commit data...
valgrind_run Loading commit data...
wscript Loading commit data...