1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

tests: Fix idmap.rid.getgrnam for ad_member_idmap_rid with 'winbind expand groups = 10'

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Pavel Filipenský 2023-04-24 00:11:34 +02:00 committed by Andreas Schneider
parent 99d42ed865
commit 611444a22c

View File

@ -108,13 +108,15 @@ ret=$?
testit "getpwuid for ID_TYPE_BOTH group output" test $ret -eq 0 ||
failed=$(expr $failed + 1)
group_gr="$DOMAIN/domain users:x:$gid:"
group_gr="$DOMAIN/domain users:x:$gid"
out=$(getent group "$GROUP")
ret=$?
testit "getgrnam for ID_TYPE_BOTH group succeeds" test $ret -eq 0 ||
failed=$(expr $failed + 1)
test "$out" = "$group_gr"
# Compare only 'groupname:x:gid' part, drop the members
normalized_out=$(echo "$out" | cut -d: -f1-3)
test "$normalized_out" = "$group_gr"
ret=$?
testit "getgrnam for ID_TYPE_BOTH group output" test $ret -eq 0 ||
failed=$(expr $failed + 1)
@ -123,7 +125,9 @@ out=$(getent group "$gid")
ret=$?
testit "getgrgid for ID_TYPE_BOTH group succeeds" test $ret -eq 0 ||
failed=$(expr $failed + 1)
test "$out" = "$group_gr"
# Compare only 'groupname:x:gid' part, drop the members
normalized_out=$(echo "$out" | cut -d: -f1-3)
test "$normalized_out" = "$group_gr"
ret=$?
testit "getgrgid for ID_TYPE_BOTH group output" test $ret -eq 0 ||
failed=$(expr $failed + 1)