From 0cfef7f50efcb5e1c9d1c35e54c29796b6aabe26 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 1 Jul 2017 22:20:17 +1200 Subject: selftest: Prime the netlogon cache during test_idmap_rfc2307 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 Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Sun Jul 2 21:59:18 CEST 2017 on sn-devel-144 --- nsswitch/tests/test_idmap_rfc2307.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nsswitch') diff --git a/nsswitch/tests/test_idmap_rfc2307.sh b/nsswitch/tests/test_idmap_rfc2307.sh index 2e1727487f5..35daa39a592 100755 --- a/nsswitch/tests/test_idmap_rfc2307.sh +++ b/nsswitch/tests/test_idmap_rfc2307.sh @@ -185,6 +185,12 @@ testit "Count number of valid sids found" \ test ${NUM_VALID_SIDS} = ${NUMGROUPS} || failed=$(expr $failed + 1) +# Prime the cache so we test idmap, not the harder problem of +# consistent group memberships for users without a login. + +testit "Authenticate the user to prime the netlogon cache" \ + $wbinfo -a $DOMAIN/$DC_USERNAME%$DC_PASSWORD || failed=$(expr $failed + 1) + # Test whether wbinfo -r shows all groups EXPECTED_USERGROUPS="1000000/1000001/2000002/" -- cgit v1.2.1