summaryrefslogtreecommitdiff
path: root/testprogs
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add test for disabling NTLMSSP for ldap client connectionsPavel Filipenský2022-01-211-0/+41
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14955 Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* test: Prime the kpasswd serverVolker Lendecke2021-12-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was getting this failure: [102(815)/143 at 10m59s] samba4.blackbox.net_ads_dns(ad_member:local)(ad_member:local) UNEXPECTED(failure): samba4.blackbox.net_ads_dns(ad_member:local).Adding an unprivileged user(ad_member:local) REASON: Exception: Exception: Could not add user unprivuser. Error setting password Incorrect net address My preliminary analysis shows that the KRB5KRB_AP_ERR_BADADDR error message is triggered by the libkrb5 client code. I have not yet shown this to happen with pure libkrb5, but my theory is the following: k5_privsafe_check_addrs() fails under the following circumstances: The kpasswd server is contacted on IPv4 and is slow to reply. After waiting a bit, libkrb5 also tries to contact kpasswd on IPv6. kpasswd_sendto_msg_callback() for the IPv6 request changes the authentication context's local_addr to IPv6. Then the IPv4 request is replied to, and then k5_privsafe_check_addrs() bails on the address family in ac->local_addr (IPv6) vs the one received and via the IPv4 connection. libkrb5's src/lib/krb5/os/changepw.c has this comment: /* * TBD: Does this tamper w/ the auth context in such a way * to break us? Yes - provide 1 per conn-state / host... */ I think we're hit by this. This patch hacks around the situation by priming the kpasswd server without error checking. If the initial v4 request is quick enough because the kpasswd server is already started up properly, everything works flawlessly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* testprogs: Add rpcclient schannel testsAndreas Schneider2021-12-021-0/+94
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14767 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* test/blackbox/test_samba-tool_ntacl: use utf-8Douglas Bagnall2021-11-171-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org>
* CVE-2020-25722 blackbox/upgrades tests: ignore SPN for ldapcmpDouglas Bagnall2021-11-093-5/+5
| | | | | | | | | | | We need to have the SPNs there before someone else nabs them, which makes the re-provisioned old releases different from the reference versions that we keep for this comparison. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14564 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Use new cmdline option for kerberosAndreas Schneider2021-10-282-4/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14846 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* selftest/dbcheck: Fix up RODC one-way links (use correct dbcheck rule)Andrew Bartlett2021-10-151-2/+2
| | | | | | | | | | | | | | | | The previous commit was correct on intention, but it was not noticed as there is a race, that the incorrect rule was appended to. These links are removed by remove_plausible_deleted_DN_links not fix_all_old_dn_string_component_mismatch BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Oct 15 10:00:47 UTC 2021 on sn-devel-184
* selftest/dbcheck: Fix up RODC one-way linksJoseph Sutton2021-10-141-1/+1
| | | | | | | | | | Test accounts were replicated to the RODC and then deleted, causing state links to remain in the database. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: fix ---configfile optionRalph Boehme2021-09-101-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14828 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4-selftest: add net offlinejoin testsGünther Deschner2021-07-141-0/+69
| | | | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Jul 14 17:38:21 UTC 2021 on sn-devel-184
* selftest: fl2000dc: Add outgoing trust from fl2000dc to ad_dcAndreas Schneider2021-07-071-1/+1
| | | | | | Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Fix "outgoing" test in kinit_trust heimdalIsaac Boukris2021-07-071-1/+1
| | | | | | | Found by the test not failing in one-way trust. Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Show that DOM\user and REALM\user work for authAndreas Schneider2021-07-071-1/+7
| | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Rename TRUST_CREDS variables in test_trust_utils.shAndreas Schneider2021-07-071-34/+34
| | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Consistantly use kinit -c $KRB5CCNAMEStefan Metzmacher2021-07-0514-45/+37
| | | | | | | | | | | | | | | We want to be really clear which credentials cache we use. The kerberos_kinit() shell function uses this internally. -c is the common option between MIT and Heimdal, and is equivilant to --cache 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): Mon Jul 5 23:51:43 UTC 2021 on sn-devel-184
* testprogs/blackbox: Remove joined dc for ldapcmpAndrew Bartlett2021-06-211-0/+7
| | | | | | | | We don't need this DC once the ldapcmp is over, and it avoids the running DC spamming the logs looking for it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* testprogs: Add smbtorture tests with new optionsAndreas Schneider2021-06-161-1/+32
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:torture: Pass the pkinit ccache via a torture variableAndreas Schneider2021-06-161-1/+1
| | | | | | | | Mixing -Uuser%password and --krb5-ccache doesn't really work on the cmdline as -U overwrited the ccache. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Use new kerberos options for smbclient(4) testsAndreas Schneider2021-06-1610-91/+91
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Remove --debuglevel from test_kinit_trusts_mit.shAndreas Schneider2021-06-161-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Test that dns.keytab is created after a dns upgradeJoseph Sutton2021-06-111-0/+1
| | | | | | Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s3:utils: Use connection and credentials parser in net utilAndreas Schneider2021-05-283-12/+12
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Add additional rpcclient tests for new cmdline optionsAndreas Schneider2021-05-201-3/+34
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Rename test_rpc_getusername_legacy()Andreas Schneider2021-05-201-12/+12
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Add more smbclient kerberos tests for new cmdline optionsAndreas Schneider2021-05-201-7/+67
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Add test for offline logon supportAndreas Schneider2021-05-121-0/+43
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tests: Use --configfile instead of -sAndreas Schneider2021-04-289-27/+27
| | | | | | | | | | We should use long options in tests to make clear what we are trying to do. Also the -s short option will be removed for --configfile later. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs: Use --suppress-prompt instead of -s for testparmAndreas Schneider2021-04-282-3/+3
| | | | | | | | We should use long options in tests to make clear what we are trying to do. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests: Use ldbsearch '--scope instead of '-s'Andreas Schneider2021-04-2812-75/+75
| | | | | | | | We should use long options in tests to make clear what we are trying to do. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Improve test names in kinit test for improved debuggingAndrew Bartlett2021-04-201-10/+10
| | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testprogs:blackbox: create temporary files under $PREFIX/SELFTEST_TMPDIRStefan Metzmacher2021-04-132-4/+4
| | | | | | | Tests should not create files in the build nor the source directory! Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dbcheck: Check Deleted Objects and reduce noise in reports about expired ↵Andrew Bartlett2021-02-031-1/+1
| | | | | | | | | | | | | | | | | | | tombstones These reports (about recently deleted objects) create concern about a perfectly normal part of DB operation. We must not operate on objects that are expired or we might reanimate them, but we must fix "Deleted Objects" if it is wrong (mostly it is set as being deleted in 9999, but in alpha19 we got this wrong). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14593 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 3 05:29:11 UTC 2021 on sn-devel-184
* selftest: Confirm that we fix any errors on the Deleted Objects container itselfAndrew Bartlett2021-02-031-0/+12
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14593 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* tests: also test net ads dns (un)register with IPv6Björn Jacke2020-12-231-15/+11
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13706 Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tests: also test v6 for async dns test by using digBjörn Jacke2020-12-231-5/+14
| | | | | Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* blackbox/test_samba-tool_ntacl.sh: script requires two argumentsBjörn Baumbach2020-12-171-5/+3
| | | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* testprogs: Fix MIT KRB5 export keytab with > 1.18Andreas Schneider2020-11-211-6/+16
| | | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Nov 21 00:11:02 UTC 2020 on sn-devel-184
* testprogs/blackbox: make sure subunit.sh always terminates DETAILS with '\n]\n'Stefan Metzmacher2020-11-111-3/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* testprogs: Fix and improve upgradeprovision-oldrelease testAndreas Schneider2020-10-221-133/+121
| | | | | | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 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): Thu Oct 22 17:28:39 UTC 2020 on sn-devel-184
* testprogs: Fix and improve dbcheck-oldrelease testAndreas Schneider2020-10-221-117/+123
| | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Fix and improve functionalprep testAndreas Schneider2020-10-221-33/+44
| | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Fix and improve dbcheck-links testAndreas Schneider2020-10-221-78/+82
| | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Fix and improve runtime-links testAndreas Schneider2020-10-222-37/+44
| | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Fix and improve tombstones-expunge testAndreas Schneider2020-10-221-44/+50
| | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Fix and improve demote-saveddb testAndreas Schneider2020-10-221-32/+43
| | | | | | | | This fixes running `make test` in a release tarball! BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* testprogs: Add remove_directory to common test functionsAndreas Schneider2020-10-221-0/+11
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14542 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* tests: Disable kerberos for weak crypto testSamuel Cabrero2020-09-171-1/+11
| | | | | | | | | | | Otherwise the test fails because the client is authenticated using spnego and gse_krb5, not triggering the weak crypto restrictions. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Sep 17 00:05:51 UTC 2020 on sn-devel-184
* Revert "selftest: add tests for net-ads over TLS"Isaac Boukris2020-08-111-76/+0
| | | | | | | | | | | As we are removing the option. This reverts commit 10f61cd39b9e03e7bb781edf04022ea6ae1f1cac. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14462 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4: tests: Add new async DNS unit test - ↵Jeremy Allison2020-08-071-0/+67
| | | | | | samba4.blackbox.net_ads_dns_async(ad_member:local). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* 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>