1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

selftest: Make test_wbinfo.sh work with s3-winbindd

Change-Id: I41ed850b6424eac3fb8b6603d5b87c66bb77dd51
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Andrew Bartlett 2014-05-12 17:10:14 +12:00
parent 4688cf77c4
commit 6add082461
3 changed files with 33 additions and 7 deletions

View File

@ -57,10 +57,10 @@ testit "wbinfo -u against $TARGET" $wbinfo -u || failed=`expr $failed + 1`
testit "wbinfo -g against $TARGET" $wbinfo -g || failed=`expr $failed + 1`
# Convert netbios name to IP
# Does not work yet
knownfail "wbinfo -N against $TARGET" $wbinfo -N $NETBIOSNAME || failed=`expr $failed + 1`
testit "wbinfo -N against $TARGET" $wbinfo -N $NETBIOSNAME || failed=`expr $failed + 1`
# Convert IP to netbios name
# Does not work yet
knownfail "wbinfo -I against $TARGET" $wbinfo -I $SERVER_IP || failed=`expr $failed + 1`
testit "wbinfo -I against $TARGET" $wbinfo -I $SERVER_IP || failed=`expr $failed + 1`
# Convert name to SID
testit "wbinfo -n against $TARGET" $wbinfo -n "$DOMAIN/$USERNAME" || failed=`expr $failed + 1`
@ -151,8 +151,8 @@ testfail "wbinfo -Y against $TARGET using invalid SID" $wbinfo -Y "S-1-22-1-3000
testit "wbinfo -t against $TARGET" $wbinfo -t || failed=`expr $failed + 1`
#didn't really work anyway
knownfail "wbinfo --trusted-domains against $TARGET" $wbinfo --trusted-domains || failed=`expr $failed + 1`
knownfail "wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1`
testit "wbinfo --trusted-domains against $TARGET" $wbinfo --trusted-domains || failed=`expr $failed + 1`
testit "wbinfo --all-domains against $TARGET" $wbinfo --all-domains || failed=`expr $failed + 1`
testit "wbinfo --own-domain against $TARGET" $wbinfo --own-domain || failed=`expr $failed + 1`
@ -177,7 +177,7 @@ testit "wbinfo -i against $TARGET" $wbinfo -i "$DOMAIN/$USERNAME" || failed=`exp
testit "wbinfo --uid-info against $TARGET" $wbinfo --uid-info $admin_uid || failed=`expr $failed + 1`
echo "test: wbinfo --group-info against $TARGET"
rawgid=`$wbinfo --group-info "Domain admins" | sed 's/.*:\([0-9][0-9]*\):/\1/'`
gid=`$wbinfo --group-info "$DOMAIN/Domain admins" | cut -d: -f3`
if test x$? = x0; then
echo "success: wbinfo --group-info against $TARGET"
else
@ -187,7 +187,6 @@ fi
testfail "wbinfo --group-info against $TARGET with $USERNAME" $wbinfo --group-info $USERNAME && failed=`expr $failed + 1`
gid=`echo $rawgid | sed 's/.*:\([0-9][0-9]*\):/\1/'`
testit "wbinfo --gid-info against $TARGET" $wbinfo --gid-info $gid || failed=`expr $failed + 1`
testit "wbinfo -r against $TARGET" $wbinfo -r "$DOMAIN/$USERNAME" || failed=`expr $failed + 1`

View File

@ -254,3 +254,30 @@
^samba3.winbind.wbclient.wbcGetSidAliases\(plugin_s4_dc\)
^samba3.winbind.wbclient.wbcLogonUser\(plugin_s4_dc\)
^samba3.winbind.wbclient.wbcChangeUserPassword\(plugin_s4_dc\)
^samba4.blackbox.wbinfo\(dc:local\).wbinfo -N against dc
^samba4.blackbox.wbinfo\(dc:local\).wbinfo -I against dc
^samba4.blackbox.wbinfo\(dc:local\).wbinfo --trusted-domains against dc
^samba4.blackbox.wbinfo\(dc:local\).wbinfo --all-domains against dc
^samba4.blackbox.wbinfo\(plugin_s4_dc:local\).wbinfo -N against plugin_s4_dc
^samba4.blackbox.wbinfo\(plugin_s4_dc:local\).wbinfo -I against plugin_s4_dc
^samba4.blackbox.wbinfo\(plugin_s4_dc:local\).wbinfo --trusted-domains against plugin_s4_dc
^samba4.blackbox.wbinfo\(plugin_s4_dc:local\).wbinfo --all-domains against plugin_s4_dc
^samba4.blackbox.wbinfo\(s4member:local\).wbinfo -N against s4member
^samba4.blackbox.wbinfo\(s4member:local\).wbinfo -I against s4member
^samba4.blackbox.wbinfo\(s4member:local\).wbinfo --trusted-domains against s4member
^samba4.blackbox.wbinfo\(s4member:local\).wbinfo --all-domains against s4member
^samba4.blackbox.wbinfo\(rodc:local\).wbinfo -N against rodc
^samba4.blackbox.wbinfo\(rodc:local\).wbinfo -I against rodc
^samba4.blackbox.wbinfo\(rodc:local\).wbinfo --trusted-domains against rodc
^samba4.blackbox.wbinfo\(rodc:local\).wbinfo --all-domains against rodc
^samba4.blackbox.wbinfo\(promoted_dc:local\).wbinfo -N against promoted_dc
^samba4.blackbox.wbinfo\(promoted_dc:local\).wbinfo -I against promoted_dc
^samba4.blackbox.wbinfo\(promoted_dc:local\).wbinfo --trusted-domains against promoted_dc
^samba4.blackbox.wbinfo\(promoted_dc:local\).wbinfo --all-domains against promoted_dc
#
# This makes less sense when not running against an AD DC
#
^samba4.blackbox.wbinfo\(s3member:local\).wbinfo -U against s3member
^samba4.blackbox.wbinfo\(s3member:local\).wbinfo -G against s3member
^samba4.blackbox.wbinfo\(s3member:local\).wbinfo -U check for sane mapping
^samba4.blackbox.wbinfo\(s3member:local\).wbinfo -G check for sane mapping

View File

@ -504,7 +504,7 @@ for env in ['vampire_dc', 'promoted_dc']:
plantestsuite("samba4.blackbox.samba_tool_demote(%s)" % env, env, [os.path.join(samba4srcdir, "utils/tests/test_demote.sh"), '$SERVER', '$SERVER_IP', '$USERNAME', '$PASSWORD', '$DOMAIN', '$DC_SERVER', '$PREFIX/%s' % env, smbclient4])
for env in ["dc", "s4member", "rodc", "promoted_dc", "plugin_s4_dc"]:
for env in ["dc", "s4member", "rodc", "promoted_dc", "plugin_s4_dc", "s3member"]:
plantestsuite("samba4.blackbox.wbinfo(%s:local)" % env, "%s:local" % env, [os.path.join(samba4srcdir, "../nsswitch/tests/test_wbinfo.sh"), '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', env])
# TODO: Verifying the databases really should be a part of the