summaryrefslogtreecommitdiff
path: root/selftest
Commit message (Collapse)AuthorAgeFilesLines
* auth_log: Add tests by listening for JSON messages over the message busAndrew Bartlett2017-03-291-0/+2
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Pair-programmed-by: Gary Lockyer <gary@catalyst.net.nz>
* server_id_db: Protect against non-0-terminated data recordsVolker Lendecke2017-03-281-1/+0
| | | | | | | | | | Remove the failing test from knownfail. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12705
* selftest: Test server_id database add and removalAndrew Bartlett2017-03-281-0/+1
| | | | | | | | | | This tests indirectly server_id_db_lookup() and server_id_db_prune_name(), as well as the imessaging and the imessaging python bindings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12705
* samba-tool: Ensure that samba-tool processes --name=not-existing does not errorAndrew Bartlett2017-03-281-1/+0
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12705
* selftest: Add more tests for "samba-tool processes"Andrew Bartlett2017-03-281-0/+1
| | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12705
* s3: Test for CVE-2017-2619 regression with "follow symlinks = no".Jeremy Allison2017-03-281-0/+8
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12721 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Tue Mar 28 07:00:46 CEST 2017 on sn-devel-144
* selftest/target/Samba.pm: Remove whitespaceDouglas Bagnall2017-03-271-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* selftest: Check that LDAP is available during RODC startupGarming Sam2017-03-271-16/+21
| | | | | | | Because the check was for RID Set, this was never done. However, this caused breakages that we've likely seen before. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Add more RODC tests to avoid regressions hereAndrew Bartlett2017-03-271-0/+2
| | | | | | | | This ensures that the RODC can authenticatate users over wbinfo, normal services and SamLogon including in particular the important need-to-be-forwarded case Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* Revert "selftest: temporary skip samba.blackbox.pdbtest.s4winbind"Stefan Metzmacher2017-03-241-1/+0
| | | | | | | | | | | | | This works again now... BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12709 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Mar 24 15:50:22 CET 2017 on sn-devel-144
* selftest: temporary skip samba.blackbox.pdbtest.s4winbindStefan Metzmacher2017-03-241-0/+1
| | | | | | | | | | This will reenabled in a few commits. BUG: https://bugzilla.samba.org/show_bug.cgi?id=2976 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12709 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dbcheck: Improve dbcheck to find (and may fix) dangling msDS-RevealedUsersGarming Sam2017-03-131-0/+2
| | | | | | | | We cannot add missing backlinks because of the duplicate checking. There seems to be no trivial way to add the bypass. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: include object SID in tokenGroups calculation for repl secretGarming Sam2017-03-131-1/+0
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests/repl_rodc: Test the direct allow/deny attribute worksGarming Sam2017-03-131-0/+1
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: Tie destination DSA GUID to authenticating RODC for REPL_SECRETGarming Sam2017-03-131-1/+0
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests/repl_rodc: Ensure that the machine account is tied to the destination DSAGarming Sam2017-03-131-0/+1
| | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: Implement functionality for msDS-RevealedUsersGarming Sam2017-03-131-2/+0
| | | | | | | | | | | This multi-valued DN+Binary linked attribute is present on the server object for an RODC. A link to an object is added to it whenever secret attributes from that object are replicated to an RODC to serve as an audit trail. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz>
* python/tests: Add repl_rodc testBob Campbell2017-03-131-0/+2
| | | | | | | | | Currently, this tests the msDS-RevealedUsers feature, which we don't support at the moment. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
* python: selftest: Add possibility to run old Python test suites with Python 3Lumir Balhar2017-03-101-2/+2
| | | | | | | | | Add possibility to execute old Python test suites with Python 3 and enable tests with Python 3 of ported samba.gensec module. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: selftests: Enable samba.getopt tests execution with Python 3Lumir Balhar2017-03-101-1/+1
| | | | | | Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.tests.core: Port and enable core tests in Python 3Lumir Balhar2017-03-101-1/+1
| | | | | | | | | Port samba core tests to Python 3 compatible form and enable their execution with Python 3. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.auth: Port samba.auth to Python 3 compatible formLumir Balhar2017-03-101-1/+1
| | | | | | | | | Port samba.auth Python module to Python 3 compatible form and enable tests execution with Python 3. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.tests.dcerpc.misc: Port and enable testsLumir Balhar2017-03-101-1/+1
| | | | | | | | | Port tests of samba.dcerpc.misc module to Python 3 compatible form and enable their execution with Python 3. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* python: samba.tests: Enable Python 3 tests for ported modulesLumir Balhar2017-03-101-2/+3
| | | | | | | | Enable tests with Python 3 for Python 3 compatible modules. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* selftest: remove unused broken client.pyDouglas Bagnall2017-03-101-80/+0
| | | | | | | | | | | Nothing uses this, and pyflakes points out it is unusable: ./selftest/client.py:60: undefined name 'prefix_abs' ./selftest/client.py:69: undefined name 'opts' ./selftest/client.py:70: undefined name 'interfaces' Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/torture: some tests for kernel oplocksRalph Boehme2017-03-101-0/+5
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=7537 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4/torture: add a creditting test skipping a SMB2 MIDRalph Boehme2017-03-041-0/+1
| | | | | | | | | | | | | | | | This tests that skipping a SMB2 MID the client's usable MID window is [unused mid, unused mid + 8192] The test currently fails against Samba as we only grant up to 512 credits. It passes against Windows 2016 as that grants up to 8192 credits by default. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Mar 4 01:54:07 CET 2017 on sn-devel-144
* s4/torture: add some SMB2 crediting testsRalph Boehme2017-03-031-0/+2
| | | | | | | | | These tests verify that a server grants at least 8192 credits in a successfull session setup and in a single SMB2 request. Both tests pass against Windows 2016 Server but currently fail against Samba. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: remove "ea support" from vfs_fruit-related setups.Uri Simchoni2017-03-021-5/+0
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* selftest: add search performance testsDouglas Bagnall2017-03-021-0/+9
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: ndr_pack/unpack performance testDouglas Bagnall2017-03-021-0/+8
| | | | | | | This just does a lot of packing and unpacking of various structures. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: add shares without vfs_fruit for the vfs_fruit testsRalph Boehme2017-03-021-0/+10
| | | | | | | | | | Not used for now, but the next commit will add a test that makes use of this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* selftest: also run vfs_fruit tests with streams_depotRalph Boehme2017-03-021-0/+7
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* selftest: run vfs_fruit tests against share with fruit:metadata=streamRalph Boehme2017-03-021-0/+7
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* script: Add test script for traffic_summary.plGary Lockyer2017-03-011-0/+4
| | | | | | | | | | | | Add the test script for traffic_summary.pl, test data in previous commit. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Mar 1 09:01:07 CET 2017 on sn-devel-144
* dbchecker: Stop ignoring linked cases where both objects are aliveGarming Sam2017-02-231-1/+0
| | | | | | | | | | Previously, this did nothing and the code was both untested and unused. Removes the knownfail entry for dbcheck. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12600
* tests/dbcheck: Add a test for two live objects, with a dangling backlinkGarming Sam2017-02-231-0/+1
| | | | | | | | Adds dbcheck 4.5.0pre1 to the knownfail, to be removed later. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12600
* s3: torture: Regression test for smbd trying to open an invalid symlink.Jeremy Allison2017-02-161-0/+1
| | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12572 Pair-programmed-with: Ralph Boehme <slow@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 16 22:06:51 CET 2017 on sn-devel-144
* repl_meta_data: Remove the correct forward link for dn+binary attributesAndrew Bartlett2017-02-141-2/+0
| | | | | | | | | | | | | | | | | | | | | The previous code assumed that only plain DNs could be linked attributes. We need to look over the list of attribute values and find the value that causes this particular backlink to exist, so we can remove it. We do not know (until we search) of the binary portion, so we must search over all the attribute values at this layer, using the parsed_dn_find() routine used elsewhere in this code. Found attempting to demote an RODC in a clone of a Windows 2012R2 domain, due to the msDS-RevealedUsers attribute. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 14 06:14:35 CET 2017 on sn-devel-144
* torture/drs: Add a test for dn+binary linked attributesBob Campbell2017-02-141-0/+2
| | | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
* selftest: add vampire_2000_dc environmentBob Campbell2017-02-143-15/+39
| | | | | | | | | | | | | This is the equivalent of vampire_dc, but using a domain functional level of DS_DOMAIN_FUNCTION_2000. Using this functional level is useful for tests involving replication and linked attributes, as they behave differently at it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139 Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz>
* selftest: show multiple arguments for --helpDouglas Bagnall2017-02-101-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* waf --test-list takes a filename argumentDouglas Bagnall2017-02-101-1/+0
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: only set nc_{object,linked_attributes}_count with ↵Stefan Metzmacher2017-02-081-2/+0
| | | | | | | | | | | | | | | | | DRSUAPI_DRS_GET_NC_SIZE The main change is that we return 0 values if DRSUAPI_DRS_GET_NC_SIZE is not present in order to get the same result as a Windows server in that case. If DRSUAPI_DRS_GET_NC_SIZE is return the number of links we found so far during the cycle in addition the number of objects returned in this cycle. Both values doesn't match what Windows returns, but doing that correctly and efficient is a task for another day. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture/drs: remove pointless nc_object_count replication checks in ↵Stefan Metzmacher2017-02-081-0/+2
| | | | | | | | | | | | | | | | test_link_utdv_hwm() nc_object_count and nc_linked_attributes_count are only filled if DRSUAPI_DRS_GET_NC_SIZE is requested. And they should contain the total number. This is only useful for the initial replication. Samba ignores DRSUAPI_DRS_GET_NC_SIZE currently but that will change in the following commits. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: disable SMB encryption in simpleserver environmentRalph Boehme2017-01-271-0/+6
| | | | | | | | | | | | | | | Encryption is currently not tested in this env so we can safely turn it off. The next commit will add a blackbox tests that test combinations of having encryption globally turned off and enabled (desired/required) on a share. This also adds a new share "enc_desired" with "smb encrypt = desired" which will be used by the test in the next commit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12520 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest/Samba3: use "server min protocol = SMB3_00" for "ktest"Stefan Metzmacher2017-01-271-0/+2
| | | | | | | | | | | | | This verifies that clients can still connect with that setting. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12540 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jan 27 12:03:39 CET 2017 on sn-devel-144
* s3/smbd: check for invalid access_mask smbd_calculate_access_mask()Ralph Boehme2017-01-231-1/+0
| | | | | | | | | This makes us pass "base.createx_access". Bug: https://bugzilla.samba.org/show_bug.cgi?id=12536 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: also run test base.createx_access against ad_dcRalph Boehme2017-01-231-0/+1
| | | | | | | | | Fails currently, will be made to work in the next commit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12536 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Remove unsued variables WINBINDD_PRIV_PIPE_DIR and wbsockprivdirAndrew Bartlett2017-01-222-3/+0
| | | | | | | | | | I can not find anything that uses these in the testsuite Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Sun Jan 22 22:15:01 CET 2017 on sn-devel-144