summaryrefslogtreecommitdiffstats
path: root/src/kadmin/testing/scripts
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-08-13 21:25:54 +0000
committerGreg Hudson <ghudson@mit.edu>2009-08-13 21:25:54 +0000
commit1ddf7efda0fa665d86431dfc2a57e90e892b81ab (patch)
tree141ed4abf608f1143e4344aaae0f244dc62d578b /src/kadmin/testing/scripts
parent45eefd6a6fa51ccf67aaf073c0237bbbd142ae81 (diff)
downloadkrb5-1ddf7efda0fa665d86431dfc2a57e90e892b81ab.tar.gz
krb5-1ddf7efda0fa665d86431dfc2a57e90e892b81ab.tar.xz
krb5-1ddf7efda0fa665d86431dfc2a57e90e892b81ab.zip
Remove kadmin v1 API support
The kadmin v1 API and the even older ovsec_kadm_* API were legacy when kadmin was first incorporated in 1996, and compatibility with them is no longer believed to be necessary. The uninstalled kadmin/passwd has been removed (since it used the ovsec API). The test suite has been updated to use the v2 API where appropriate, and the parts specifically designed to test the old API have been excised. ticket: 6544 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22521 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/testing/scripts')
-rwxr-xr-xsrc/kadmin/testing/scripts/env-setup.shin4
-rwxr-xr-xsrc/kadmin/testing/scripts/init_db137
-rwxr-xr-xsrc/kadmin/testing/scripts/make-host-keytab.plin2
-rwxr-xr-xsrc/kadmin/testing/scripts/start_servers_local13
4 files changed, 79 insertions, 77 deletions
diff --git a/src/kadmin/testing/scripts/env-setup.shin b/src/kadmin/testing/scripts/env-setup.shin
index 7750e5272..519b9864e 100755
--- a/src/kadmin/testing/scripts/env-setup.shin
+++ b/src/kadmin/testing/scripts/env-setup.shin
@@ -74,8 +74,8 @@ SIMPLE_DUMP=$TESTDIR/scripts/simple_dump.pl; export SIMPLE_DUMP
QUALNAME=$TESTDIR/scripts/qualname.pl; export QUALNAME
TCLUTIL=$STESTDIR/tcl/util.t; export TCLUTIL
BSDDB_DUMP=$TESTDIR/util/bsddb_dump; export BSDDB_DUMP
-CLNTTCL=$TESTDIR/util/ovsec_kadm_clnt_tcl; export CLNTTCL
-SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl; export SRVTCL
+CLNTTCL=$TESTDIR/util/kadm5_clnt_tcl; export CLNTTCL
+SRVTCL=$TESTDIR/util/kadm5_srv_tcl; export SRVTCL
KRB5_CONFIG=$K5ROOT/krb5.conf; export KRB5_CONFIG
KRB5_KDC_PROFILE=$K5ROOT/kdc.conf; export KRB5_KDC_PROFILE
diff --git a/src/kadmin/testing/scripts/init_db b/src/kadmin/testing/scripts/init_db
index 7296e1f9b..1cb96f843 100755
--- a/src/kadmin/testing/scripts/init_db
+++ b/src/kadmin/testing/scripts/init_db
@@ -42,7 +42,7 @@ fi
DUMMY=${TESTDIR=$TOP/testing}; export TESTDIR
DUMMY=${STESTDIR=$STOP/testing}
-DUMMY=${SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl}; export SRVTCL
+DUMMY=${SRVTCL=$TESTDIR/util/kadm5_srv_tcl}; export SRVTCL
DUMMY=${TCLUTIL=$STESTDIR/tcl/util.t}; export TCLUTIL
DUMMY=${LOCAL_MAKE_KEYTAB=$TESTDIR/scripts/make-host-keytab.pl}
@@ -101,81 +101,82 @@ if {[info exists env(USER)]} {
}
set cmds {
- {ovsec_kadm_init $env(SRVTCL) mrroot null $r $OVSEC_KADM_STRUCT_VERSION \
- $OVSEC_KADM_API_VERSION_1 server_handle}
-
- {ovsec_kadm_create_policy $server_handle "test-pol 0 10000 8 2 3 0" \
- {OVSEC_KADM_POLICY OVSEC_KADM_PW_MIN_LENGTH OVSEC_KADM_PW_MIN_CLASSES OVSEC_KADM_PW_MAX_LIFE OVSEC_KADM_PW_HISTORY_NUM}}
- {ovsec_kadm_create_policy $server_handle "once-a-min 10 0 0 0 0 0" \
- {OVSEC_KADM_POLICY OVSEC_KADM_PW_MIN_LIFE}}
- {ovsec_kadm_create_policy $server_handle "dict-only 0 0 0 0 0 0" \
- {OVSEC_KADM_POLICY}}
- {ovsec_kadm_create_policy $server_handle [simple_policy test-pol-nopw] \
- {OVSEC_KADM_POLICY}}
-
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal testuser@$r] {OVSEC_KADM_PRINCIPAL} notathena}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal test1@$r] {OVSEC_KADM_PRINCIPAL} test1}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal test2@$r] {OVSEC_KADM_PRINCIPAL} test2}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal test3@$r] {OVSEC_KADM_PRINCIPAL} test3}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/get@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/modify@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/delete@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/add@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/none@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/rename@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/mod-add@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/mod-delete@$r] {OVSEC_KADM_PRINCIPAL} \
+ {kadm5_init $env(SRVTCL) mrroot null \
+ [config_params {KADM5_CONFIG_REALM} $r] $KADM5_STRUCT_VERSION \
+ $KADM5_API_VERSION_2 server_handle}
+
+ {kadm5_create_policy $server_handle "test-pol 0 10000 8 2 3 0" \
+ {KADM5_POLICY KADM5_PW_MIN_LENGTH KADM5_PW_MIN_CLASSES KADM5_PW_MAX_LIFE KADM5_PW_HISTORY_NUM}}
+ {kadm5_create_policy $server_handle "once-a-min 10 0 0 0 0 0" \
+ {KADM5_POLICY KADM5_PW_MIN_LIFE}}
+ {kadm5_create_policy $server_handle "dict-only 0 0 0 0 0 0" \
+ {KADM5_POLICY}}
+ {kadm5_create_policy $server_handle [simple_policy test-pol-nopw] \
+ {KADM5_POLICY}}
+
+ {kadm5_create_principal $server_handle \
+ [simple_principal testuser@$r] {KADM5_PRINCIPAL} notathena}
+ {kadm5_create_principal $server_handle \
+ [simple_principal test1@$r] {KADM5_PRINCIPAL} test1}
+ {kadm5_create_principal $server_handle \
+ [simple_principal test2@$r] {KADM5_PRINCIPAL} test2}
+ {kadm5_create_principal $server_handle \
+ [simple_principal test3@$r] {KADM5_PRINCIPAL} test3}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/get@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/modify@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/delete@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/add@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/none@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/rename@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/mod-add@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/mod-delete@$r] {KADM5_PRINCIPAL} \
admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/get-add@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/get-delete@$r] {OVSEC_KADM_PRINCIPAL} \
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/get-add@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/get-delete@$r] {KADM5_PRINCIPAL} \
admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/get-mod@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/no-add@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [simple_principal admin/no-delete@$r] {OVSEC_KADM_PRINCIPAL} admin}
- {ovsec_kadm_create_principal $server_handle \
- [princ_w_pol pol1@$r test-pol] {OVSEC_KADM_PRINCIPAL \
- OVSEC_KADM_POLICY} pol111111}
- {ovsec_kadm_create_principal $server_handle \
- [princ_w_pol pol2@$r once-a-min] {OVSEC_KADM_PRINCIPAL \
- OVSEC_KADM_POLICY} pol222222}
- {ovsec_kadm_create_principal $server_handle \
- [princ_w_pol pol3@$r dict-only] {OVSEC_KADM_PRINCIPAL \
- OVSEC_KADM_POLICY} pol333333}
- {ovsec_kadm_create_principal $server_handle \
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/get-mod@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/no-add@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [simple_principal admin/no-delete@$r] {KADM5_PRINCIPAL} admin}
+ {kadm5_create_principal $server_handle \
+ [princ_w_pol pol1@$r test-pol] {KADM5_PRINCIPAL \
+ KADM5_POLICY} pol111111}
+ {kadm5_create_principal $server_handle \
+ [princ_w_pol pol2@$r once-a-min] {KADM5_PRINCIPAL \
+ KADM5_POLICY} pol222222}
+ {kadm5_create_principal $server_handle \
+ [princ_w_pol pol3@$r dict-only] {KADM5_PRINCIPAL \
+ KADM5_POLICY} pol333333}
+ {kadm5_create_principal $server_handle \
[princ_w_pol admin/get-pol@$r test-pol-nopw] \
- {OVSEC_KADM_PRINCIPAL OVSEC_KADM_POLICY} StupidAdmin}
- {ovsec_kadm_create_principal $server_handle \
- [princ_w_pol admin/pol@$r test-pol-nopw] {OVSEC_KADM_PRINCIPAL \
- OVSEC_KADM_POLICY} StupidAdmin}
+ {KADM5_PRINCIPAL KADM5_POLICY} StupidAdmin}
+ {kadm5_create_principal $server_handle \
+ [princ_w_pol admin/pol@$r test-pol-nopw] {KADM5_PRINCIPAL \
+ KADM5_POLICY} StupidAdmin}
- {ovsec_kadm_create_principal $server_handle \
+ {kadm5_create_principal $server_handle \
[simple_principal changepw/kerberos] \
- {OVSEC_KADM_PRINCIPAL} {XXX THIS IS WRONG}}
+ {KADM5_PRINCIPAL} {XXX THIS IS WRONG}}
- {ovsec_kadm_create_principal $server_handle \
+ {kadm5_create_principal $server_handle \
[simple_principal $whoami] \
- {OVSEC_KADM_PRINCIPAL} $whoami}
+ {KADM5_PRINCIPAL} $whoami}
- {ovsec_kadm_destroy $server_handle}
+ {kadm5_destroy $server_handle}
}
foreach cmd $cmds {
diff --git a/src/kadmin/testing/scripts/make-host-keytab.plin b/src/kadmin/testing/scripts/make-host-keytab.plin
index ad509c35c..cf62ae797 100755
--- a/src/kadmin/testing/scripts/make-host-keytab.plin
+++ b/src/kadmin/testing/scripts/make-host-keytab.plin
@@ -67,7 +67,7 @@ die "Neither \$TOP nor \$TESTDIR is set, and -top not specified.\n"
$top = $ENV{'TOP'} if (! $top);
$TESTDIR = ($ENV{'TESTDIR'} || "$top/testing");
$MAKE_KEYTAB = ($ENV{'MAKE_KEYTAB'} || "$TESTDIR/scripts/$whoami");
-$SRVTCL = ($ENV{'SRVTCL'} || "$TESTDIR/util/ovsec_kadm_srv_tcl");
+$SRVTCL = ($ENV{'SRVTCL'} || "$TESTDIR/util/kadm5_srv_tcl");
$TCLUTIL = ($ENV{'TCLUTIL'} || "$TESTDIR/tcl/util.t");
# This'll be wrong sometimes
$RSH_CMD = ($ENV{'RSH_CMD'} || '/usr/ucb/rsh');
diff --git a/src/kadmin/testing/scripts/start_servers_local b/src/kadmin/testing/scripts/start_servers_local
index ec4dab6d9..8cd0f3a61 100755
--- a/src/kadmin/testing/scripts/start_servers_local
+++ b/src/kadmin/testing/scripts/start_servers_local
@@ -3,7 +3,7 @@
DUMMY=${TESTDIR=$TOP/testing}
DUMMY=${STESTDIR=$STOP/testing}
DUMMY=${INITDB=$STESTDIR/scripts/init_db}
-DUMMY=${SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl}; export SRVTCL
+DUMMY=${SRVTCL=$TESTDIR/util/kadm5_srv_tcl}; export SRVTCL
DUMMY=${LOCAL_MAKE_KEYTAB=$TESTDIR/scripts/make-host-keytab.pl}
DUMMY=${STOP_SERVERS_LOCAL=$STESTDIR/scripts/stop_servers_local}
DUMMY=${KRB5RCACHEDIR=$TESTDIR} ; export KRB5RCACHEDIR
@@ -81,11 +81,12 @@ if { [catch {
source $env(STOP)/testing/tcl/util.t
set r $env(REALM)
set q $env(QUALNAME)
- puts stdout [ovsec_kadm_init $env(SRVTCL) mrroot null $r \
- $OVSEC_KADM_STRUCT_VERSION $OVSEC_KADM_API_VERSION_1 server_handle]
- puts stdout [ovsec_kadm_create_principal $server_handle \
- [simple_principal host/$q@$r] {OVSEC_KADM_PRINCIPAL} notathena]
- puts stdout [ovsec_kadm_destroy $server_handle]
+ puts stdout [kadm5_init $env(SRVTCL) mrroot null \
+ [config_params {KADM5_CONFIG_REALM} $r] \
+ $KADM5_STRUCT_VERSION $KADM5_API_VERSION_2 server_handle]
+ puts stdout [kadm5_create_principal $server_handle \
+ [simple_principal host/$q@$r] {KADM5_PRINCIPAL} notathena]
+ puts stdout [kadm5_destroy $server_handle]
} err]} {
puts stderr "initialization error: $err"
exit 1