From f18120aacc7a00828c9efa905df65a2dfc5ca4a5 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Tue, 9 Apr 1996 22:42:11 +0000 Subject: [PATCH] add "extract snk4 key" function to get device keys out of the database (easier than putting them in...) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7763 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/v5client/kadmin5.c | 108 ++++++++++++++++++++++++++++++ src/kadmin/v5client/kadmin5_ct.ct | 3 + 2 files changed, 111 insertions(+) diff --git a/src/kadmin/v5client/kadmin5.c b/src/kadmin/v5client/kadmin5.c index 57cca4f5c..71a46bbc0 100644 --- a/src/kadmin/v5client/kadmin5.c +++ b/src/kadmin/v5client/kadmin5.c @@ -1124,6 +1124,114 @@ kadmin_extract_v4(argc, argv) fclose(v4tab); } +/* + * kadmin_extract_snk4() - Extract snk4 entry. + */ +void +kadmin_extract_snk4(argc, argv) + int argc; + char *argv[]; +{ + int i; + krb5_error_code kret; + krb5_int32 proto_stat; + krb5_int32 ncomps; + krb5_data *complist; + char *instance; + krb5_boolean force, doit; + krb5_keytab_entry keytab_entry; + + requestname = argv[0]; + force = 0; + if (argc < 2) { + com_err(argv[0], 0, "usage is %s principal", argv[0]); + return; + + } + instance = "SNK4"; + argc -= 1; + argv += 1; + + memset((char *) &keytab_entry, 0, sizeof(krb5_keytab_entry)); + + for (i=0; i