summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>1996-07-27 06:24:54 +0000
committerEzra Peisach <epeisach@mit.edu>1996-07-27 06:24:54 +0000
commit32a52290e7b1dfd487ff1dc4a7f2a6241af04b46 (patch)
treee84a5ab3bf79e7f9235d1c891f4c59665e4d2909 /src/tests
parent7990cecd1716547e70d67f18481dd633d98de01c (diff)
downloadkrb5-32a52290e7b1dfd487ff1dc4a7f2a6241af04b46.tar.gz
krb5-32a52290e7b1dfd487ff1dc4a7f2a6241af04b46.tar.xz
krb5-32a52290e7b1dfd487ff1dc4a7f2a6241af04b46.zip
* default.exp: Rewrite to use kdb5_util instead of kdb5_create and
kdb5_stash. No longer add the kadmin/admin and changepw keys to the database as this is handled automatically. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8852 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/dejagnu/config/ChangeLog6
-rw-r--r--src/tests/dejagnu/config/default.exp70
2 files changed, 40 insertions, 36 deletions
diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog
index 6f4019bea..1b68de5c6 100644
--- a/src/tests/dejagnu/config/ChangeLog
+++ b/src/tests/dejagnu/config/ChangeLog
@@ -1,3 +1,9 @@
+Sat Jul 27 02:20:54 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * default.exp: Rewrite to use kdb5_util instead of kdb5_create and
+ kdb5_stash. No longer add the kadmin/admin and changepw
+ keys to the database as this is handled automatically.
+
Fri Jul 19 19:50:23 1996 Marc Horowitz <marc@mit.edu>
* default.exp: changes to work with the new admin system. This is
diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp
index 23c26361b..4dd6b8015 100644
--- a/src/tests/dejagnu/config/default.exp
+++ b/src/tests/dejagnu/config/default.exp
@@ -76,12 +76,8 @@ verbose "Test realm is $REALMNAME"
# if they exist. If they do not, then they must be in PATH. We
# expect $objdir to be ...tests/dejagnu.
-if ![info exists KDB5_CREATE] {
- set KDB5_CREATE [findfile $objdir/../../admin/create/kdb5_create]
-}
-
-if ![info exists KDB5_STASH] {
- set KDB5_STASH [findfile $objdir/../../admin/stash/kdb5_stash]
+if ![info exists KDB5_UTIL] {
+ set KDB5_UTIL [findfile $objdir/../../kadmin/dbutil/kdb5_util]
}
if ![info exists KDB5_EDIT] {
@@ -568,8 +564,7 @@ proc setup_kadmind_srvtab { } {
proc setup_kerberos_db { standalone } {
global REALMNAME
- global KDB5_CREATE
- global KDB5_STASH
+ global KDB5_UTIL
global KDB5_EDIT
global KEY
global tmppwd
@@ -579,7 +574,7 @@ proc setup_kerberos_db { standalone } {
return 1
}
- catch "exec rm -f [glob -nocomplain tmpdir/db*]"
+ catch "exec rm -f [glob -nocomplain tmpdir/db* tmpdir/adb*]"
# Creating a new database means we need a new srvtab.
catch "exec rm -f tmpdir/srvtab"
@@ -588,17 +583,18 @@ proc setup_kerberos_db { standalone } {
return 0
}
- spawn $KDB5_CREATE -r $REALMNAME
+ spawn $KDB5_UTIL -r $REALMNAME -R create
+
expect {
"Enter KDC database master key:" {
- verbose "kdb5_create started"
+ verbose "kdb5_util started"
}
timeout {
- fail "kdb5_create"
+ fail "kdb5_util - create"
return 0
}
eof {
- fail "kdb5_create"
+ fail "kdb5_util - create"
return 0
}
}
@@ -607,51 +603,57 @@ proc setup_kerberos_db { standalone } {
expect {
"Re-enter KDC database master key to verify:" { }
timeout {
- fail "kdb5_create"
+ fail "kdb5_util create - verify"
return 0
}
eof {
- fail "kdb5_create"
+ fail "kdb5_util create - verify"
return 0
}
}
send "masterkey$KEY\r"
expect {
-re "\[Cc\]ouldn't" {
- fail "kdb5_create"
+ fail "kdb5_util - create"
return 0
}
+ "Cannot find/read stored" {
+ exp_continue
+ }
+ "Warning: proceeding without master key" {
+ exp_continue
+ }
timeout {
- fail "kdb5_create"
+ fail "kdb5_util - create"
return 0
}
eof { }
}
- if ![check_exit_status kdb5_create] {
+ if ![check_exit_status kdb5_util] {
return 0
}
if {$standalone} {
- pass "kdb5_create"
+ pass "kdb5_util - create"
}
# Stash the master key in a file.
- spawn $KDB5_STASH -r $REALMNAME
+ spawn $KDB5_UTIL -r $REALMNAME -R stash
expect {
"Enter KDC database master key:" {
- verbose "kdb5_stash started"
+ verbose "kdb5_util stash started"
}
timeout {
- fail "kdb5_stash"
+ fail "kdb5_util stash"
if {!$standalone} {
- catch "exec rm -f tmpdir/db.ok"
+ catch "exec rm -f tmpdir/db.ok tmpdir/adb.db"
}
return 0
}
eof {
- fail "kdb5_stash"
+ fail "kdb5_util stash"
if {!$standalone} {
- catch "exec rm -f tmpdir/db.ok"
+ catch "exec rm -f tmpdir/db.ok tmpdir/adb.db"
}
return 0
}
@@ -660,19 +662,19 @@ proc setup_kerberos_db { standalone } {
expect {
eof { }
timeout {
- fail "kdb5_stash"
+ fail "kdb5_util stash"
if {!$standalone} {
- catch "exec rm -f tmpdir/db.ok"
+ catch "exec rm -f tmpdir/db.ok tmpdir/adb.db"
}
return 0
}
}
- if ![check_exit_status kdb5_stash] {
+ if ![check_exit_status kdb5_util] {
return 0
}
if {$standalone} {
- pass "kdb5_stash"
+ pass "kdb5_util stash"
}
# Add an admin user.
@@ -682,7 +684,7 @@ proc setup_kerberos_db { standalone } {
catch "expect_after"
fail "kdb5_edit (timeout)"
if {!$standalone} {
- catch "exec rm -f tmpdir/db.ok"
+ catch "exec rm -f tmpdir/db.ok tmpdir/adb.db"
}
return 0
}
@@ -690,7 +692,7 @@ proc setup_kerberos_db { standalone } {
catch "expect_after"
fail "kdb5_edit (eof)"
if {!$standalone} {
- catch "exec rm -f tmpdir/db.ok"
+ catch "exec rm -f tmpdir/db.ok tmpdir/adb.db"
}
return 0
}
@@ -702,16 +704,12 @@ proc setup_kerberos_db { standalone } {
expect "Re-enter password for verification:"
send "adminpass$KEY\r"
expect "kdb5_edit:"
- send "ark kadmin/admin@$REALMNAME\r"
- expect "kdb5_edit:"
- send "ark kadmin/changepw@$REALMNAME\r"
- expect "kdb5_edit:"
send "quit\r"
expect "\r"
expect_after
if ![check_exit_status kdb5_edit] {
if {!$standalone} {
- catch "exec rm -f tmpdir/db.ok"
+ catch "exec rm -f tmpdir/db.ok tmpdir/adb.db"
}
return 0
}