From 2d07f9a4886c981ff2a83d3c892d604b4f280a84 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 10 Jun 1995 03:46:49 +0000 Subject: [PATCH] Use the principal "krbtest/admin@KRBTEST.COM" for kadmin git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6027 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/dejagnu/config/ChangeLog | 4 ++ src/tests/dejagnu/config/default.exp | 16 ++--- src/tests/dejagnu/krb-standalone/ChangeLog | 4 ++ src/tests/dejagnu/krb-standalone/kadmin.exp | 72 ++++++++++----------- 4 files changed, 49 insertions(+), 47 deletions(-) diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index b7ceeaa52..f64da997b 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,3 +1,7 @@ +Fri Jun 9 23:45:08 1995 Theodore Y. Ts'o + + * default.exp: Use the principal "krbtest/admin@KRBTEST.COM" for + kadmin Thu Jun 8 14:58:15 EDT 1995 Paul Park (pjpark@mit.edu) * default.exp - Add logging section to the profile. Also, export diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index 240cb5761..be2b782a9 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -236,7 +236,7 @@ proc setup_kerberos_files { } { # Create ACL file. if ![file exists tmpdir/acl] { set aclfile [open tmpdir/acl w] - puts $aclfile "krbtest/kadmin@KRBTEST.COM *" + puts $aclfile "krbtest/admin@KRBTEST.COM *" close $aclfile } @@ -529,12 +529,6 @@ proc setup_kerberos_db { standalone } { } send "masterkey$KEY\r" expect "kdb5_edit:" - send "ank krbtest/kadmin@KRBTEST.COM\r" - expect "Enter password:" - send "adminpass$KEY\r" - expect "Re-enter password for verification:" - send "adminpass$KEY\r" - expect "kdb5_edit:" send "ank krbtest/admin@KRBTEST.COM\r" expect "Enter password:" send "adminpass$KEY\r" @@ -721,7 +715,7 @@ proc add_kerberos_key { kkey standalone } { global spawn_id # Use kadmin to add an key. - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM expect_after { timeout { fail "kadmin $kkey" @@ -736,7 +730,7 @@ proc add_kerberos_key { kkey standalone } { } expect "kadmin5:" send "ank $kkey@KRBTEST.COM\r" - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" + expect "Enter password for krbtest/admin@KRBTEST.COM:" send "adminpass$KEY\r" expect "Enter new password for $kkey@KRBTEST.COM :" send "$kkey" @@ -775,7 +769,7 @@ proc add_random_key { kkey standalone } { global spawn_id # Use kadmin to add an key. - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM expect_after { timeout { fail "kadmin $kkey" @@ -790,7 +784,7 @@ proc add_random_key { kkey standalone } { } expect "kadmin5:" send "ark $kkey@KRBTEST.COM\r" - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" + expect "Enter password for krbtest/admin@KRBTEST.COM:" send "adminpass$KEY\r" expect { "principal $kkey@KRBTEST.COM added" { } diff --git a/src/tests/dejagnu/krb-standalone/ChangeLog b/src/tests/dejagnu/krb-standalone/ChangeLog index 84f3fa8aa..97f2b5092 100644 --- a/src/tests/dejagnu/krb-standalone/ChangeLog +++ b/src/tests/dejagnu/krb-standalone/ChangeLog @@ -1,3 +1,7 @@ +Fri Jun 9 23:45:57 1995 Theodore Y. Ts'o + + * kadmin.exp: Use the principal "krbtest/admin@KRBTEST.COM" for + kadmin. Mon Jun 5 16:10:15 EDT 1995 Paul Park (pjpark@mit.edu) * kadmin.exp - Change prompting order for kadmin ank and kadmin cpw. diff --git a/src/tests/dejagnu/krb-standalone/kadmin.exp b/src/tests/dejagnu/krb-standalone/kadmin.exp index 8e91bcf00..b9496a6b7 100644 --- a/src/tests/dejagnu/krb-standalone/kadmin.exp +++ b/src/tests/dejagnu/krb-standalone/kadmin.exp @@ -34,7 +34,7 @@ proc kadmin_add { pname password } { global kadmind_spawn_id set good 0 - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM ank $pname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM ank $pname expect_after { timeout { fail "kadmin add $pname" @@ -47,7 +47,7 @@ proc kadmin_add { pname password } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "Enter new password for $pname :" { send "$password\r" } @@ -63,7 +63,7 @@ proc kadmin_add { pname password } { # and also, on some systems the write to standard error will block if # too many messages back up. # - expect -i $kadmind_spawn_id "Add Principal operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Add Principal operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" if { $good == 1 } { # # use kdb5_edit to verify that a principal was created and that its @@ -88,7 +88,7 @@ proc kadmin_add { pname password } { } expect "kdb5_edit:" { send "show $pname\r" } expect { - -re "Name: $pname@KRBTEST.COM\r\nKey version: 1\r\n.*Last modified by krbtest/kadmin@KRBTEST.COM.*Salt: 0.*Alt salt: 0" { + -re "Name: $pname@KRBTEST.COM\r\nKey version: 1\r\n.*Last modified by krbtest/admin@KRBTEST.COM.*Salt: 0.*Alt salt: 0" { set good 1 } } @@ -127,7 +127,7 @@ proc kadmin_addv4 { pname password } { global kadmind_spawn_id set good 0 - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM ank $pname salttype=v4 + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM ank $pname salttype=v4 expect_after { timeout { fail "kadmin addv4 $pname" @@ -140,7 +140,7 @@ proc kadmin_addv4 { pname password } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "Enter new password for $pname :" { send "$password\r" } @@ -151,7 +151,7 @@ proc kadmin_addv4 { pname password } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin addv4)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Add Principal operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Add Principal operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" if { $good == 1 } { # # use kdb5_edit to verify that a principal was created and that its @@ -176,7 +176,7 @@ proc kadmin_addv4 { pname password } { } expect "kdb5_edit:" { send "show $pname\r" } expect { - -re "Name: $pname@KRBTEST.COM\r\nKey version: 1\r\n.*Last modified by krbtest/kadmin@KRBTEST.COM.*Salt: 1.*Alt salt: 1" { + -re "Name: $pname@KRBTEST.COM\r\nKey version: 1\r\n.*Last modified by krbtest/admin@KRBTEST.COM.*Salt: 1.*Alt salt: 1" { set good 1 } } @@ -215,7 +215,7 @@ proc kadmin_add_rnd { pname } { global kadmind_spawn_id set good 0 - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM ark $pname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM ark $pname expect_after { timeout { fail "kadmin add_rnd $pname" @@ -228,7 +228,7 @@ proc kadmin_add_rnd { pname } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "principal $pname added" { set good 1 } @@ -237,7 +237,7 @@ proc kadmin_add_rnd { pname } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin add_rnt)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Add Principal operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Add Principal operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" if { $good == 1 } { # # use kdb5_edit to verify that a principal was created and that its @@ -262,7 +262,7 @@ proc kadmin_add_rnd { pname } { } expect "kdb5_edit:" { send "show $pname\r" } expect { - -re "Name: $pname@KRBTEST.COM\r\nKey version: 1\r\n.*Last modified by krbtest/kadmin@KRBTEST.COM.*Salt: 0.*Alt salt: 0" { + -re "Name: $pname@KRBTEST.COM\r\nKey version: 1\r\n.*Last modified by krbtest/admin@KRBTEST.COM.*Salt: 0.*Alt salt: 0" { set good 1 } } @@ -297,7 +297,7 @@ proc kadmin_show { pname } { global KEY global spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM show $pname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM show $pname expect_after { timeout { fail "kadmin show $pname" @@ -310,7 +310,7 @@ proc kadmin_show { pname } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" + expect "Enter password for krbtest/admin@KRBTEST.COM:" send "adminpass$KEY\r" expect -re "\r.*-*Principal: $pname.*Last modified by: .*Flags:.*-*" expect_after @@ -333,7 +333,7 @@ proc kadmin_cpw { pname password } { global spawn_id global kadmind_spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM cpw $pname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM cpw $pname expect_after { timeout { fail "kadmin cpw $pname" @@ -346,7 +346,7 @@ proc kadmin_cpw { pname password } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "Enter new password for $pname:" { send "$password\r" } @@ -359,7 +359,7 @@ proc kadmin_cpw { pname password } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin cpw)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Change Password operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Change Password operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" pass "kadmin cpw $pname" return 1 } @@ -375,7 +375,7 @@ proc kadmin_cpw_rnd { pname } { global spawn_id global kadmind_spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM crk $pname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM crk $pname expect_after { timeout { fail "kadmin cpw_rnd $pname" @@ -388,7 +388,7 @@ proc kadmin_cpw_rnd { pname } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } # When in doubt, jam one of these in there. @@ -399,7 +399,7 @@ proc kadmin_cpw_rnd { pname } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin cpw_rnd)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Change Random Password operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Change Random Password operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" pass "kadmin cpw_rnd $pname" return 1 } @@ -415,7 +415,7 @@ proc kadmin_modify { pname flags } { global spawn_id global kadmind_spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM modent $pname $flags + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM modent $pname $flags expect_after { timeout { fail "kadmin modify $pname" @@ -428,7 +428,7 @@ proc kadmin_modify { pname flags } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" + expect "Enter password for krbtest/admin@KRBTEST.COM:" send "adminpass$KEY\r" expect "principal $pname modified" expect_after @@ -436,7 +436,7 @@ proc kadmin_modify { pname flags } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin modify)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Modify Principal operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Modify Principal operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" pass "kadmin modify $pname" return 1 } @@ -455,7 +455,7 @@ proc kadmin_rename { pname npname } { global kadmind_spawn_id set good 0 - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM renent -force $pname $npname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM renent -force $pname $npname expect_after { timeout { fail "kadmin renent $pname $npname" @@ -468,7 +468,7 @@ proc kadmin_rename { pname npname } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "principal $pname renamed to $npname" { set good 1 } @@ -477,7 +477,7 @@ proc kadmin_rename { pname npname } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin rename)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Rename Principal operation from $pname to $npname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Rename Principal operation from $pname to $npname successfully issued by krbtest/admin@KRBTEST.COM" if { $good == 1 } { # # use kdb5_edit to verify that the new principal was created and that its @@ -502,7 +502,7 @@ proc kadmin_rename { pname npname } { } expect "kdb5_edit:" { send "show $npname\r" } expect { - -re "Name: $npname@KRBTEST.COM\r\n.*Last modified by krbtest/kadmin@KRBTEST.COM.*Salt: 0.*Alt salt: 0" { + -re "Name: $npname@KRBTEST.COM\r\n.*Last modified by krbtest/admin@KRBTEST.COM.*Salt: 0.*Alt salt: 0" { set good 1 } } @@ -571,7 +571,7 @@ proc kadmin_list { } { global KEY global spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM ldb + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM ldb expect_after { timeout { fail "kadmin ldb" @@ -584,7 +584,7 @@ proc kadmin_list { } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect -re "\(.*@KRBTEST.COM\r\n\)*" @@ -608,7 +608,7 @@ proc kadmin_extract { instance name } { global KEY global spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM xst $instance $name + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM xst $instance $name expect_after { timeout { fail "kadmin xst $instance $name" @@ -621,7 +621,7 @@ proc kadmin_extract { instance name } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "extracted entry $name to key table $instance-new-srvtab" @@ -647,7 +647,7 @@ proc kadmin_extractv4 { instance name } { global KEY global spawn_id - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM xst4 $instance $name + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM xst4 $instance $name expect_after { timeout { fail "kadmin xst4 $instance $name" @@ -660,7 +660,7 @@ proc kadmin_extractv4 { instance name } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "extracted entry $name to key table $instance-new-v4-srvtab" @@ -688,7 +688,7 @@ proc kadmin_delete { pname } { global kadmind_spawn_id set good 0 - spawn $KADMIN -m -p krbtest/kadmin@KRBTEST.COM delent -force $pname + spawn $KADMIN -m -p krbtest/admin@KRBTEST.COM delent -force $pname expect_after { timeout { fail "kadmin delent $pname" @@ -701,7 +701,7 @@ proc kadmin_delete { pname } { return 0 } } - expect "Enter password for krbtest/kadmin@KRBTEST.COM:" { + expect "Enter password for krbtest/admin@KRBTEST.COM:" { send "adminpass$KEY\r" } expect "principal $pname deleted" { set good 1 } @@ -710,7 +710,7 @@ proc kadmin_delete { pname } { set k_stat [wait -i $spawn_id] verbose "wait -i $spawn_id returned $k_stat (kadmin delent)" catch "close -i $spawn_id" - expect -i $kadmind_spawn_id "Delete Principal operation for $pname successfully issued by krbtest/kadmin@KRBTEST.COM" + expect -i $kadmind_spawn_id "Delete Principal operation for $pname successfully issued by krbtest/admin@KRBTEST.COM" if { $good == 1 } { # # use kdb5_edit to verify that the old principal is not present. -- 2.26.2