mirror of
https://github.com/samba-team/samba.git
synced 2025-01-06 13:18:07 +03:00
38 lines
640 B
Plaintext
38 lines
640 B
Plaintext
|
#
|
||
|
# @(#) Test initgroups function
|
||
|
#
|
||
|
|
||
|
load_lib util-defs.exp
|
||
|
load_lib compile.exp
|
||
|
|
||
|
if { [util_start "id -u"] != 0 } {
|
||
|
set test_desc "must be userid 0 to run"
|
||
|
note $test_desc
|
||
|
untested $test_desc
|
||
|
return
|
||
|
}
|
||
|
|
||
|
# Compile test program
|
||
|
|
||
|
simple_compile "initgroups"
|
||
|
|
||
|
# Test domain users
|
||
|
|
||
|
set user_list [split [util_start "bin/wbinfo" "-u"] "\n"]
|
||
|
|
||
|
verbose $user_list
|
||
|
|
||
|
foreach { user } $user_list {
|
||
|
set output [util_start "$srcdir/$subdir/initgroups" "\"$user\"" ""]
|
||
|
|
||
|
verbose $output
|
||
|
|
||
|
set test_desc "initgroups $user"
|
||
|
|
||
|
if { [regexp "PASS" $output] } {
|
||
|
pass $test_desc
|
||
|
} else {
|
||
|
fail $test_desc
|
||
|
}
|
||
|
}
|