summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/gssapi/t_ccselect.py6
-rw-r--r--src/tests/gssapi/t_gssapi.py4
-rw-r--r--src/tests/gssapi/t_s4u.py2
-rw-r--r--src/tests/t_cccol.py2
-rw-r--r--src/tests/t_crossrealm.py17
-rwxr-xr-xsrc/tests/t_general.py4
-rw-r--r--src/tests/t_keyrollover.py2
-rw-r--r--src/tests/t_keytab.py2
-rw-r--r--src/tests/t_lockout.py2
-rw-r--r--src/tests/t_pwhist.py2
-rw-r--r--src/tests/t_renew.py2
-rw-r--r--src/tests/t_renprinc.py2
-rw-r--r--src/tests/t_skew.py4
-rw-r--r--src/tests/t_stringattr.py2
14 files changed, 24 insertions, 29 deletions
diff --git a/src/tests/gssapi/t_ccselect.py b/src/tests/gssapi/t_ccselect.py
index 0d36d7a350..a3a1330d6a 100644
--- a/src/tests/gssapi/t_ccselect.py
+++ b/src/tests/gssapi/t_ccselect.py
@@ -24,9 +24,9 @@
from k5test import *
# Create two independent realms (no cross-realm TGTs).
-r1 = K5Realm(start_kadmind=False, create_user=False)
-r2 = K5Realm(start_kadmind=False, create_user=False, realm='KRBTEST2.COM',
- testdir=os.path.join(r1.testdir, 'r2'), portbase=62000)
+r1 = K5Realm(create_user=False)
+r2 = K5Realm(create_user=False, realm='KRBTEST2.COM', portbase=62000,
+ testdir=os.path.join(r1.testdir, 'r2'))
# gsserver specifies the target as a GSS name. The resulting
# principal will have the host-based type, but the realm won't be
diff --git a/src/tests/gssapi/t_gssapi.py b/src/tests/gssapi/t_gssapi.py
index e640e0231d..3ace215db8 100644
--- a/src/tests/gssapi/t_gssapi.py
+++ b/src/tests/gssapi/t_gssapi.py
@@ -7,7 +7,7 @@ for realm in multipass_realms():
### Test acceptor name behavior.
-realm = K5Realm(start_kadmind=False)
+realm = K5Realm()
# Create some host-based principals and put most of them into the
# keytab. Rename one principal so that the keytab name matches the
@@ -84,7 +84,7 @@ realm.stop()
# and the principal for the mismatching hostname in the keytab.
ignore_conf = { 'all' : { 'libdefaults' : {
'ignore_acceptor_hostname' : 'true' } } }
-realm = K5Realm(krb5_conf=ignore_conf, start_kadmind=False)
+realm = K5Realm(krb5_conf=ignore_conf)
realm.run_kadminl('addprinc -randkey host/-nomatch-')
realm.run_kadminl('xst host/-nomatch-')
output = realm.run_as_client(['./t_accname', 'host/-nomatch-',
diff --git a/src/tests/gssapi/t_s4u.py b/src/tests/gssapi/t_s4u.py
index bd958f9f40..4c68c961a4 100644
--- a/src/tests/gssapi/t_s4u.py
+++ b/src/tests/gssapi/t_s4u.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
from k5test import *
-realm = K5Realm(start_kadmind=False, create_host=False, get_creds=False)
+realm = K5Realm(create_host=False, get_creds=False)
usercache = 'FILE:' + os.path.join(realm.testdir, 'usercache')
storagecache = 'FILE:' + os.path.join(realm.testdir, 'save')
diff --git a/src/tests/t_cccol.py b/src/tests/t_cccol.py
index b30cbcf9bd..06e1902932 100644
--- a/src/tests/t_cccol.py
+++ b/src/tests/t_cccol.py
@@ -23,7 +23,7 @@
#!/usr/bin/python
from k5test import *
-realm = K5Realm(start_kadmind=False, create_user=False, create_host=False)
+realm = K5Realm(create_user=False, create_host=False)
# Make a directory collection and use it for client commands in both realms.
ccdir = os.path.join(realm.testdir, 'cc')
diff --git a/src/tests/t_crossrealm.py b/src/tests/t_crossrealm.py
index afefb8592c..c0c3ccb158 100644
--- a/src/tests/t_crossrealm.py
+++ b/src/tests/t_crossrealm.py
@@ -36,7 +36,7 @@ def stop(*realms):
# Basic two-realm test with cross TGTs in both directions.
-r1, r2 = cross_realms(2, start_kadmind=False)
+r1, r2 = cross_realms(2)
test_kvno(r1, r2.host_princ, 'basic r1->r2')
test_kvno(r2, r1.host_princ, 'basic r2->r1')
stop(r1, r2)
@@ -47,8 +47,7 @@ stop(r1, r2)
# instead. The client will use that to get a TGT for B.X.
r1, r2, r3 = cross_realms(3, xtgts=((0,1), (1,2)),
args=({'realm': 'A.X'}, {'realm': 'X'},
- {'realm': 'B.X'}),
- start_kadmind=False)
+ {'realm': 'B.X'}))
test_kvno(r1, r3.host_princ, 'KDC domain walk')
stop(r1, r2, r3)
@@ -65,8 +64,7 @@ r1, r2, r3, r4 = cross_realms(4, xtgts=((0,1), (1,2), (2,3)),
{'realm': 'C',
'krb5_conf': {'master': capaths}},
{'realm': 'D',
- 'krb5_conf': {'master': capaths}}),
- start_kadmind=False)
+ 'krb5_conf': {'master': capaths}}))
test_kvno(r1, r4.host_princ, 'client capaths')
stop(r1, r2, r3, r4)
@@ -79,8 +77,7 @@ r1, r2, r3, r4 = cross_realms(4, xtgts=((0,1), (1,2), (2,3)),
args=({'realm': 'A', 'krb5_conf': conf},
{'realm': 'B', 'krb5_conf': conf},
{'realm': 'C', 'krb5_conf': conf},
- {'realm': 'D', 'krb5_conf': conf}),
- start_kadmind=False)
+ {'realm': 'D', 'krb5_conf': conf}))
test_kvno(r1, r4.host_princ, 'KDC capaths')
stop(r1, r2, r3, r4)
@@ -91,8 +88,7 @@ capaths = {'capaths': {'A': {'C': 'B'}}}
r1, r2, r3 = cross_realms(3, xtgts=((0,1), (1,2)),
args=({'realm': 'A',
'krb5_conf': {'client': capaths}},
- {'realm': 'B'}, {'realm': 'C'}),
- start_kadmind=False)
+ {'realm': 'B'}, {'realm': 'C'}))
output = r1.run_as_client([kvno, r3.host_princ], expected_code=1)
if 'KDC policy rejects request' not in output:
fail('transited 1: Expected error message not in output')
@@ -107,8 +103,7 @@ r1, r2, r3, r4 = cross_realms(4, xtgts=((0,1), (1,2), (2,3)),
args=({'realm': 'A', 'krb5_conf': conf},
{'realm': 'B', 'krb5_conf': conf},
{'realm': 'C', 'krb5_conf': conf},
- {'realm': 'D'}),
- start_kadmind=False)
+ {'realm': 'D'}))
output = r1.run_as_client([kvno, r4.host_princ], expected_code=1)
if 'Illegal cross-realm ticket' not in output:
fail('transited 2: Expected error message not in output')
diff --git a/src/tests/t_general.py b/src/tests/t_general.py
index 046f957f43..cbad32d4ca 100755
--- a/src/tests/t_general.py
+++ b/src/tests/t_general.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
from k5test import *
-for realm in multipass_realms(create_host=False, start_kadmind=False):
+for realm in multipass_realms(create_host=False):
# Check that kinit fails appropriately with the wrong password.
output = realm.run_as_client([kinit, realm.user_princ], input='wrong\n',
expected_code=1)
@@ -22,7 +22,7 @@ for realm in multipass_realms(create_host=False, start_kadmind=False):
# Test kinit against kdb keytab
realm.run_as_master([kinit, "-k", "-t", "KDB:", realm.user_princ])
-realm = K5Realm(create_host=False, start_kadmind=False)
+realm = K5Realm(create_host=False)
# Create a policy and see if it survives a dump/load.
realm.run_kadminl('addpol fred')
diff --git a/src/tests/t_keyrollover.py b/src/tests/t_keyrollover.py
index af38b8e188..9f9346aca6 100644
--- a/src/tests/t_keyrollover.py
+++ b/src/tests/t_keyrollover.py
@@ -70,7 +70,7 @@ realm.stop()
# TGT with the old key, and the second kvno invocation sends it to
# r2's KDC with no kvno to identify it, forcing the KDC to try
# multiple keys.
-r1, r2 = cross_realms(2, start_kadmind=False)
+r1, r2 = cross_realms(2)
r1.run_kadminl('modprinc -kvno 0 krbtgt/%s' % r2.realm)
r1.run_as_client([kvno, r2.host_princ])
r2.run_kadminl('cpw -pw newcross -keepold krbtgt/%s@%s' % (r2.realm, r1.realm))
diff --git a/src/tests/t_keytab.py b/src/tests/t_keytab.py
index 7faf23cbf1..f56c7bba35 100644
--- a/src/tests/t_keytab.py
+++ b/src/tests/t_keytab.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
from k5test import *
-realm = K5Realm(start_kadmind=False)
+realm = K5Realm()
# Test kinit with a keytab.
realm.kinit(realm.host_princ, flags=['-k'])
diff --git a/src/tests/t_lockout.py b/src/tests/t_lockout.py
index 377e9ba5e7..e3d1dd4154 100644
--- a/src/tests/t_lockout.py
+++ b/src/tests/t_lockout.py
@@ -23,7 +23,7 @@
#!/usr/bin/python
from k5test import *
-realm = K5Realm(create_host=False, start_kadmind=False)
+realm = K5Realm(create_host=False)
realm.run_kadminl('addpol -maxfailure 2 -failurecountinterval 5m lockout')
realm.run_kadminl('modprinc +requires_preauth -policy lockout user')
diff --git a/src/tests/t_pwhist.py b/src/tests/t_pwhist.py
index 4ae546668d..bfb9f0045b 100644
--- a/src/tests/t_pwhist.py
+++ b/src/tests/t_pwhist.py
@@ -4,7 +4,7 @@ from k5test import *
# Regression test for issue #7099: databases created prior to krb5 1.3 have
# multiple history keys, and kadmin prior to 1.7 didn't necessarily use the
# first one to create history entries.
-realm = K5Realm(start_kadmind=False, start_kdc=False)
+realm = K5Realm(start_kdc=False)
# Create a history principal with two keys.
realm.run_as_master(['./hist', 'make'])
realm.run_kadminl('addpol -history 2 pol')
diff --git a/src/tests/t_renew.py b/src/tests/t_renew.py
index af83007a87..ce36a5b205 100644
--- a/src/tests/t_renew.py
+++ b/src/tests/t_renew.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
from k5test import *
-realm = K5Realm(create_host=False, start_kadmind=False, get_creds=False)
+realm = K5Realm(create_host=False, get_creds=False)
# Configure the realm to allow renewable tickets and acquire some.
realm.run_kadminl('modprinc -maxrenewlife "2 days" user')
diff --git a/src/tests/t_renprinc.py b/src/tests/t_renprinc.py
index e29eb194cb..64c9be78f5 100644
--- a/src/tests/t_renprinc.py
+++ b/src/tests/t_renprinc.py
@@ -25,7 +25,7 @@ from k5test import *
enctype = "aes128-cts"
-realm = K5Realm(create_host=False, create_user=False, start_kadmind=False)
+realm = K5Realm(create_host=False, create_user=False)
salttypes = ('normal', 'v4', 'norealm', 'onlyrealm')
# For a variety of salt types, test that we can rename a principal and
diff --git a/src/tests/t_skew.py b/src/tests/t_skew.py
index f831035ac7..668e553a15 100644
--- a/src/tests/t_skew.py
+++ b/src/tests/t_skew.py
@@ -2,7 +2,7 @@
from k5test import *
# Create a realm with the KDC one hour in the past.
-realm = K5Realm(start_kadmind=False, start_kdc=False)
+realm = K5Realm(start_kdc=False)
realm.start_kdc(['-T', '-3600'])
# kinit (no preauth) should work, and should set a clock skew allowing
@@ -25,7 +25,7 @@ realm.stop()
# Repeat the above tests with kdc_timesync disabled.
conf = {'all': {'libdefaults': {'kdc_timesync': '0'}}}
-realm = K5Realm(start_kadmind=False, start_kdc=False, krb5_conf=conf)
+realm = K5Realm(start_kdc=False, krb5_conf=conf)
realm.start_kdc(['-T', '-3600'])
# kinit (no preauth) should work, but kvno should not. kinit with
diff --git a/src/tests/t_stringattr.py b/src/tests/t_stringattr.py
index 9d6fbe0a23..3f5c506df8 100644
--- a/src/tests/t_stringattr.py
+++ b/src/tests/t_stringattr.py
@@ -27,7 +27,7 @@ def run_kadmin(query):
global realm
return realm.run_as_master([kadmin, '-c', realm.ccache, '-q', query])
-realm = K5Realm(create_host=False, get_creds=False)
+realm = K5Realm(start_kadmind=True, create_host=False, get_creds=False)
realm.kinit(realm.admin_princ, password('admin'), flags=['-S', 'kadmin/admin'])