mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
dcc39ea439
branch. (This used to be commit acef477383e5739292e764c17cef87822a09f13b)
42 lines
878 B
Plaintext
42 lines
878 B
Plaintext
#
|
|
# @(#) Test default domain users resolve using the finger command
|
|
#
|
|
|
|
load_lib util-defs.exp
|
|
|
|
set output [util_start "bin/wbinfo" "-u"]
|
|
if { [regexp "Error" $output] } {
|
|
fail "error running wbinfo"
|
|
return
|
|
}
|
|
|
|
set user_list [split $output "\n"]
|
|
|
|
# Look up all users using finger. This should test getpwnam()
|
|
|
|
foreach { user } $user_list {
|
|
set output [util_start "finger" "-m $user" "" "no such user"]
|
|
verbose $output
|
|
|
|
if { [regexp "no such user" $output] } {
|
|
fail "finger -m $user"
|
|
} else {
|
|
pass "finger -m $user"
|
|
}
|
|
}
|
|
|
|
verbose "testing finger -m"
|
|
|
|
# Run finger without the -m to also test set/get/endpwent()
|
|
|
|
foreach { user } $user_list {
|
|
set output [util_start "finger" "-m $user"]
|
|
verbose $output
|
|
|
|
if { [regexp "no such user" $output] } {
|
|
fail "finger $user"
|
|
} else {
|
|
pass "finger $user"
|
|
}
|
|
}
|