summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-04-06 12:50:08 +0200
committerKarolin Seeger <kseeger@samba.org>2017-05-12 08:54:20 +0200
commitdb9553e89b22caab556018bc66193f58f1c5d2b4 (patch)
tree91e1954dfcc4e1f940e04f27eecdc8ee01b6b3a2
parentea5dd00ddc7964aeb3a39f1dbff10078b9166f65 (diff)
downloadsamba-db9553e89b22caab556018bc66193f58f1c5d2b4.tar.gz
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 <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit ee3b17ba4674a17a411c9ec4271e087c8cd7dad1)
-rwxr-xr-xnsswitch/tests/test_idmap_rfc2307.sh14
1 files changed, 14 insertions, 0 deletions
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/"