From: Volker Lendecke Date: Thu, 6 Apr 2017 10:50:08 +0000 (+0200) Subject: idmap_rfc2307: Test unix-ids-to-sids with 35 groups X-Git-Tag: samba-4.5.9~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fce999cda412621bfa8f5e1869f55d2af7de9f5d;p=thirdparty%2Fsamba.git idmap_rfc2307: Test unix-ids-to-sids with 35 groups BUG: https://bugzilla.samba.org/show_bug.cgi?id=12757 Signed-off-by: Volker Lendecke Reviewed-by: Christof Schmitt (cherry picked from commit ee3b17ba4674a17a411c9ec4271e087c8cd7dad1) Autobuild-User(v4-5-test): Karolin Seeger Autobuild-Date(v4-5-test): Tue May 16 13:34:00 CEST 2017 on sn-devel-144 --- diff --git a/nsswitch/tests/test_idmap_rfc2307.sh b/nsswitch/tests/test_idmap_rfc2307.sh index 5fabdc650d2..c62da5d3061 100755 --- a/nsswitch/tests/test_idmap_rfc2307.sh +++ b/nsswitch/tests/test_idmap_rfc2307.sh @@ -176,6 +176,20 @@ EOF i=$(expr "$i" + 1) done +# Test whether wbinfo --xids-to-sids finds everything + +GIDS="" +i=0 +while [ ${i} -lt ${NUMGROUPS} ] ; do + GIDS="$GIDS g$(expr ${i} + ${GID_START})" + i=$(expr "$i" + 1) +done +NUM_VALID_SIDS=$($wbinfo --unix-ids-to-sids="$GIDS" | grep -v ^S-0-0 | wc -l) + +testit "Count number of valid sids found" \ + test ${NUM_VALID_SIDS} = ${NUMGROUPS} || + failed=$(expr $failed + 1) + # Test whether wbinfo -r shows all groups EXPECTED_USERGROUPS="1000000/1000001/2000002/"