2 # @(#) Test reverse lookup of group ids from getent match getgrgid() output
10 simple_compile "getgrgid"
12 # Get list of gids using getent
14 set output [util_start "getent" "group" ""]
19 foreach {line} [split $output "\n"] {
23 set grp_entry [split $line ":"]
24 set group [lindex $grp_entry 0]
26 if {[regexp {^[^/]+/} $group]} {
30 # Only lookup winbindd users
32 set gid [lindex $grp_entry 2]
34 # Test lookup of gid succeeds
36 set output [util_start "$srcdir/$subdir/getgrgid" "$gid" ""]
39 if {[regexp "PASS:" $output]} {
40 pass "getgrgid $gid ($group)"
42 fail "getgrgid $gid ($group)"
49 perror "No domain groups returned from getent"