-#!/usr/bin/python
-
# Copyright (C) 2010 by the Massachusetts Institute of Technology.
# All rights reserved.
#
-#!/usr/bin/python
from k5test import *
# If uuserver is not compiled under -DDEBUG, then set to 0
AC_SUBST(HAVE_RUNTEST)
# For Python tests.
-AC_CHECK_PROG(PYTHON,python,python)
+AC_CHECK_PROG(PYTHON,python2,python2)
+if text x"$PYTHON" = x; then
+ AC_CHECK_PROG(PYTHON,python,python)
+fi
HAVE_PYTHON=no
if test x"$PYTHON" != x; then
# k5test.py requires python 2.4 (for the subprocess module).
# Some code needs python 2.5 (for syntax like conditional expressions).
- vercheck="import sys;sys.exit((sys.hexversion < 0x2050000) and 1 or 0)"
- if python -c "$vercheck"; then
+ wantver="(sys.hexversion >= 0x2050000 and sys.hexversion < 0x3000000)"
+ if "$PYTHON" -c "import sys; sys.exit(not $wantver and 1 or 0)"; then
HAVE_PYTHON=yes
fi
fi
-#!/usr/bin/python
-
from k5test import *
from subprocess import *
-#!/usr/bin/python
from k5test import *
# Set the maximum UDP reply size very low, so that all replies go
-#!/usr/bin/python
from k5test import *
realm = K5Realm(create_host=False)
-#!/usr/bin/python
from k5test import *
realm = K5Realm(start_kdc=False, create_host=False)
-#!/usr/bin/python
from k5test import *
realm = K5Realm(create_kdb=False)
-#!/usr/bin/python
-#
# Copyright 2013 Red Hat, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
-#!/usr/bin/python
from k5test import *
realm = K5Realm(create_kdb=False)
-#!/usr/bin/python
-
# Copyright (C) 2010 by the Massachusetts Institute of Technology.
# All rights reserved.
#
-#!/usr/bin/python
-
# Copyright (C) 2010,2012 by the Massachusetts Institute of Technology.
# All rights reserved.
#
-#!/usr/bin/python
-
# Copyright (C) 2011 by the Massachusetts Institute of Technology.
# All rights reserved.
#
-#!/usr/bin/python
from k5test import *
entries = ('URI _kerberos.TEST krb5srv::kkdcp:https://kdc1 1 1\n',
-#!/usr/bin/python
from k5test import *
# Test authentication indicators. Load the test preauth module so we
-#!/usr/bin/python
-
# Copyright (C) 2011 by the Massachusetts Institute of Technology.
# All rights reserved.
-#!/usr/bin/python
from k5test import *
# Set up a basic realm and a client keytab containing two user principals.
-#!/usr/bin/python
from k5test import *
# Define some convenience abbreviations for enctypes we will see in
-#!/usr/bin/python
from k5test import *
# Test gss_export_cred and gss_import_cred for initiator creds,
-#!/usr/bin/python
from k5test import *
# Test krb5 negotiation under SPNEGO for all enctype configurations. Also
-#!/usr/bin/python
from k5test import *
realm = K5Realm(create_host=False, get_creds=False)
-#!/usr/bin/python
-
import sys
try:
import cjson
-#!/usr/bin/python
from k5test import *
conf = {'plugins': {'audit': {
-#!/usr/bin/python
from k5test import *
# Load the sample KDC authdata module.
-#!/usr/bin/python
-
import base64
import socket
from k5test import *
-#!/usr/bin/python
-
# Copyright (C) 2011 by the Massachusetts Institute of Technology.
# All rights reserved.
-#!/usr/bin/python
from k5test import *
# Skip this test if pkinit wasn't built.
-#!/usr/bin/python
from k5test import *
# This file is intended to cover any password-changing mechanism. For
-#!/usr/bin/python
-
# Copyright (C) 2011 by the Massachusetts Institute of Technology.
# All rights reserved.
#
-#!/usr/bin/python
-
import base64
import socket
from k5test import *
-#!/usr/bin/python
-
import base64
import socket
from k5test import *
-#!/usr/bin/python
-
from k5test import *
realm = K5Realm()
-#!/usr/bin/python
-
from k5test import *
realm = K5Realm(realm='TEST')
-#!/usr/bin/python
from k5test import *
from filecmp import cmp
-#!/usr/bin/python
from k5test import *
realm = K5Realm(create_kdb=False)
-#!/usr/bin/python
from k5test import *
supported_enctypes = 'aes128-cts des3-cbc-sha1 rc4-hmac des-cbc-crc:afs3'
-#!/usr/bin/python
from k5test import *
for realm in multipass_realms(create_host=False):
-#!/usr/bin/python
from k5test import *
# Test that KDC send and recv hooks work correctly.
-#!/usr/bin/python
from k5test import *
plugin = os.path.join(buildtop, "plugins", "hostrealm", "test",
-#!/usr/bin/python
-
import os
import re
-#!/usr/bin/python
from k5test import *
# Create a realm with the welcomer and bouncer kadm5_auth test modules
-#!/usr/bin/python
from k5test import *
plugin = os.path.join(buildtop, "plugins", "kadm5_hook", "test",
-#!/usr/bin/python
from k5test import *
import os
-#!/usr/bin/python
from k5test import *
# This file contains tests for kadmin command parsing. Principal
-#!/usr/bin/python
from k5test import *
import time
from itertools import imap
-#!/usr/bin/python
-
# This is a regression test for
# https://bugzilla.redhat.com/show_bug.cgi?id=586032 .
#
-#!/usr/bin/python
-
from k5test import *
# Make a TGS request with an expired ticket.
-#!/usr/bin/python
from k5test import *
from datetime import datetime
import re
-#!/usr/bin/python
from k5test import *
realm = K5Realm(create_user=False, create_host=False)
-#!/usr/bin/python
from k5test import *
rollover_krb5_conf = {'libdefaults': {'allow_weak_crypto': 'true'}}
-#!/usr/bin/python
from k5test import *
for realm in multipass_realms(create_user=False):
-#!/usr/bin/python
from k5test import *
conf_slave = {'dbmodules': {'db': {'database_name': '$testdir/db.slave'}}}
-#!/usr/bin/python
from k5test import *
# Unfortunately, we can't reliably test the k5login module. We can control
-#!/usr/bin/python
from k5test import *
import random
import re
-#!/usr/bin/python
-#
# Author: Nathaniel McCallum <npmccallum@redhat.com>
#
# Copyright (c) 2013 Red Hat, Inc.
-#!/usr/bin/python
from k5test import *
# Skip this test if pkinit wasn't built.
-#!/usr/bin/python
from k5test import *
import re
-#!/usr/bin/python
from k5test import *
# Test that the kdcpreauth client_keyblock() callback matches the key
-#!/usr/bin/python
from k5test import *
from princflags import *
import re
-#!/usr/bin/python
from k5test import *
# Skip this test if we're missing proxy functionality or parts of the proxy.
conf.write('kpasswd = kpasswd://localhost:%d\n' % (realm.portbase + 2))
conf.close()
realm.env['KDCPROXY_CONFIG'] = proxy_conf_path
- cmd = [proxy_exec_path, str(realm.server_port()), keycertpem]
+ cmd = [sys.executable, proxy_exec_path, str(realm.server_port()),
+ keycertpem]
return realm.start_server(cmd, sentinel='proxy server ready')
# Fail: untrusted issuer and hostname doesn't match.
-#!/usr/bin/python
from k5test import *
plugin = os.path.join(buildtop, "plugins", "pwqual", "test", "pwqual_test.so")
-#!/usr/bin/python
from k5test import *
conf = {'realms': {'$realm': {'supported_enctypes': 'aes256-cts aes128-cts'}}}
-#!/usr/bin/python
from k5test import *
# Create a pair of realms, where KRBTEST1.COM can authenticate to
-#!/usr/bin/python
from k5test import *
from datetime import datetime
import re
-#!/usr/bin/python
-
# Copyright (C) 2011 by the Massachusetts Institute of Technology.
# All rights reserved.
-#!/usr/bin/python
from k5test import *
import re
-#!/usr/bin/python
from k5test import *
import re
-#!/usr/bin/python
from k5test import *
# Create a realm with the KDC one hour in the past.
-#!/usr/bin/python
from k5test import *
offline = (len(args) > 0 and args[0] != "no")
-#!/usr/bin/python
from k5test import *
# The name and number of each supported SPAKE group.
-#!/usr/bin/python
-
# Copyright (C) 2011 by the Massachusetts Institute of Technology.
# All rights reserved.
-#!/usr/bin/python
from k5test import *
import csv
-#!/usr/bin/python
from k5test import *
# Default KDB iteration is locked. Expect write lock failure unless
-#!/usr/bin/python
from k5test import *
# These tests will become much less important after the y2038 boundary
-#!/usr/bin/python
import kdcproxy
from paste import httpserver
import os