summaryrefslogtreecommitdiff
path: root/testprogs
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* selftest: test samba-tool ntacl get/set on AD member serverBjörn Baumbach2018-10-111-0/+68
| | | | | Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Volker Lendecke <vl@samba.org>
* selftest: Change backup testenvs to use non-default siteTim Beale2018-09-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Previously (i.e. up until the last patch) the backup/restore commands only worked if the Default-First-Site-Name site was present. If this site didn't exist, then the various restore testenvs would fail to start. This is now fixed, but this patch changes the backupfrom testenv so that it uses a non-default site. This will detect the problem if it is ever re-introduced. To do this we need to change provision_ad_dc() so the extra_provision_options can be specified as an argument. (Note that Perl treats undef the same as an empty array). By default, the restore will add the new DC into the Default-First-Site-Name site. This means the backupfromdc and restored testenvs will now have different sites, so we need to update the ldapcmp filters to exclude site-specific attributes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13621 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: pass configfile to pdbeditRalph Boehme2018-09-071-4/+4
| | | | | | | | | | This is needed otherwise pdbedit fails to initialize messaging in autobuild. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* selftest/samba4.blackbox.export.keytab: Update to use a principal with SPN ↵Andrew Bartlett2018-09-051-4/+11
| | | | | | | | | | as UPN The ability the kinit with an SPN (not also being a UPN) has gone away as windows doesn't offer this functionality. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* selftest/samba4.blackbox.export.keytab: Remove stray exit 0 and so run cleanupAndrew Bartlett2018-09-051-2/+0
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* testprogs/blackbox: let test_trust_user_account.sh check the correct ↵Stefan Metzmacher2018-09-051-0/+14
| | | | | | | | | | | kerberos salt This demonstrates the bug we currently have. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13539 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* testprogs/blackbox: add testit[_expect_failure]_grep() to subunit.shStefan Metzmacher2018-09-051-0/+50
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13539 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:selftest: test kinit with the interdomain trust user accountAlexander Bokovoy2018-09-051-0/+44
| | | | | | | | | | | | | To test it, add a blackbox test that ensures we pass a keytab-based authentication with the trust user account for a trusted domain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13539 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Alexander Bokovoy <ab@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:libads: Add net ads keep-account testJustin Stephenson2018-07-301-0/+14
| | | | | | | | | | | | | Add test for the new --keep-account net ads leave operation BUG: https://bugzilla.samba.org/show_bug.cgi?id=13498 Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jul 30 10:22:59 CEST 2018 on sn-devel-144
* tests: Add a sub-set of tests to show the restored DC is soundTim Beale2018-07-032-0/+106
| | | | | | | | | | | | | | | | | | | + Add a new ldapcmp_restoredc.sh test that asserts that the original DC backed up (backupfromdc) matches the new restored DC. + Add a new join_ldapcmp.sh test that asserts we can join a given DC, and that the resulting DB matches the joined DC + Add a new login_basics.py test that sanity-checks Kerberos and NTLM user login works. (This reuses the password_lockout base code, without taking as long as the password_lockout tests do). Basic LDAP and SAMR connections are also tested as a side-effect. + run the netlogonsvc test against the restored DC to prove we can establish a netlogon connection. + run the same subset of rpc.echo tests that we do for RODC + run dbcheck over the new testenvs at the end of the test run Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* dbchecker: Fixing up incorrect DNs wasn't workingTim Beale2018-07-031-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dbcheck would fail to fix up attributes where the extended DN's GUID is correct, but the DN itself is incorrect. The code failed attempting to remove the old/incorrect DN, e.g. NOTE: old (due to rename or delete) DN string component for objectCategory in object CN=alice,CN=Users,DC=samba,DC=example,DC=com - <GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e>; CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=bad,DC=com Change DN to <GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e>; CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com? [y/N/all/none] y Failed to fix old DN string on attribute objectCategory : (16, "attribute 'objectCategory': no matching attribute value while deleting attribute on 'CN=alice,CN=Users,DC=samba,DC=example,DC=com'") The problem was the LDB message specified the value to delete with its full DN, including the GUID. The LDB code then helpfully corrected this value on the way through, so that the DN got updated to reflect the correct DN (i.e. 'DC=example,DC=com') of the object matching that GUID, rather than the incorrect DN (i.e. 'DC=bad,DC=com') that we were trying to remove. Because the requested value and the existing DB value didn't match, the operation failed. We can avoid this problem by passing down just the DN (not the extended DN) of the value we want to delete. Without the GUID portion of the DN, the LDB code will no longer try to correct it on the way through, and the dbcheck operation will succeed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13495 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
* testprogs/blackbox: Add test to set and use password with non-asciiNoel Power2018-05-171-0/+17
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* netcmd: Split 'domain passwordsettings' into a super-commandTim Beale2018-05-115-13/+13
| | | | | | | | | | | | | | | | | | | The show and set options are not really related to each other at all, so it makes sense to split the code into 2 separate commands. We also want to add separate sub-commands for PSOs in a subsequent patch. Because of the way the sub-command was implemented previously, it meant that you could specify other command-line options before the 'set' or 'show' keyword, and the command would still be accepted. However, now that it's a super-command 'set'/'show' needs to be specified before any additional arguments, so we need to update the test code to reflect this. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
* selftest: Ensure tmpkpasswdscript is always under $PREFIXAndrew Bartlett2018-03-231-2/+2
| | | | | | | Otherwise it might not be removed at the end of the test Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* selftest: Align cleanup of tmpkpasswdscript with scripts that use itAndrew Bartlett2018-03-233-3/+3
| | | | | | | | Some scripts removed it without creating it and the others created it and did not remove it. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* testprogs/blackbox: add test_trust_token.shStefan Metzmacher2018-03-191-0/+93
| | | | | | | | | | This demonstrates, which SID we expect in a token of an user of a trusted domain. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13300 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testprogs: Return the correct error status codeAndreas Schneider2018-03-031-0/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* testprogs: 'net ads keytab create' expected failures should now passNoel Power2018-03-021-1/+1
| | | | | | | | | Following the commit to change the behaviour of 'net ads keytab create' some tests previously failing should now pass. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testprogs: Switch expected failure tests to expected passNoel Power2018-03-021-4/+4
| | | | | | | | | | Following the commit to change the behaviour of 'net ads keytab add' and new 'keytab add_update_ads' some tests previously failing should now pass. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testprogs:: Add blackbox tests for 'net ads keytab add'Noel Power2018-03-021-0/+78
| | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* testprocs/blackbox: Add tests for net ads setspn (add|delete|list)Noel Power2018-03-021-0/+20
| | | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Fix autobuild for user names starting with cChristof Schmitt2018-03-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | This is similar to the fix from commit 0b1ba00: Now commit 475a7616 introduced tests that create user names in the form DOMAIN\USER and pass them through shell functions. There "echo" is used to print he username, resulting in /bin/dash on sn-devel to interpret e.g. \c which skips any further output. The result are test exceptions like: failure: samba4.blackbox.trust_ntlm.Test01 rpcclient lookupnames with LOCALADMEMBER\cs(ad_member:local) [ Exception: Exception: LOCALADMEMBER ] time: 2018-02-26 23:00:46.688800Z Fix this by replacing the echo with printf %s. This surfaced for test_rpcclient_grep, but apply the same change to all functions in common_test_fns.inc for consistency. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Fri Mar 2 10:49:09 CET 2018 on sn-devel-144
* Remove some bashisms from the test scriptsTimur I. Bakeyev2018-03-011-3/+3
| | | | | | Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>