summaryrefslogtreecommitdiff
path: root/selftest
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* testsuite: Add cmocka unit test for smb_krb5_kt_open()Andreas Schneider2016-12-161-2/+13
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Dec 16 05:43:12 CET 2016 on sn-devel-144
* selftest: test new "lsa over netlogon" smb.conf optionAndrew Bartlett2016-12-152-1/+2
| | | | | | | | | | This proves we can act like Windows and over lsarpc over netlogon if we want Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Dec 15 12:11:09 CET 2016 on sn-devel-144
* idl: Do not listen for lsarpc on \\pipe\netlogonAndrew Bartlett2016-12-151-0/+1
| | | | | | | | | This prevents making the netlogon process multi-threaded. This works on Windows becuase NETLOGON is part of lsad Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: Add credentials downgrade and challenge reuse test to rpc.netlogonAndrew Bartlett2016-12-142-1/+3
| | | | | | | | | | | | | This test confirms that the challenge set up is available after the ServerAuthenticate has failed at the NT_STATUS_DOWNGRADE_DETECTED check. This is needed for NetApp ONTAP member servers. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11291 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc/ndr/uuid.c: improve speed and accuracy of GUID string parsingDouglas Bagnall2016-12-141-1/+0
| | | | | | | | | | | | | | GUID_from_data_blob() was relying on sscanf to parse strings, which was slow and quite accepting of invalid GUIDs. Instead we directly read a fixed number of hex bytes for each field. This now passes the samba4.local.ndr.*.guid_from_string_invalid tests. Signed-off-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 Dec 14 08:55:42 CET 2016 on sn-devel-144
* s4-torture: better, failing, tests for GUID_from_stringDouglas Bagnall2016-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | These tests reveal that the current implementation accepts all kinds of invalid GUIDs. In particular, we fail on these ones: "00000001-0002-0003-0405--060708090a0" "-0000001-0002-0003-0405-060708090a0b" "-0000001-0002-0003-04-5-060708090a0b" "d0000001-0002-0003-0405-060708090a-b" "00000001- -2-0003-0405-060708090a0b" "00000001-0002-0003-0405- 060708090a0" "0x000001-0002-0003-0405-060708090a0b" "00000001-0x02-0x03-0405-060708090a0b" This test is added to selftest/knownfail. The test for valid string GUIDs is extended to test upper and mixed case GUIDs. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dnsserver: add dns name checkingBob Campbell2016-12-121-2/+0
| | | | | | | | | | | This may also prevent deletion of existing corrupted records through DNS, but should be resolvable through RPC, or at worst LDAP. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tests/dnsserver: Check security descriptorsGarming Sam2016-12-121-0/+1
| | | | | | | | | | These tests discover that there are some discrepancies between Windows and Samba. Although there are failures, they do not appear to be critical, however some of the SD differences will be important for 2012 support. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* samba-tool/dns: remove use of dns_record_match from add and deleteBob Campbell2016-12-121-4/+1
| | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/tests: expand tests for dns server over rpcBob Campbell2016-12-121-0/+3
| | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* python/tests: add tests for samba-tool dnsBob Campbell2016-12-121-0/+4
| | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: torture: Adds regression test case for se_access_check() owner rights issue.Jeremy Allison2016-12-101-0/+1
| | | | | | | | | | | | | | This test passes against Win2K12 but fails against smbd without the previous commit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12466 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): Sat Dec 10 10:11:10 CET 2016 on sn-devel-144
* s3: torture: Regression test case for permissions check on rename.Jeremy Allison2016-12-071-0/+1
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12460 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Dec 7 11:52:03 CET 2016 on sn-devel-144
* vfs_fruit: fix fruit:resource option spellingRalph Boehme2016-12-022-2/+2
| | | | | | | | | | | | | | | | | | | | | Fix all occurences of bad spelling of "resource" as "res*s*ource" (two s). One of the places where this was wrong was when parsing parametric options in the VFS connect() function in the module. As a result any setting of fruit:resource=something in smb.conf was silently ignored and the default ("file") was active. In Samba 4.6 we accept both the wrong and the correct spelling, in Samba 4.7 the bad spelling will be removed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12412 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Do not include system krb5.conf in selftestAndreas Schneider2016-12-022-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12441 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* perf: Add simple tests for the open/close a database caseAndrew Bartlett2016-12-011-0/+23
| | | | | | | | 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): Thu Dec 1 09:40:20 CET 2016 on sn-devel-144
* python: selftesthelpers: Add possibility for planning tests forLumir Balhar2016-12-011-1/+6
| | | | | | | | | | | | | 'extra_python' (Python 3). This change allows us to mark modules which are Python 3 compatible with the keyword argument `py3_compatible`. Then, if building with Python 3 is configured using --extra-python, `planpythontestsuite` will plan an extra Python test for each marked module. Signed-off-by: Lumir Balhar <lbalhar@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* join.py: Attempt to allocate a RID Set during the joinAndrew Bartlett2016-12-011-4/+0
| | | | | | | | If we are joining the RID Manager, then we should get a RID Set, but otherwise we should accept failure with the right error code Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* selftest: Ensure vampiredc has a full copy of localdc before we startAndrew Bartlett2016-12-011-0/+27
| | | | | | | | Otherwise we may fail tests because we are still pulling in the full replica from localdc during the tests. This may block RID allocation in particular. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* selftest: Rework child process cleanupAndrew Bartlett2016-12-011-12/+34
| | | | | | | | | | We now: - call gdb_backtrace on the stuck pid to determine why it is stuck - cleanup faster as we catch the process exit (by not waiting until 1 second after the exit for waitpid() to return -1) Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* selftest/gdb_*: make use of 'mktemp'Stefan Metzmacher2016-12-012-6/+15
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* dbcheck: Be more careful with link checksAndrew Bartlett2016-11-221-3/+0
| | | | | | | | | | | | Here we are more careful when checking links, flagging errors only when a non-deleted forward link appears incorrect. In particular, we trust the GUID more than we trust the name, as otherwise we can get caught out if there is a swap of names, (the link should follow the swap, staying on the same target GUID). 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=12297
* selftest: Add test for link and deleted link behaviour in dbcheckAndrew Bartlett2016-11-222-1/+9
| | | | | | | | | | The other dbcheck tests were getting over-complex, so we start a new test here based on tombestone-expunge.sh, as we are looking at very similar problems 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=12297
* s4-torture: add IRemoteWinspool rpc testsuite.Günther Deschner2016-11-151-0/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>