summaryrefslogtreecommitdiff
path: root/testprogs
Commit message (Collapse)AuthorAgeFilesLines
* Add a test with old msDS-SupportedEncryptionTypesIsaac Boukris2020-07-281-0/+68
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14354 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: add tests for net-ads over TLSIsaac Boukris2020-07-131-0/+76
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14439 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:selftest: test for smbtorture subunit names with and without --fullnameSachin Prabhu2020-07-071-0/+43
| | | | | | | | | | | | | | | | We check the output with both --fullname and with the default shortname to ensure it works as expected. We also do tests for each level and test relative names are used. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User((no branch)): Stefan Metzmacher <metze@samba.org> Autobuild-Date((no branch)): Tue Jul 7 12:16:34 UTC 2020 on sn-devel-184
* selftest: add tests for binary msDS-AdditionalDnsHostNameIsaac Boukris2020-06-181-0/+22
| | | | | | | | | Like the short names added implicitly by Windows DC. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14406 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: test forwardable flag in cross-realm with s4u2proxyIsaac Boukris2020-06-121-3/+14
| | | | | Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: add test for disallowed-forwardable serverIsaac Boukris2020-06-121-2/+11
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14233 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Add net-ads-join dnshostname=fqdn optionIsaac Boukris2020-05-291-0/+15
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14396 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 29 13:33:28 UTC 2020 on sn-devel-184
* Add a test for msDS-AdditionalDnsHostName entries in keytabIsaac Boukris2020-05-291-0/+9
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14396 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Add a test to check dNSHostName with netbios aliasesIsaac Boukris2020-05-291-0/+14
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14396 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testprogs: Add 'net ads join' test for fipsAndreas Schneider2020-05-141-0/+43
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu May 14 14:27:26 UTC 2020 on sn-devel-184
* testprogs: Add client kerberos testAndreas Schneider2020-04-291-0/+168
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Apr 29 11:53:41 UTC 2020 on sn-devel-184
* tests: Add test to check the server doesn't allow NTLMAndreas Schneider2020-04-081-0/+64
| | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* testprogs: Add 'net ads join createupn' test also verifying the keytabAndreas Schneider2020-04-061-0/+17
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14336 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Apr 6 19:09:53 UTC 2020 on sn-devel-184
* s4/selftest: Adjust samba4.blackbox.pkinit to use (s3) smbclientNoel Power2020-04-031-18/+18
| | | | | | | | | | | | | | | | | samba4.blackbox.pkinit falls to pass in environments that don't support SMB2 because of use (s4) smbclient4. Change test to use (s3) smbclient Additionally a test within the test script test_kinit_trusts_heimdal.sh explicitly uses smbclient4 which can't negotiate SMB1 in environments that don't support it. Add knownfail to cater for this & also remove entry from the skip file Further reference the smbclient4 specific test is associated with https://bugzilla.samba.org/show_bug.cgi?id=12554 so maybe we should keep it for the moment Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Ralph Boehme <slow@samba.org>
* s4/selftest: adjust samba.blackbox.pdbtest to use (s3) smbclientNoel Power2020-04-031-8/+8
| | | | | | | | smbclient4 only negotiates smb1, this test should use smbclient(s3) instead. Signed-off-by: Noel Power <npower@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* selftest: Add test for dangling backlink to ourself, a missing and a real objectAndrew Bartlett2020-03-221-0/+52
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14306 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Add test for dangling backlinks to objects that do not existAndrew Bartlett2020-03-221-0/+47
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14306 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* tests: Add test for weak cryptoAndreas Schneider2020-03-191-0/+41
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Fix uxsuccess test with new MIT krb5 library 1.18Isaac Boukris2020-03-101-4/+0
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14155 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* selftest: Confirm we can delete a user with a dangling backlinkAndrew Bartlett2020-02-281-0/+46
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* CVE-2019-14870: heimdal: add S4U test for delegation_not_allowedIsaac Boukris2019-12-101-0/+73
| | | | Signed-off-by: Isaac Boukris <iboukris@gmail.com>
* kerberos_keytab: do not add single DES keys to keytabIsaac Boukris2019-11-191-8/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14202 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: exclude msDS-SupportedEncryptionType in ldapcmpIsaac Boukris2019-11-193-3/+3
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14202 Pair-Programmed-With: Alexander Bokovoy <ab@samba.org> Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* libnet_join: add SPNs for additional-dns-hostnames entriesIsaac Boukris2019-10-251-1/+9
| | | | | | | | | | | | | and set msDS-AdditionalDnsHostName to the specified list. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14116 Signed-off-by: Isaac Boukris <iboukris@redhat.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Oct 25 10:43:08 UTC 2019 on sn-devel-184
* libnet_join: build dnsHostName from netbios name and lp_dnsdomain()Isaac Boukris2019-10-251-2/+5
| | | | | | | | | | | | This make the join process much more reliable, and avoids "Constraint violation" error when the fqdn returned from getaddrinfo has already got assigned an SPN. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14116 Signed-off-by: Isaac Boukris <iboukris@redhat.com> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Add test for kinit with canonicalizationAndreas Schneider2019-10-121-0/+13
| | | | | | | | Pair-Programmed-With: Isaac Boukris <iboukris@redhat.com> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Isaac Boukris <iboukris@redhat.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* testprogs: Add test for 'net ads join createcomputer='Andreas Schneider2019-10-091-2/+30
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 9 08:26:17 UTC 2019 on sn-devel-184
* testprogs: Fix failure count in test_net_ads.shAndreas Schneider2019-10-091-2/+2
| | | | | | | | | There are missing ` at the end of the line. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13884 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Spelling fixes s/exisiting/existing/Mathieu Parent2019-09-011-1/+1
| | | | | | Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* selftest: add tests for samba-tool ntacl changedomsidBjörn Baumbach2019-06-181-0/+45
| | | | | | | | Signed-off-by: Björn Baumbach <bb@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Björn Baumbach <bb@sernet.de> Autobuild-Date(master): Tue Jun 18 16:54:22 UTC 2019 on sn-devel-184
* selftest: add test for samba-tool ntacl get/set --use-ntvfs --xattr-backend=tdbBjörn Baumbach2019-06-181-0/+21
| | | | | Signed-off-by: Björn Baumbach <bb@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: Woraround uid wrapper issues when using bash shellSamuel Cabrero2019-03-222-16/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UID_WRAPPER_ROOT=1 is not working properly when tests run in bash shell instead of dash. After some debugging the reason may be dash spawns a subshell to run commands, but bash calls execve instead. Traces attached as reference: /bin/sh -> dash: [2(2)/2 at 17s, 1 errors] samba.blackbox.pdbtest(nt4_dc)(nt4_dc:local) UWRAP_DEBUG(3145) - uwrap_init: Initialize uid_wrapper UWRAP_DEBUG(3145) - uwrap_init_env: uwrap_init_env UWRAP_DEBUG(3145) - uwrap_init: Enabled uid_wrapper as root (real uid=1000) UWRAP_DEBUG(3145) - uwrap_init: Successfully initialized uid_wrapper UWRAP_DEBUG(3144) - uwrap_init: Initialize uid_wrapper UWRAP_DEBUG(3144) - uwrap_init_env: uwrap_init_env UWRAP_DEBUG(3144) - uwrap_init: Enabled uid_wrapper as root (real uid=1000) UWRAP_DEBUG(3144) - uwrap_init: Successfully initialized uid_wrapper /bin/sh -> bash: [2(2)/2 at 17s, 1 errors] samba.blackbox.pdbtest(nt4_dc)(nt4_dc:local) UWRAP_DEBUG(3352) - uwrap_export_ids: uwrap_export_ids UWRAP_DEBUG(3354) - uwrap_export_ids: uwrap_export_ids UWRAP_DEBUG(3354) - uwrap_init: Initialize uid_wrapper UWRAP_DEBUG(3354) - uwrap_init_env: uwrap_init_env UWRAP_DEBUG(3354) - uwrap_init_env: Initialize ruid with 1000 UWRAP_DEBUG(3354) - uwrap_init_env: Initalize euid with 1000 UWRAP_DEBUG(3354) - uwrap_init_env: Initalize suid with 1000 UWRAP_DEBUG(3354) - uwrap_init_env: Initialize ruid with 1000 UWRAP_DEBUG(3354) - uwrap_init_env: Initalize egid with 1000 UWRAP_DEBUG(3354) - uwrap_init_env: Initalize sgid with 1000 UWRAP_DEBUG(3354) - uwrap_init_env: Initalize groups with 4,24,27,30,46,108,1000 UWRAP_DEBUG(3354) - uwrap_init: Enabled uid_wrapper as user (real uid=1000) UWRAP_DEBUG(3354) - uwrap_init: Successfully initialized uid_wrapper UWRAP_DEBUG(3353) - uwrap_export_ids: uwrap_export_ids UWRAP_DEBUG(3353) - uwrap_init: Initialize uid_wrapper UWRAP_DEBUG(3353) - uwrap_init_env: uwrap_init_env UWRAP_DEBUG(3353) - uwrap_init_env: Initialize ruid with 1000 UWRAP_DEBUG(3353) - uwrap_init_env: Initalize euid with 1000 UWRAP_DEBUG(3353) - uwrap_init_env: Initalize suid with 1000 UWRAP_DEBUG(3353) - uwrap_init_env: Initialize ruid with 1000 UWRAP_DEBUG(3353) - uwrap_init_env: Initalize egid with 1000 UWRAP_DEBUG(3353) - uwrap_init_env: Initalize sgid with 1000 UWRAP_DEBUG(3353) - uwrap_init_env: Initalize groups with 4,24,27,30,46,108,1000 UWRAP_DEBUG(3353) - uwrap_init: Enabled uid_wrapper as user (real uid=1000) UWRAP_DEBUG(3353) - uwrap_init: Successfully initialized uid_wrapper Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* dbcheck: don't check expired tombstone objects by default anymoreStefan Metzmacher2019-03-141-1/+1
| | | | | | | | | | | | | These will be removed anyway and any change on them risks to be an originating update that causes replication problems. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Mar 14 03:12:27 UTC 2019 on sn-devel-144
* blackbox/dbcheck-links.sh: prepare regression test for skipping expired ↵Stefan Metzmacher2019-03-141-0/+115
| | | | | | | | | tombstones BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/dbcheck*.sh: pass --selftest-check-expired-tombstones to dbcheckStefan Metzmacher2019-03-142-16/+16
| | | | | | | | | | | These tests operate on provision dumps created long ago, they still want to run tests on deleted objects, when the next commits remove processing expired tombstone objects in dbcheck. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/dbcheck-links.sh: add regression test for lost deleted object repairStefan Metzmacher2019-03-141-0/+100
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/dbcheck-links.sh: reproduce lost deleted object problemStefan Metzmacher2019-03-141-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a parent object is removed during the tombstone garbage collection before a child object and samba-tool dbcheck runs at the same time, the following can happen: - If the object child had DISALLOW_MOVE_ON_DELETE in systemFlags, samba-tool dbcheck moves the object under the LostAndFound[Config] object (as an originating update!) - The lastKnownParent attribute is removed (as an originating update!) These originating updates cause the object to have an extended time as tombstone. And these changes are replicated to other DCs, which very likely already removed the object completely! This means the destination DC of replication has no chance to handle the object it gets from the source DC with just 2 attributes (name, lastKnownParent). The destination logs something like: No objectClass found in replPropertyMetaData BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/*.sh: pass -u to 'diff'Stefan Metzmacher2019-03-143-28/+28
| | | | | | | | | This is what we work with every day... BUG: https://bugzilla.samba.org/show_bug.cgi?id=13816 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/dbcheck.sh: fix dbcheck_fix_one_way_links cleanupStefan Metzmacher2019-02-111-1/+1
| | | | | | | | | | | | | Commit 35bfc62a31c9ad73449594ddd48f76f50e0abade changed dbcheck to not regard old one-way-links as errors. At that time the relavant trigger changed from fix_all_string_dn_component_mismatch to fix_all_old_dn_string_component_mismatch. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs/blackbox: make sure samba-tool is called with correct pythonNoel Power2018-12-101-2/+2
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* CVE-2018-16853: Add a test to verify s4u2self doesn't crashIsaac Boukris2018-11-281-0/+12
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13571 Signed-off-by: Isaac Boukris <iboukris@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2018-16853: Fix kinit test on system lacking ldbsearchIsaac Boukris2018-11-281-4/+4
| | | | | | | | | | By fixing bindir variable name. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13571 Signed-off-by: Isaac Boukris <iboukris@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2018-16841 selftest: Check for mismatching principal in certficate ↵Andrew Bartlett2018-11-281-0/+8
| | | | | | | | compared with principal in AS-REQ BUG: https://bugzilla.samba.org/show_bug.cgi?id=13628 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* netcmd/ldapcmp: pass --skip-missing-dn to LDAPBaseJoe Guo2018-11-213-3/+3
| | | | | | | | | | | | | This option has default value False, and was actually not passed down from cli to LDAPBase. However, LDAPBase.__init__ has default value True for it. After the change, a few tests using ldapcmp are affected. Add --skip-missing-dn explicitly to keep the behavior consistent, otherwise test will fail. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs/blackbox: PY3 bulk change for python scripts use correct pythonNoel Power2018-11-1415-96/+96
| | | | | | | | Change all instance where python scripts are called so that the correct python version as specified by $PYTHON is used Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* dsdb: Add comments explaining the limitations of our current backlink behaviourAndrew Bartlett2018-10-301-1/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13418 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Tim Beale <timbeale@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Oct 30 10:32:51 CET 2018 on sn-devel-144
* blackbox/dbcheck-links: Test broken links with missing <SID=...> on linked ↵Stefan Metzmacher2018-10-301-0/+110
| | | | | | | | | attributes BUG: https://bugzilla.samba.org/show_bug.cgi?id=13418 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs/blackbox: add samba4.blackbox.test_primary_group testStefan Metzmacher2018-10-301-0/+86
| | | | | | | | | | This demonstrates the bug, that happens when the primaryGroupID of a user is changed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13418 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs/blackbox: Use PYTHON env variable for calling python scriptsNoel Power2018-10-234-18/+18
| | | | | | | | Ensure samba-tool is called with correct python that is defined by $PYTHON Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Add expected-value testing for userParametersAndrew Bartlett2018-10-231-0/+13
| | | | | | | | | This does not means that bugs like https://bugzilla.samba.org/show_bug.cgi?id=11881 are fixed, however we do not wish to cause further issues without noticing it, eg during python3 fixes for dbcheck. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>