summaryrefslogtreecommitdiff
path: root/selftest
Commit message (Collapse)AuthorAgeFilesLines
* 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
* param: Remove winbindd privileged socket directory optionAndrew Bartlett2017-01-221-2/+0
| | | | | | | | | | | | This option is unused and has not been used since before Samba 4.3 when the source4/ winbindd code went away. The associated dynconfig parameters used for the default are also removed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10066 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* script/autobuild.py: try make test TESTS=samba3.*ktest for samba-systemkrb5Stefan Metzmacher2017-01-102-0/+10
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest/selftest.pl: print out '[expanded] command: ' in all error casesStefan Metzmacher2017-01-101-0/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest/selftest.pl: we don't need to call Subunit::progress_pop() twice on ↵Stefan Metzmacher2017-01-101-1/+0
| | | | | | | error Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest/selftesthelpers.py: let plantestsuite() use the env name in the ↵Stefan Metzmacher2017-01-101-1/+5
| | | | | | | test name Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3/torture: add a test for "mangled names = invalid"Ralph Boehme2017-01-091-0/+4
| | | | | | | | This checks both that illegal NTFS names are still mangled and that long names have no shortname. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* getncchanges: use the uptodateness_vector to filter links to replicateGarming Sam2016-12-211-2/+0
| | | | | | | | | | This is to mirror the check in get_nc_changes_build_object. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Wed Dec 21 04:37:54 CET 2016 on sn-devel-144
* torture/drs: test link replication with hwm and utdvBob Campbell2016-12-211-0/+2
| | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: Use 'rpc server port:netlogon' and 'rpc server port' smb.conf optionAndrew Bartlett2016-12-201-0/+4
| | | | | | | | | | | | | We need this because once we make NETLOGON run in multiple processes, it will need its own port, and socket_wrapper can not currently allocate and ephemeral port. It also tests the option, which others have asked be made available to firewall drsuapi. Likewise the 'rpc server port' option is used to confirm it functions for the default port'. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@samba.org>
* selftest: make sure we always export KRB5CCNAMEStefan Metzmacher2016-12-171-0/+8
| | | | | | | | | | | | | We should not risk the usage of the users global ccache! This results in unpredictable effects for the user and selftest itself. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Dec 17 22:58:28 CET 2016 on sn-devel-144
* selftest: also export TMPDIRStefan Metzmacher2016-12-171-0/+1
| | | | | | | This should hopefully avoid usage of /tmp. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>