summaryrefslogtreecommitdiffstats
path: root/src/kadmin/kdbkeys
diff options
context:
space:
mode:
authorMarc Horowitz <marc@mit.edu>1996-07-22 20:49:46 +0000
committerMarc Horowitz <marc@mit.edu>1996-07-22 20:49:46 +0000
commitedf8b4d8a6a665c2aa150993cd813ea6c5cf12e1 (patch)
tree6c2974a97b448c040fa4a31708ec5e02f187526c /src/kadmin/kdbkeys
parent013bb1391582ed9e653ae706e398ddb8d08cfcc9 (diff)
downloadkrb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.tar.gz
krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.tar.xz
krb5-edf8b4d8a6a665c2aa150993cd813ea6c5cf12e1.zip
this commit includes all the changes on the OV_9510_INTEGRATION and
OV_MERGE branches. This includes, but is not limited to, the new openvision admin system, and major changes to gssapi to add functionality, and bring the implementation in line with rfc1964. before committing, the code was built and tested for netbsd and solaris. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8774 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/kdbkeys')
-rw-r--r--src/kadmin/kdbkeys/ChangeLog16
-rw-r--r--src/kadmin/kdbkeys/Makefile.in15
-rw-r--r--src/kadmin/kdbkeys/Makefile.ov21
-rw-r--r--src/kadmin/kdbkeys/configure.in11
-rw-r--r--src/kadmin/kdbkeys/do-test.pl56
5 files changed, 119 insertions, 0 deletions
diff --git a/src/kadmin/kdbkeys/ChangeLog b/src/kadmin/kdbkeys/ChangeLog
new file mode 100644
index 000000000..206aea9be
--- /dev/null
+++ b/src/kadmin/kdbkeys/ChangeLog
@@ -0,0 +1,16 @@
+Thu Jul 18 19:44:10 1996 Marc Horowitz <marc@mit.edu>
+
+ * configure.in: removed ET_RULES, replaced with AC_PROG_AWK
+
+Wed Jul 10 01:00:49 1996 Marc Horowitz <marc@mit.edu>
+
+ * Makefile.in, configure.in: added autoconf support
+
+ * kdbkeys.c: rename <ovsec_adm/foo.h> to <kadm5/foo.h>, rename
+ <krb5/krb5.h to <krb5.h>
+
+Tue Jul 9 13:25:00 1996 Barry Jaspan <bjaspan@mit.edu>
+
+ * do-test.pl: rewrite to use kdb5_util instead of kdbkeys
+
+
diff --git a/src/kadmin/kdbkeys/Makefile.in b/src/kadmin/kdbkeys/Makefile.in
new file mode 100644
index 000000000..5672bd0bf
--- /dev/null
+++ b/src/kadmin/kdbkeys/Makefile.in
@@ -0,0 +1,15 @@
+CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE)
+
+PROG = kdbkeys
+OBJS = kdbkeys.o
+
+all:: $(PROG)
+
+$(PROG): $(OBJS) $(DEPLIBS)
+ $(CC) $(LDFLAGS) $(LDARGS) -o $(PROG) $(OBJS) $(LIBS)
+
+install::
+ $(INSTALL_PROGRAM) $(PROG) ${DESTDIR}$(ADMIN_BINDIR)/$(PROG)
+
+clean::
+ $(RM) $(PROG) $(OBJS)
diff --git a/src/kadmin/kdbkeys/Makefile.ov b/src/kadmin/kdbkeys/Makefile.ov
new file mode 100644
index 000000000..72c11695a
--- /dev/null
+++ b/src/kadmin/kdbkeys/Makefile.ov
@@ -0,0 +1,21 @@
+#
+# $Id$
+#
+
+TOP = ..
+include $(TOP)/config.mk/template
+
+# Need $(STOP_SERVERS_LOCAL) because any running servers need to be
+# killed so that they won't keep the database open so that we can't
+# blow it away.
+
+unit-test:: unit-test-setup unit-test-body unit-test-cleanup
+
+unit-test-setup::
+ $(START_SERVERS_LOCAL)
+ $(STOP_SERVERS_LOCAL)
+
+unit-test-body::
+ $(PERL) ./do-test.pl 10
+
+unit-test-cleanup::
diff --git a/src/kadmin/kdbkeys/configure.in b/src/kadmin/kdbkeys/configure.in
new file mode 100644
index 000000000..6c027fc27
--- /dev/null
+++ b/src/kadmin/kdbkeys/configure.in
@@ -0,0 +1,11 @@
+AC_INIT(kdbkeys.c)
+CONFIG_RULES
+AC_PROG_INSTALL
+AC_PROG_AWK
+USE_KADMSRV_LIBRARY
+USE_GSSRPC_LIBRARY
+USE_DYN_LIBRARY
+USE_KDB5_LIBRARY
+KRB5_LIBRARIES
+V5_USE_SHARED_LIB
+V5_AC_OUTPUT_MAKEFILE
diff --git a/src/kadmin/kdbkeys/do-test.pl b/src/kadmin/kdbkeys/do-test.pl
new file mode 100644
index 000000000..7acb425f7
--- /dev/null
+++ b/src/kadmin/kdbkeys/do-test.pl
@@ -0,0 +1,56 @@
+#!/afs/athena/contrib/perl/p
+
+#
+# $Id$
+#
+
+$debug = $ARGV[1] || $ENV{'VERBOSE_TEST'};
+
+die "Need a number.\n" if !$ARGV[0];
+
+die "Neither \$TOP nor \$TESTDIR is set.\n"
+ if (! ($ENV{'TOP'} || $ENV{'TESTDIR'}));
+
+$TESTDIR = ($ENV{'TESTDIR'} || "$ENV{'TOP'}/testing");
+$INITDB = ($ENV{'INITDB'} || "$TESTDIR/scripts/init_db");
+
+for ($i=0; $i<$ARGV[0]; $i++) {
+ print "Trial $i\n" if $debug;
+
+ system("$INITDB > /dev/null 2>&1") &&
+ die "Error in init_db\n";
+
+ open(KEYS,"../dbutil/kdb5_util -R dump_db|") ||
+ die "Couldn't run kdb5_util: $!\n";
+ chop($header = <KEYS>);
+ if ($header ne "kdb5_util load_dump version 4") {
+ die "Cannot operate on dump version \"$header\"; version 4 required.";
+ }
+ while(<KEYS>) {
+ next if ((!/^princ.*kadmin\//) && (!/^princ.*krbtgt/));
+
+ print if $debug > 1;
+
+ split;
+
+ $princ = $_[6];
+ $nkeys = $_[4];
+ $ntls = $_[3];
+ print "$princ: nkeys $nkeys, ntls $ntls\n" if $debug;
+ for ($j = 15 + $ntls*3; $nkeys > 0; $nkeys--) {
+ $ver = $_[$j++];
+ $kvno = $_[$j++];
+ $keytype = $_[$j++];
+ $keylen = $_[$j++];
+ $keydata = $_[$j++];
+ $j += 3 if ($ver > 1);
+
+ print "$princ, ver $ver, kvno $kvno, type $keytype, len $keylen, "
+ . "data $keydata\n" if $debug;
+
+ die "Duplicated key $princ = $keydata\n" if
+ $keys{$keydata}++;
+ }
+ }
+ close(KEYS);
+}