summaryrefslogtreecommitdiffstats
path: root/src/kadmin/testing/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/kadmin/testing/scripts')
-rw-r--r--src/kadmin/testing/scripts/ChangeLog4
-rw-r--r--src/kadmin/testing/scripts/make-host-keytab.pl.in22
-rw-r--r--src/kadmin/testing/scripts/make-host-keytab.plin22
3 files changed, 32 insertions, 16 deletions
diff --git a/src/kadmin/testing/scripts/ChangeLog b/src/kadmin/testing/scripts/ChangeLog
index 0a3dd55125..6ccb212a72 100644
--- a/src/kadmin/testing/scripts/ChangeLog
+++ b/src/kadmin/testing/scripts/ChangeLog
@@ -1,3 +1,7 @@
+Wed Sep 11 17:01:06 1996 Barry Jaspan <bjaspan@mit.edu>
+
+ * make-host-keytab.pl.in: use kadmin instead of kadm5_keytab
+
Mon Aug 12 11:36:57 1996 Barry Jaspan <bjaspan@mit.edu>
* init_db: use kdb5_util instead of kdb5_create
diff --git a/src/kadmin/testing/scripts/make-host-keytab.pl.in b/src/kadmin/testing/scripts/make-host-keytab.pl.in
index 14d7b10b54..ad509c35c9 100644
--- a/src/kadmin/testing/scripts/make-host-keytab.pl.in
+++ b/src/kadmin/testing/scripts/make-host-keytab.pl.in
@@ -71,7 +71,7 @@ $SRVTCL = ($ENV{'SRVTCL'} || "$TESTDIR/util/ovsec_kadm_srv_tcl");
$TCLUTIL = ($ENV{'TCLUTIL'} || "$TESTDIR/tcl/util.t");
# This'll be wrong sometimes
$RSH_CMD = ($ENV{'RSH_CMD'} || '/usr/ucb/rsh');
-$EDIT_KEYTAB = ($ENV{'EDIT_KEYTAB'} || "$top/keytab/kadm5_keytab.local");
+$KADMIN = ($ENV{'KADMIN'} || "$top/cli/kadmin.local");
if ($server) {
# XXX Using /usr/ucb/rsh for now.
@@ -122,14 +122,20 @@ if ($server) {
else {
$redirect = "> /dev/null" if (! $verbose);
- $cmd = "$EDIT_KEYTAB -k $ktfile";
- $cmd .= " -q" if (! $verbose);
- $cmd .= " -a -c";
+ # We can ignore errors here, because the ktadd below will fail if
+ # this fails for any reason other than "principal exists"
for (@princs) {
- if (system "$cmd $_") {
- sleep(1);
- die "Error in system($cmd $_)\n";
- }
+ next if (/^kadmin/);
+ $cmd = "$KADMIN -q 'ank -randkey $_' $redirect 2>&1";
+ system($cmd);
+ }
+
+ $cmd = "$KADMIN -q 'ktadd -k $ktfile ";
+ $cmd .= " -q " if (! $verbose);
+ $cmd .= "@princs' $redirect";
+ if (system "$cmd") {
+ sleep(1);
+ die "Error in system($cmd)\n";
}
}
diff --git a/src/kadmin/testing/scripts/make-host-keytab.plin b/src/kadmin/testing/scripts/make-host-keytab.plin
index 14d7b10b54..ad509c35c9 100644
--- a/src/kadmin/testing/scripts/make-host-keytab.plin
+++ b/src/kadmin/testing/scripts/make-host-keytab.plin
@@ -71,7 +71,7 @@ $SRVTCL = ($ENV{'SRVTCL'} || "$TESTDIR/util/ovsec_kadm_srv_tcl");
$TCLUTIL = ($ENV{'TCLUTIL'} || "$TESTDIR/tcl/util.t");
# This'll be wrong sometimes
$RSH_CMD = ($ENV{'RSH_CMD'} || '/usr/ucb/rsh');
-$EDIT_KEYTAB = ($ENV{'EDIT_KEYTAB'} || "$top/keytab/kadm5_keytab.local");
+$KADMIN = ($ENV{'KADMIN'} || "$top/cli/kadmin.local");
if ($server) {
# XXX Using /usr/ucb/rsh for now.
@@ -122,14 +122,20 @@ if ($server) {
else {
$redirect = "> /dev/null" if (! $verbose);
- $cmd = "$EDIT_KEYTAB -k $ktfile";
- $cmd .= " -q" if (! $verbose);
- $cmd .= " -a -c";
+ # We can ignore errors here, because the ktadd below will fail if
+ # this fails for any reason other than "principal exists"
for (@princs) {
- if (system "$cmd $_") {
- sleep(1);
- die "Error in system($cmd $_)\n";
- }
+ next if (/^kadmin/);
+ $cmd = "$KADMIN -q 'ank -randkey $_' $redirect 2>&1";
+ system($cmd);
+ }
+
+ $cmd = "$KADMIN -q 'ktadd -k $ktfile ";
+ $cmd .= " -q " if (! $verbose);
+ $cmd .= "@princs' $redirect";
+ if (system "$cmd") {
+ sleep(1);
+ die "Error in system($cmd)\n";
}
}