Commits on Source (10)
-
Mathieu Parent authored
-
The were not using VFS backend calls and could only work locally, and were unsafe against symlink races and other security issues. If the incoming handle is valid, return WERR_BAD_PATHNAME. [MS-RRP] states "The format of the file name is implementation-specific" so ensure we don't allow this. As reported by Michael Hanselmann. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13851 Signed-off-by:
Jeremy Allison <jra@samba.org> Reviewed-by:
Andrew Bartlett <abartlet@samba.org>
-
Mathieu Parent 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=13834 Signed-off-by:
Tim Beale <timbeale@catalyst.net.nz> Reviewed-by:
Andrew Bartlett <abartlet@samba.org> (This backport to Samba 4.9 by Andrew Bartlett was not a pure cherry-pick due to merge conflicts)
-
This provisions a new DC and checks there are no world-writable files in the new DC's private directory. 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>
-
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13834 Signed-off-by:
Andrew Bartlett <abartlet@samba.org> Reviewed-by:
Jeremy Allison <jra@samba.org>
-
Umask manipulation was added to pysmbd with e146fe5e in 2012 and init_files_struct was split out in 747c3f1f in 2018 for Samba 4.9. (It was added to assist the smbd.create_file() routine used in the backup and restore tools, which needed to write files with full metadata). This in turn avoids leaving init_files_struct() without resetting the umask to the original, saved, value. Per umask(2) this is required before open() and mkdir() system calls (along side other file-like things such as those for Unix domain socks and FIFOs etc). Therefore for safety and clarify the additional 'belt and braces' umask manipuations elsewhere are removed. mkdir() will be protected by a umask() bracket, for correctness, in the next patch. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13834 Signed-off-by:
Andrew Bartlett <abartlet@samba.org> (This backport to Samba 4.9 by Andrew Bartlett is not a pure cherry-pick due to merge conflicts)
-
mkdir() is the other call that requires a umask of 0 in Samba. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13834 Signed-off-by:
Andrew Bartlett <abartlet@samba.org> Reviewed-by:
Jeremy Allison <jra@samba.org>
-
Mathieu Parent authored
-
Mathieu Parent authored
debian/patches/CVE-2019-3870-v4-9-04.patch
0 → 100644
This diff is collapsed.
debian/patches/CVE-2019-3880-v4-9-02.patch
0 → 100644
python/samba/tests/smbd_base.py
0 → 100644
source4/setup/tests/provision_fileperms.sh
0 → 100755