Skip to content

Commit

Permalink
selftest: Prime the netlogon cache during test_idmap_rfc2307
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Stefan Metzmacher <[email protected]>

Autobuild-User(master): Stefan Metzmacher <[email protected]>
Autobuild-Date(master): Sun Jul  2 21:59:18 CEST 2017 on sn-devel-144
  • Loading branch information
abartlet authored and metze-samba committed Jul 2, 2017
1 parent eb26522 commit 0cfef7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nsswitch/tests/test_idmap_rfc2307.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

0 comments on commit 0cfef7f

Please sign in to comment.