2 # @
(#
) Test whether members of domain groups all have domain names
7 set group_list
[split
[util_start
"getent group" ""] "\n"]
10 foreach
{ group
} $group_list
{
11 set group_entry
[split $group
":"]
13 set group_name
[lindex $group_entry
0]
14 set group_members
[split
[lindex $group_entry
3] ","]
16 if { [regexp
{^
[^
/]+/} $group_name
] } {
18 verbose
"group $group_name has members $group_members"
20 foreach
{ user
} $group_members
{
21 if { ![regexp
{^
[^
/]+/} $user
] } {
22 fail
"group $group has non-domain user $user"
27 verbose
"ignoring non-domain group $group_name"
32 pass
"domain groups contain only domain members"