summaryrefslogtreecommitdiff
path: root/nsswitch/tests
Commit message (Collapse)AuthorAgeFilesLines
* selftest: Add trusted domain tests for idmap_adChristof Schmitt2019-04-241-0/+106
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Pass trusted domain information to idmap_ad testChristof Schmitt2019-04-241-2/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Add gid-to-sid lookup to idmap_ad testChristof Schmitt2019-04-241-0/+24
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13903 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Fix usage information of test_wbinfo_name_lookup.shChristof Schmitt2019-04-181-2/+2
| | | | | | | | Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Thu Apr 18 18:20:26 UTC 2019 on sn-devel-144
* nsswitch: Add testcase for checking output of wbinfo --sid-to-nameChristof Schmitt2019-04-181-0/+15
| | | | | | | | | | The username should always be returned in the DOMAISHORTNAME/USERNAME format. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* selftest: Test sids-to-xids with one failing sidVolker Lendecke2019-01-081-0/+32
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* nsswitch/tests: PY3 samba_tool call correct pythonNoel Power2018-12-101-4/+4
| | | | | | | fix samba4.blackbox.rfc2307_mapping Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: test wbinfo -n and --gid-info with "NT Authority"Ralph Boehme2018-12-051-0/+18
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12164 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Mulder <dmulder@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* nsswitch:tests: Pass the envname to the scriptAndreas Schneider2018-11-081-2/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nsswitch: Use a swtich in the wbinfo test to lookup usersAndreas Schneider2018-07-061-8/+11
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jul 6 17:14:44 CEST 2018 on sn-devel-144
* nsswitch: Add tests to lookup user via getpwnamAndreas Schneider2018-07-041-9/+62
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13503 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* nsswitch:tests: Add test for wbinfo --user-infoAndreas Schneider2018-05-111-0/+83
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: Lookup the domain in tests with the wb seperatorAndreas Schneider2018-05-113-4/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: Add a test looking up domain sidAndreas Schneider2018-05-111-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: Add a test looking up the user using the upnAndreas Schneider2018-05-111-2/+7
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Add test for wbinfo name lookupChristof Schmitt2018-04-061-0/+40
| | | | | | | | | | | | This demonstrates that wbinfo -n / --name-to-sid returns information instead of failing the request. More specifically the query for INVALIDDOMAIN//user returns the user SID for the joined domain, instead of failing the request. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13312 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wbinfo: return "NOT MAPPED" instead of "S-0-0" for unmapped id-to-sidRalph Boehme2017-10-101-1/+1
| | | | | | | | | | | Currently wbinfo --unix-ids-to-sids prints "S-0-0" for failed mappings. Let it print "NOT MAPPED" instead. 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): Tue Oct 10 02:57:40 CEST 2017 on sn-devel-144
* selftest: add some basic tests for idmap_adRalph Boehme2017-07-121-0/+99
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Prime the netlogon cache during test_idmap_rfc2307Andrew Bartlett2017-07-021-0/+6
| | | | | | | | | | | | | | | This ensures that the group memberships just created are reflected in the test comparison. Otherwise we are trusting that no caches are primed, which is simply not safe in a test. (The login will put a list of groups, as obtained by the login over NETLOGON or via the PAC, into the samlogon cache). 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): Sun Jul 2 21:59:18 CEST 2017 on sn-devel-144
* selftest: Use tree_delete control in idmap_rfc2307 testAndrew Bartlett2017-07-021-12/+2
| | | | | | | | This control removes an entire subtree, which was the intention of the previouse code but much more effectively. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: Add ad_member tests for wbinfo --domain-info and --dc-infoAndreas Schneider2017-06-291-0/+6
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jun 29 02:33:48 CEST 2017 on sn-devel-144
* idmap_rfc2307: Test unix-ids-to-sids with 35 groupsVolker Lendecke2017-05-081-0/+14
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* test_idmap_rfc2307: Test wbinfo -r for 35 supplementary group membershipsVolker Lendecke2017-05-081-6/+60
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* test_idmap_rfc2307: Do a recursive delete in ou=idmapVolker Lendecke2017-05-081-8/+15
| | | | | | | | | We'll create more posix objects soon BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* test_idmap_rfc2307: Correct usageVolker Lendecke2017-05-081-1/+1
| | | | | | | | | We already have 13 args at this point, and growing BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* test_idmap_rfc2307: Avoid a tmpfileVolker Lendecke2017-05-081-17/+10
| | | | | | | | | We can << directly into ldbadd BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* test_idmap_rfc2307: Remove the correct fileVolker Lendecke2017-05-081-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* selftest: tests idmap mapping with idmap_ridRalph Boehme2017-04-071-0/+66
| | | | | | | | | | | | | | | | This adds two blackbox tests that run wbinfo --sids-to-unix-ids: o a non-existing SID from the primary domain should return a mapping o a SID with a bogus (and therefor unknown) domain must not return a mapping Bug: https://bugzilla.samba.org/show_bug.cgi?id=11961 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Apr 7 00:05:02 CEST 2017 on sn-devel-144
* selftest: fix for wbinfo -s tests for wellknown SIDsRalph Boehme2017-04-061-4/+9
| | | | | | | | | | | Rework while loop to not use a pipe as that uses a subshell for the loop which means assigning to the variable failed is not visible in the main script. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12727 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: fix SID composition in a test scriptRalph Boehme2017-04-051-1/+1
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Apr 5 17:59:32 CEST 2017 on sn-devel-144
* selftest: wbinfo -s tests for wellknown SIDsRalph Boehme2017-04-011-0/+20
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=12727 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Define template homedir for 'ad_member' envAndreas Schneider2017-03-301-6/+11
| | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12699 With this set, the samba3.local.nss test for ad_member will ensure that we correctly substitute those smb.conf options. 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): Thu Mar 30 04:26:18 CEST 2017 on sn-devel-144
* nsswtich: Add negative tests for authentication with wbinfoAndreas Schneider2017-03-221-0/+4
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12708 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Wed Mar 22 10:58:58 CET 2017 on sn-devel-144
* nsswitch: Use own credential cache for wbinfo testsAndreas Schneider2016-09-252-2/+18
| | | | | | | | If we do not set it will add the credentials to the system default credential cache, which is e.g. FILE:/tmp/krb5cc_1000. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: test idmap backend id allocation for unknown SIDSRalph Boehme2016-06-281-0/+41
| | | | | | | | | | | | If an SID is is not found becaues the RID doesn't exist in a domain and the domain is configured to use a non-allocating idmap backend like idmap_ad or idmap_rfc2307, winbindd must not return a mapping for the SID. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11961 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nsswitch: Extend idmap_rfc2307 testcase for reverse lookupChristof Schmitt2015-06-051-9/+63
| | | | | | | | | | | | | | Also test the codepaths to map UID and GID back to SID and names. Use different user and group to avoid returning results cached from the previous lookups. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11313 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jun 5 01:24:32 CEST 2015 on sn-devel-104
* selftest: Add tests for expected output of wbinfo -i and wbinfo --uid-infoAndrew Bartlett2015-05-061-3/+46
| | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Support using system ldbmodify.Jelmer Vernooij2014-11-191-1/+6
| | | | | | | | | Fixes this test when bin/ldbmodify isn't built because we're using the system ldbmodify. Change-Id: I2ff0d9808245353006c6be4989976a3edad8f98e Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Make test_wbinfo.sh work with s3-winbinddAndrew Bartlett2014-06-041-6/+5
| | | | | | Change-Id: I41ed850b6424eac3fb8b6603d5b87c66bb77dd51 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Set winbind separator = /Andrew Bartlett2014-06-041-8/+8
| | | | | | | | | | This avoids a pile of shell-script escape pain, and fixes some tests. Andrew Bartlett Change-Id: Ie1d0e32ab484a5b0ddbc4073831fe6de27e38e92 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: Rename wbinfo_s3 to wbinfo_simple and reorder code for clarityAndrew Bartlett2014-04-021-0/+17
| | | | | | | | | Change-Id: Ic2e06e448fce1d91422b711abf663b9253009a53 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Apr 2 13:07:24 CEST 2014 on sn-devel-104
* nsswitch: Fix idmap rfc2307 test with system ldb.Andreas Schneider2014-02-211-2/+11
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Add testcase for idmap_rfc2307 moduleChristof Schmitt2013-03-091-0/+94
| | | | | | | | | | | Create a new test environment with 'idmap config DOMAIN : backend = rfc2307'. A new test script adds LDAP records and queries them again for the mapped uid and gid. Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sat Mar 9 08:18:43 CET 2013 on sn-devel-104
* selftest: Add test for rfc2307 mapping handlingAndrew Bartlett2013-01-101-0/+181
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* selftest: Add test for bug #8884: wbinfo --group-info=administrator ↵Andrew Bartlett2012-04-231-0/+2
| | | | | | | segfaults s4-winbindd Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Mon Apr 23 07:44:50 CEST 2012 on sn-devel-104
* selftest: Remove unused support for --exeextAndrew Bartlett2012-02-011-1/+1
|
* selftest: Remove duplication between BUILDIR and BINDIRAndrew Bartlett2011-04-161-1/+1
| | | | | | Just have BINDIR, and have it default to ./bin Andrew Bartlett
* s4-test: enable valgrind on wbinfo testsAndrew Tridgell2010-09-161-1/+1
|
* s4:unittest: Test wbinfo --group-info and --gid-infoMatthieu Patou2010-09-111-3/+11
| | | | Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
* test_wbinfo.c - count more possible failuresMatthias Dieter Wallnöfer2010-09-111-1/+2
|