mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
testprogs: use texpect instead of rkpty.
Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
This commit is contained in:
parent
a78a87ac53
commit
c4e15e0f6d
@ -29,7 +29,7 @@ if test -x $BINDIR/samba4kinit; then
|
||||
fi
|
||||
|
||||
samba_tool="$samba4bindir/samba-tool"
|
||||
rkpty="$samba4bindir/rkpty"
|
||||
texpect="$samba4bindir/texpect"
|
||||
samba4kpasswd=kpasswd
|
||||
if test -x $BINDIR/samba4kpasswd; then
|
||||
samba4kpasswd=$BINDIR/samba4kpasswd
|
||||
@ -137,7 +137,7 @@ send ${NEWUSERPASS}\n
|
||||
expect Success
|
||||
EOF
|
||||
|
||||
testit "change user password with kpasswd" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
testit "change user password with kpasswd" $texpect $PREFIX/tmpkpasswdscript $samba4kpasswd nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
|
||||
testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
|
||||
@ -154,7 +154,7 @@ send ${NEWUSERPASS}\n
|
||||
expect Success
|
||||
EOF
|
||||
|
||||
testit "set user password with kpasswd" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
testit "set user password with kpasswd" $texpect $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
|
||||
testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
|
||||
@ -171,7 +171,7 @@ send ${NEWUSERPASS}\n
|
||||
expect Success
|
||||
EOF
|
||||
|
||||
testit "set user password with kpasswd and servicePrincipalName" $rkpty $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache host/nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
testit "set user password with kpasswd and servicePrincipalName" $texpect $PREFIX/tmpkpasswdscript $samba4kpasswd --cache=$PREFIX/tmpccache host/nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
|
||||
testit "kinit with user password" $samba4kinit $enctype --password-file=$PREFIX/tmpuserpassfile --request-pac nettestuser@$REALM || failed=`expr $failed + 1`
|
||||
|
||||
@ -201,7 +201,7 @@ send ${NEWUSERPASS}\n
|
||||
expect Success: Password changed
|
||||
EOF
|
||||
|
||||
testit "kinit with user password for expired password" $rkpty $PREFIX/tmppasswordchange $samba4kinit $enctype --request-pac nettestuser@$REALM && failed=`expr $failed + 1`
|
||||
testit "kinit with user password for expired password" $texpect $PREFIX/tmppasswordchange $samba4kinit $enctype --request-pac nettestuser@$REALM && failed=`expr $failed + 1`
|
||||
|
||||
test_smbclient "Test login with user kerberos ccache" 'ls' -k yes || failed=`expr $failed + 1`
|
||||
|
||||
|
@ -23,7 +23,7 @@ pdbtest="$samba4bindir/pdbtest"
|
||||
pdbedit="$samba4bindir/pdbedit"
|
||||
net="$samba4bindir/net"
|
||||
smbpasswd="$samba4bindir/smbpasswd"
|
||||
rkpty="$samba4bindir/rkpty"
|
||||
texpect="$samba4bindir/texpect"
|
||||
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
@ -58,7 +58,7 @@ expect retype new password:
|
||||
send ${NEWUSERPASS}\n
|
||||
EOF
|
||||
|
||||
testit "create user with pdbedit" $rkpty ./tmpsmbpasswdscript $VALGRIND $pdbedit -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
|
||||
testit "create user with pdbedit" $texpect ./tmpsmbpasswdscript $VALGRIND $pdbedit -a $USER --account-desc="pdbedit-test-user" $@ || failed=`expr $failed + 1`
|
||||
USERPASS=$NEWUSERPASS
|
||||
|
||||
test_smbclient "Test login with user (ntlm)" 'ls' -k no -U$USER%$NEWUSERPASS $@ || failed=`expr $failed + 1`
|
||||
@ -77,7 +77,7 @@ expect Retype new SMB password:
|
||||
send ${NEWUSERPASS}\n
|
||||
EOF
|
||||
|
||||
testit "set user password with smbpasswd" $rkpty ./tmpsmbpasswdscript $smbpasswd -L $USER -c $SMB_CONF || failed=`expr $failed + 1`
|
||||
testit "set user password with smbpasswd" $texpect ./tmpsmbpasswdscript $smbpasswd -L $USER -c $SMB_CONF || failed=`expr $failed + 1`
|
||||
USERPASS=$NEWUSERPASS
|
||||
|
||||
test_smbclient "Test login with user (ntlm)" 'ls' -k no -U$USER%$NEWUSERPASS $@|| failed=`expr $failed + 1`
|
||||
|
@ -29,7 +29,6 @@ if test -x $BINDIR/samba4kinit; then
|
||||
fi
|
||||
|
||||
samba_tool="$samba4bindir/samba-tool"
|
||||
rkpty="$samba4bindir/rkpty"
|
||||
samba4kpasswd=kpasswd
|
||||
if test -x $BINDIR/samba4kpasswd; then
|
||||
samba4passwd=$BINDIR/samba4kpasswd
|
||||
|
Loading…
Reference in New Issue
Block a user