mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r22187: Test kerberos logins in the smbclient blackbox tests, including with a
machine account. Andrew Bartlett
This commit is contained in:
parent
a45c7cf238
commit
16a2bb87a8
@ -248,6 +248,10 @@ int cli_credentials_get_ccache(struct cli_credentials *cred,
|
||||
{
|
||||
krb5_error_code ret;
|
||||
|
||||
if (cred->machine_account_pending) {
|
||||
cli_credentials_set_machine_account(cred);
|
||||
}
|
||||
|
||||
if (cred->ccache_obtained >= (MAX(cred->principal_obtained,
|
||||
cred->username_obtained))) {
|
||||
*ccc = cred->ccache;
|
||||
|
@ -210,6 +210,11 @@ cat >$KRB5_CONFIG<<EOF
|
||||
admin_server = 127.0.0.1:88
|
||||
default_domain = $DNSNAME
|
||||
}
|
||||
$DNSNAME = {
|
||||
kdc = 127.0.0.1:88
|
||||
admin_server = 127.0.0.1:88
|
||||
default_domain = $DNSNAME
|
||||
}
|
||||
$DOMAIN = {
|
||||
kdc = 127.0.0.1:88
|
||||
admin_server = 127.0.0.1:88
|
||||
|
@ -16,5 +16,5 @@ ADDARGS="$*"
|
||||
incdir=`dirname $0`
|
||||
. $incdir/test_functions.sh
|
||||
|
||||
plantest "blackbox.smbclient" dc $incdir/../../../testprogs/blackbox/test_smbclient.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.cifsdd" dc $incdir/../../../testprogs/blackbox/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||
plantest "blackbox.smbclient" dc $incdir/../../../testprogs/blackbox/test_smbclient.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
|
||||
plantest "blackbox.cifsdd" dc $incdir/../../../testprogs/blackbox/test_cifsdd.sh "\$NETBIOSNAME" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
|
||||
|
@ -96,7 +96,9 @@ echo rm tmpfilex | runcmd "Removing file" || failed=`expr $failed + 1`
|
||||
echo ls | runcmd "List directory with LANMAN1" -m LANMAN1 || failed=`expr $failed + 1`
|
||||
echo ls | runcmd "List directory with LANMAN2" -m LANMAN2 || failed=`expr $failed + 1`
|
||||
|
||||
echo ls | testit "Test login with --machine-pass" $VALGRIND bin/smbclient $CONFIGURATION //$SERVER/tmp --machine-pass || failed=`expr $failed + 1`
|
||||
echo ls | testit "Test login with --machine-pass without kerberos" $VALGRIND bin/smbclient $CONFIGURATION //$SERVER/tmp --machine-pass -k no || failed=`expr $failed + 1`
|
||||
|
||||
echo ls | testit "Test login with --machine-pass and kerberos" $VALGRIND bin/smbclient $CONFIGURATION //$SERVER/tmp --machine-pass -k yes || failed=`expr $failed + 1`
|
||||
|
||||
(
|
||||
echo "password=$PASSWORD"
|
||||
|
Loading…
Reference in New Issue
Block a user