]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Remove srvtab support
authorRobbie Harwood <rharwood@redhat.com>
Mon, 9 Oct 2017 19:58:33 +0000 (15:58 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 11 Apr 2019 19:36:29 +0000 (15:36 -0400)
Also change internal names from "srvtab" to "keytab" where the old
name was used.

ticket: 8793 (new)

33 files changed:
doc/admin/admin_commands/ktutil.rst
doc/basic/keytab_def.rst
src/kadmin/ktutil/ktutil.c
src/kadmin/ktutil/ktutil.h
src/kadmin/ktutil/ktutil_ct.ct
src/kadmin/ktutil/ktutil_funcs.c
src/kadmin/testing/proto/krb5.conf.proto
src/kadmin/testing/scripts/env-setup.shin
src/kadmin/testing/scripts/init_db
src/kadmin/testing/scripts/make-host-keytab.plin
src/kadmin/testing/scripts/start_servers_local
src/kprop/kprop.c
src/kprop/kpropd.c
src/lib/kadm5/unit-test/api.current/init.exp
src/lib/krb5/keytab/Makefile.in
src/lib/krb5/keytab/deps
src/lib/krb5/keytab/kt_srvtab.c [deleted file]
src/lib/krb5/keytab/ktbase.c
src/lib/krb5/krb/in_tkt_sky.c
src/lib/krb5/libkrb5.exports
src/lib/rpc/unit-test/Makefile.in
src/lib/rpc/unit-test/config/unix.exp
src/lib/rpc/unit-test/lib/helpers.exp
src/lib/rpc/unit-test/rpc_test_setup.sh
src/man/ktutil.man
src/tests/dejagnu/config/default.exp
src/tests/dejagnu/krb-standalone/gssapi.exp
src/tests/dejagnu/krb-standalone/kadmin.exp
src/tests/dejagnu/krb-standalone/kprop.exp
src/tests/dejagnu/krb-standalone/sample.exp
src/tests/dejagnu/krb-standalone/simple.exp
src/tests/dejagnu/krb-standalone/standalone.exp
src/tests/dejagnu/krb-standalone/tcp.exp

index 0dbc08f604e9edc327abd1000570a9d0b5e4195b..0897c77579d1418e957edd811d219ee5fcb905d1 100644 (file)
@@ -13,8 +13,8 @@ DESCRIPTION
 -----------
 
 The ktutil command invokes a command interface from which an
-administrator can read, write, or edit entries in a keytab or Kerberos
-V4 srvtab file.
+administrator can read, write, or edit entries in a keytab.  (Kerberos
+V4 srvtab files are no longer supported.)
 
 
 COMMANDS
@@ -38,15 +38,6 @@ Read the Kerberos V5 keytab file *keytab* into the current keylist.
 
 Alias: **rkt**
 
-read_st
-~~~~~~~
-
-    **read_st** *srvtab*
-
-Read the Kerberos V4 srvtab file *srvtab* into the current keylist.
-
-Alias: **rst**
-
 write_kt
 ~~~~~~~~
 
@@ -56,15 +47,6 @@ Write the current keylist into the Kerberos V5 keytab file *keytab*.
 
 Alias: **wkt**
 
-write_st
-~~~~~~~~
-
-    **write_st** *srvtab*
-
-Write the current keylist into the Kerberos V4 srvtab file *srvtab*.
-
-Alias: **wst**
-
 clear_list
 ~~~~~~~~~~
 
index 33ae67c6c75b5af3f2859e126c972785229f4948..6c7fcc3b05ef37a80f94bce8a4af6060b15aba18 100644 (file)
@@ -12,10 +12,8 @@ credentials for client applications.
 
 Keytabs are named using the format *type*\ ``:``\ *value*.  Usually
 *type* is ``FILE`` and *value* is the absolute pathname of the file.
-Other possible values for *type* are ``SRVTAB``, which indicates a
-file in the deprecated Kerberos 4 srvtab format, and ``MEMORY``, which
-indicates a temporary keytab stored in the memory of the current
-process.
+The other possible value for *type* is ``MEMORY``, which indicates a
+temporary keytab stored in the memory of the current process.
 
 A keytab contains one or more entries, where each entry consists of a
 timestamp (indicating when the entry was written to the keytab), a
index 196f2078659082e48f25e59cab94b3d3b269f233..92d7023a4f0f8672edcfab9928db27203d47c1c8 100644 (file)
@@ -98,15 +98,8 @@ void ktutil_read_v4(argc, argv)
     int argc;
     char *argv[];
 {
-    krb5_error_code retval;
-
-    if (argc != 2) {
-        fprintf(stderr, _("%s: must specify the srvtab to read\n"), argv[0]);
-        return;
-    }
-    retval = ktutil_read_srvtab(kcontext, argv[1], &ktlist);
-    if (retval)
-        com_err(argv[0], retval, _("while reading srvtab \"%s\""), argv[1]);
+    fprintf(stderr, _("%s: reading srvtabs is no longer supported\n"),
+            argv[0]);
 }
 
 void ktutil_write_v5(argc, argv)
index ddb754bae43bb1a42b5917f817a5839545c44c4b..acaf0239a83a9d18e6ff4ff83e88b51d6e73ce53 100644 (file)
@@ -50,10 +50,6 @@ krb5_error_code ktutil_write_keytab (krb5_context,
                                      krb5_kt_list,
                                      char *);
 
-krb5_error_code ktutil_read_srvtab (krb5_context,
-                                    char *,
-                                    krb5_kt_list *);
-
 void ktutil_add_entry (int, char *[]);
 
 void ktutil_clear_list (int, char *[]);
index 0c7ccb6894a72b36b0af3cfc6f30d38e572b1991..2061ef9d0a0ad40c179c1d9541ad8555022884a3 100644 (file)
@@ -32,13 +32,13 @@ request ktutil_clear_list, "Clear the current keylist.",
 request ktutil_read_v5, "Read a krb5 keytab into the current keylist.",
        read_kt, rkt;
 
-request ktutil_read_v4, "Read a krb4 srvtab into the current keylist.",
+request ktutil_read_v4, "Deprecated and removed.",
        read_st, rst;
 
 request ktutil_write_v5, "Write the current keylist to a krb5 keytab.",
        write_kt, wkt;
 
-request ktutil_write_v4, "Write the current keylist to a krb4 srvtab.",
+request ktutil_write_v4, "Deprecated and removed.",
        write_st, wst;
 
 request ktutil_add_entry, "Add an entry to the current keylist.",
index 6d119a2b64ecac2e2488f74864a2daf528d1955f..e2e005d22e0f6d5858c66e4b76c27c955b125516 100644 (file)
@@ -368,22 +368,3 @@ krb5_error_code ktutil_write_keytab(context, list, name)
     krb5_kt_close(context, kt);
     return retval;
 }
-
-/*
- * Read in a named krb4 srvtab and append to list.  Allocate new list
- * if needed.
- */
-krb5_error_code ktutil_read_srvtab(context, name, list)
-    krb5_context context;
-    char *name;
-    krb5_kt_list *list;
-{
-    char *ktname;
-    krb5_error_code result;
-
-    if (asprintf(&ktname, "SRVTAB:%s", name) < 0)
-        return ENOMEM;
-    result = ktutil_read_keytab(context, ktname, list);
-    free(ktname);
-    return result;
-}
index 00c44297806d6a592bb0bed26a04fa28133b9b68..e710852d456cc8a46fd1640541f03a49dbb537e5 100644 (file)
@@ -1,6 +1,6 @@
 [libdefaults]
        default_realm = __REALM__
-       default_keytab_name = FILE:__K5ROOT__/v5srvtab
+       default_keytab_name = FILE:__K5ROOT__/keytab
        dns_fallback = no
        plugin_base_dir = __PLUGIN_DIR__
        allow_weak_crypto = true
index c8d866f153f0666e1fb957894e8efccb3ef206ae..7262983515b247f083923a13234781b5097c4681 100755 (executable)
@@ -77,7 +77,7 @@ 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
-KRB5_KTNAME=$K5ROOT/ovsec_adm.srvtab; export KRB5_KTNAME
+KRB5_KTNAME=$K5ROOT/ovsec_adm.keytab; export KRB5_KTNAME
 KRB5_CLIENT_KTNAME=$K5ROOT/client_keytab; export KRB5_CLIENT_KTNAME
 KRB5CCNAME=$K5ROOT/krb5cc_unit-test; export KRB5CCNAME
 
index cd71656288cbc5fc476779d96798ec04145bfb9a..bf119f2ac58e2034cf85fd075ad72c44ab1e661d 100755 (executable)
@@ -218,7 +218,7 @@ changepw/kerberos@$REALM    cil
 
 EOF
 
-eval $LOCAL_MAKE_KEYTAB -princ kadmin/admin -princ kadmin/changepw -princ ovsec_adm/admin -princ ovsec_adm/changepw $K5ROOT/ovsec_adm.srvtab $REDIRECT
+eval $LOCAL_MAKE_KEYTAB -princ kadmin/admin -princ kadmin/changepw -princ ovsec_adm/admin -princ ovsec_adm/changepw $K5ROOT/ovsec_adm.keytab $REDIRECT
 
 # Create $K5ROOT/setup.csh to make it easy to run other programs against
 # the test db
index dfe0b3a0138023af32cf79d221f76c64da2ff516..c77d61c70c251195120321d08149c6af20761632 100755 (executable)
@@ -11,7 +11,7 @@ $usage = "Usage: $whoami [ -server server ] [ -princ principal ]
        Default principals are host/hostname\@SECURE-TEST.OV.COM and
          test/hostname\@SECURE-TEST.OV.COM.
        If any principals are specified, the default principals are
-         not added to the srvtab.
+         not added to the keytab.
        The string \"xCANONHOSTx\" in a principal specification will be
          replaced by the canonical host name of the local host.";
 
index 0cbed462d1adbcb5d17a97136c607f22c7ef944b..80989297455992a8a3a9442a4c3d131dbcc41ccd 100755 (executable)
@@ -98,9 +98,6 @@ x=$?
 rm /tmp/start_servers_local$$
 if test $x != 0 ; then exit 1 ; fi
 
-# rm -f /etc/v5srvtab
-# eval $LOCAL_MAKE_KEYTAB -princ host/xCANONHOSTx /etc/v5srvtab $REDIRECT
-
 # run the servers (from the build tree)
 
 adm_start_file=/tmp/adm_server_start.$$
index b7fb637779e8abf9036dd525c211155c422d5778..0b53aae7e8c8f508053a87970b4d33c05cfdb857 100644 (file)
@@ -49,7 +49,7 @@ static char *kprop_version = KPROP_PROT_VERSION;
 
 static char *progname = NULL;
 static int debug = 0;
-static char *srvtab = NULL;
+static char *keytab_path = NULL;
 static char *replica_host;
 static char *realm = NULL;
 static char *def_realm = NULL;
@@ -83,7 +83,7 @@ static void update_last_prop_file(char *hostname, char *file_name);
 static void usage()
 {
     fprintf(stderr, _("\nUsage: %s [-r realm] [-f file] [-d] [-P port] "
-                      "[-s srvtab] replica_host\n\n"), progname);
+                      "[-s keytab] replica_host\n\n"), progname);
     exit(1);
 }
 
@@ -140,7 +140,7 @@ parse_args(krb5_context context, int argc, char **argv)
             port = optarg;
             break;
         case 's':
-            srvtab = optarg;
+            keytab_path = optarg;
             break;
         default:
             usage();
@@ -191,8 +191,8 @@ get_tickets(krb5_context context)
         exit(1);
     }
 
-    if (srvtab != NULL) {
-        retval = krb5_kt_resolve(context, srvtab, &keytab);
+    if (keytab_path != NULL) {
+        retval = krb5_kt_resolve(context, keytab_path, &keytab);
         if (retval) {
             com_err(progname, retval, _("while resolving keytab"));
             exit(1);
index e3b73991b3867b22c4c7547ad0bbab0b955382a2..559b556a65cb33efff982a9672507ed7241ec28a 100644 (file)
@@ -117,7 +117,7 @@ static kadm5_config_params params;
 static char *progname;
 static int debug = 0;
 static int nodaemon = 0;
-static char *srvtab = NULL;
+static char *keytab_path = NULL;
 static int standalone = 0;
 static const char *pid_file = NULL;
 
@@ -168,7 +168,7 @@ static void
 usage()
 {
     fprintf(stderr,
-            _("\nUsage: %s [-r realm] [-s srvtab] [-dS] [-f replica_file]\n"),
+            _("\nUsage: %s [-r realm] [-s keytab] [-dS] [-f replica_file]\n"),
             progname);
     fprintf(stderr, _("\t[-F kerberos_db_file ] [-p kdb5_util_pathname]\n"));
     fprintf(stderr, _("\t[-x db_args]* [-P port] [-a acl_file]\n"));
@@ -692,7 +692,7 @@ reinit:
                 iprop_svc_princstr);
     }
     retval = kadm5_init_with_skey(kpropd_context, iprop_svc_princstr,
-                                  srvtab,
+                                  keytab_path,
                                   master_svc_princstr,
                                   &params,
                                   KADM5_STRUCT_VERSION,
@@ -1083,7 +1083,7 @@ parse_args(int argc, char **argv)
             realm = optarg;
             break;
         case 's':
-            srvtab = optarg;
+            keytab_path = optarg;
             break;
         case 'D':
             nodaemon++;
@@ -1237,8 +1237,8 @@ kerberos_authenticate(krb5_context context, int fd, krb5_principal *clientp,
         exit(1);
     }
 
-    if (srvtab != NULL) {
-        retval = krb5_kt_resolve(context, srvtab, &keytab);
+    if (keytab_path != NULL) {
+        retval = krb5_kt_resolve(context, keytab_path, &keytab);
         if (retval) {
             syslog(LOG_ERR, _("Error in krb5_kt_resolve: %s"),
                    error_message(retval));
index d9ae3fbd82a94fbfb4c48d993fb7e58576ee4271..f782613768ceb4abbffb89dcc1a69b1b7f13ccc9 100644 (file)
@@ -695,10 +695,10 @@ if {$RPC} {
     test45_46 ovsec_adm/changepw
 
     # re-extract the keytab so it is right
-    exec rm $env(K5ROOT)/ovsec_adm.srvtab
+    exec rm $env(K5ROOT)/ovsec_adm.keytab
     exec $env(MAKE_KEYTAB) -princ ovsec_adm/admin -princ ovsec_adm/changepw \
            -princ kadmin/admin -princ kadmin/changepw \
-           $env(K5ROOT)/ovsec_adm.srvtab
+           $env(K5ROOT)/ovsec_adm.keytab
 }
 
 return ""
index 2a8fceb003819296bbb84e720c59510888490a80..4621bf714dab5d47a547aaa0a4f6386dd4fb1eaa 100644 (file)
@@ -14,7 +14,6 @@ STLIBOBJS= \
        ktfns.o         \
        kt_file.o       \
        kt_memory.o     \
-       kt_srvtab.o     \
        read_servi.o
 
 OBJS=  \
@@ -26,7 +25,6 @@ OBJS= \
        $(OUTPRE)ktfns.$(OBJEXT)        \
        $(OUTPRE)kt_file.$(OBJEXT)      \
        $(OUTPRE)kt_memory.$(OBJEXT)    \
-       $(OUTPRE)kt_srvtab.$(OBJEXT)    \
        $(OUTPRE)read_servi.$(OBJEXT)
 
 SRCS=  \
@@ -38,7 +36,6 @@ SRCS= \
        $(srcdir)/ktfns.c       \
        $(srcdir)/kt_file.c     \
        $(srcdir)/kt_memory.c   \
-       $(srcdir)/kt_srvtab.c   \
        $(srcdir)/read_servi.c
 
 EXTRADEPSRCS= \
index 4c98188ca8c91b8d2f40569d5e00bb2c5d3dc5b7..522cad0e8f24fe58b80f12b8fb1a7261869bb93c 100644 (file)
@@ -87,17 +87,6 @@ kt_memory.so kt_memory.po $(OUTPRE)kt_memory.$(OBJEXT): \
   $(top_srcdir)/include/krb5/authdata_plugin.h $(top_srcdir)/include/krb5/plugin.h \
   $(top_srcdir)/include/port-sockets.h $(top_srcdir)/include/socket-utils.h \
   kt-int.h kt_memory.c
-kt_srvtab.so kt_srvtab.po $(OUTPRE)kt_srvtab.$(OBJEXT): \
-  $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
-  $(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
-  $(COM_ERR_DEPS) $(top_srcdir)/include/k5-buf.h $(top_srcdir)/include/k5-err.h \
-  $(top_srcdir)/include/k5-gmt_mktime.h $(top_srcdir)/include/k5-int-pkinit.h \
-  $(top_srcdir)/include/k5-int.h $(top_srcdir)/include/k5-platform.h \
-  $(top_srcdir)/include/k5-plugin.h $(top_srcdir)/include/k5-thread.h \
-  $(top_srcdir)/include/k5-trace.h $(top_srcdir)/include/krb5.h \
-  $(top_srcdir)/include/krb5/authdata_plugin.h $(top_srcdir)/include/krb5/plugin.h \
-  $(top_srcdir)/include/port-sockets.h $(top_srcdir)/include/socket-utils.h \
-  kt_srvtab.c
 read_servi.so read_servi.po $(OUTPRE)read_servi.$(OBJEXT): \
   $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
   $(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
diff --git a/src/lib/krb5/keytab/kt_srvtab.c b/src/lib/krb5/keytab/kt_srvtab.c
deleted file mode 100644 (file)
index bbfaadf..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/* lib/krb5/keytab/kt_srvtab.c */
-/*
- * Copyright 1990,1991,2002,2007,2008 by the Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- *   require a specific license from the United States Government.
- *   It is the responsibility of any person or organization contemplating
- *   export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission.  Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose.  It is provided "as is" without express
- * or implied warranty.
- */
-/*
- * Copyright (c) Hewlett-Packard Company 1991
- * Released to the Massachusetts Institute of Technology for inclusion
- * in the Kerberos source code distribution.
- *
- * Copyright 1990,1991 by the Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- *   require a specific license from the United States Government.
- *   It is the responsibility of any person or organization contemplating
- *   export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission.  Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose.  It is provided "as is" without express
- * or implied warranty.
- */
-
-#include "k5-int.h"
-#include <stdio.h>
-
-#ifndef LEAN_CLIENT
-
-/*
- * Constants
- */
-
-#define KRB5_KT_VNO_1   0x0501  /* krb v5, keytab version 1 (DCE compat) */
-#define KRB5_KT_VNO     0x0502  /* krb v5, keytab version 2 (standard)  */
-
-#define KRB5_KT_DEFAULT_VNO KRB5_KT_VNO
-
-/*
- * Types
- */
-typedef struct _krb5_ktsrvtab_data {
-    char *name;                 /* Name of the file */
-    FILE *openf;                /* open file, if any. */
-} krb5_ktsrvtab_data;
-
-/*
- * Macros
- */
-#define KTPRIVATE(id) ((krb5_ktsrvtab_data *)(id)->data)
-#define KTFILENAME(id) (((krb5_ktsrvtab_data *)(id)->data)->name)
-#define KTFILEP(id) (((krb5_ktsrvtab_data *)(id)->data)->openf)
-
-extern const struct _krb5_kt_ops krb5_kts_ops;
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_resolve(krb5_context, const char *, krb5_keytab *);
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_get_name(krb5_context, krb5_keytab, char *, unsigned int);
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_close(krb5_context, krb5_keytab);
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_get_entry(krb5_context, krb5_keytab, krb5_const_principal,
-                        krb5_kvno, krb5_enctype, krb5_keytab_entry *);
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_start_seq_get(krb5_context, krb5_keytab, krb5_kt_cursor *);
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_get_next(krb5_context, krb5_keytab, krb5_keytab_entry *,
-                       krb5_kt_cursor *);
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_end_get(krb5_context, krb5_keytab, krb5_kt_cursor *);
-
-static krb5_error_code
-krb5_ktsrvint_open(krb5_context, krb5_keytab);
-
-static krb5_error_code
-krb5_ktsrvint_close(krb5_context, krb5_keytab);
-
-static krb5_error_code
-krb5_ktsrvint_read_entry(krb5_context, krb5_keytab, krb5_keytab_entry *);
-
-/*
- * This is an implementation specific resolver.  It returns a keytab id
- * initialized with srvtab keytab routines.
- */
-
-static krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_resolve(krb5_context context, const char *name, krb5_keytab *id)
-{
-    krb5_ktsrvtab_data *data;
-
-    if ((*id = (krb5_keytab) malloc(sizeof(**id))) == NULL)
-        return(ENOMEM);
-
-    (*id)->ops = &krb5_kts_ops;
-    data = (krb5_ktsrvtab_data *)malloc(sizeof(krb5_ktsrvtab_data));
-    if (data == NULL) {
-        free(*id);
-        return(ENOMEM);
-    }
-
-    data->name = strdup(name);
-    if (data->name == NULL) {
-        free(data);
-        free(*id);
-        return(ENOMEM);
-    }
-
-    data->openf = 0;
-
-    (*id)->data = (krb5_pointer)data;
-    (*id)->magic = KV5M_KEYTAB;
-    return(0);
-}
-
-/*
- * "Close" a file-based keytab and invalidate the id.  This means
- * free memory hidden in the structures.
- */
-
-krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_close(krb5_context context, krb5_keytab id)
-/*
- * This routine is responsible for freeing all memory allocated
- * for this keytab.  There are no system resources that need
- * to be freed nor are there any open files.
- *
- * This routine should undo anything done by krb5_ktsrvtab_resolve().
- */
-{
-    free(KTFILENAME(id));
-    free(id->data);
-    id->ops = 0;
-    free(id);
-    return (0);
-}
-
-/*
- * This is the get_entry routine for the file based keytab implementation.
- * It opens the keytab file, and either retrieves the entry or returns
- * an error.
- */
-
-krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_get_entry(krb5_context context, krb5_keytab id, krb5_const_principal principal, krb5_kvno kvno, krb5_enctype enctype, krb5_keytab_entry *entry)
-{
-    krb5_keytab_entry best_entry, ent;
-    krb5_error_code kerror = 0;
-    int found_wrong_kvno = 0;
-
-    /* Open the srvtab. */
-    if ((kerror = krb5_ktsrvint_open(context, id)))
-        return(kerror);
-
-    /* srvtab files only have DES_CBC_CRC keys. */
-    switch (enctype) {
-    case ENCTYPE_DES_CBC_CRC:
-    case ENCTYPE_DES_CBC_MD5:
-    case ENCTYPE_DES_CBC_MD4:
-    case ENCTYPE_DES_CBC_RAW:
-    case IGNORE_ENCTYPE:
-        break;
-    default:
-        return KRB5_KT_NOTFOUND;
-    }
-
-    best_entry.principal = 0;
-    best_entry.vno = 0;
-    best_entry.key.contents = 0;
-    while ((kerror = krb5_ktsrvint_read_entry(context, id, &ent)) == 0) {
-        ent.key.enctype = enctype;
-        if (krb5_principal_compare(context, principal, ent.principal)) {
-            if (kvno == IGNORE_VNO || ent.vno == IGNORE_VNO) {
-                if (!best_entry.principal || (best_entry.vno < ent.vno)) {
-                    krb5_kt_free_entry(context, &best_entry);
-                    best_entry = ent;
-                }
-            } else {
-                if (ent.vno == kvno) {
-                    best_entry = ent;
-                    break;
-                } else {
-                    found_wrong_kvno = 1;
-                }
-            }
-        } else {
-            krb5_kt_free_entry(context, &ent);
-        }
-    }
-    if (kerror == KRB5_KT_END) {
-        if (best_entry.principal)
-            kerror = 0;
-        else if (found_wrong_kvno)
-            kerror = KRB5_KT_KVNONOTFOUND;
-        else
-            kerror = KRB5_KT_NOTFOUND;
-    }
-    if (kerror) {
-        (void) krb5_ktsrvint_close(context, id);
-        krb5_kt_free_entry(context, &best_entry);
-        return kerror;
-    }
-    if ((kerror = krb5_ktsrvint_close(context, id)) != 0) {
-        krb5_kt_free_entry(context, &best_entry);
-        return kerror;
-    }
-    *entry = best_entry;
-    return 0;
-}
-
-/*
- * Get the name of the file containing a srvtab-based keytab.
- */
-
-krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_get_name(krb5_context context, krb5_keytab id, char *name, unsigned int len)
-/*
- * This routine returns the name of the name of the file associated with
- * this srvtab-based keytab.  The name is prefixed with PREFIX:, so that
- * trt will happen if the name is passed back to resolve.
- */
-{
-    int result;
-
-    memset(name, 0, len);
-    result = snprintf(name, len, "%s:%s", id->ops->prefix, KTFILENAME(id));
-    if (SNPRINTF_OVERFLOW(result, len))
-        return(KRB5_KT_NAME_TOOLONG);
-    return(0);
-}
-
-/*
- * krb5_ktsrvtab_start_seq_get()
- */
-
-krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_start_seq_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursorp)
-{
-    krb5_error_code retval;
-    long *fileoff;
-
-    if ((retval = krb5_ktsrvint_open(context, id)))
-        return retval;
-
-    if (!(fileoff = (long *)malloc(sizeof(*fileoff)))) {
-        krb5_ktsrvint_close(context, id);
-        return ENOMEM;
-    }
-    *fileoff = ftell(KTFILEP(id));
-    *cursorp = (krb5_kt_cursor)fileoff;
-
-    return 0;
-}
-
-/*
- * krb5_ktsrvtab_get_next()
- */
-
-krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_get_next(krb5_context context, krb5_keytab id, krb5_keytab_entry *entry, krb5_kt_cursor *cursor)
-{
-    long *fileoff = (long *)*cursor;
-    krb5_keytab_entry cur_entry;
-    krb5_error_code kerror;
-
-    if (fseek(KTFILEP(id), *fileoff, 0) == -1)
-        return KRB5_KT_END;
-    if ((kerror = krb5_ktsrvint_read_entry(context, id, &cur_entry)))
-        return kerror;
-    *fileoff = ftell(KTFILEP(id));
-    *entry = cur_entry;
-    return 0;
-}
-
-/*
- * krb5_ktsrvtab_end_get()
- */
-
-krb5_error_code KRB5_CALLCONV
-krb5_ktsrvtab_end_get(krb5_context context, krb5_keytab id, krb5_kt_cursor *cursor)
-{
-    free(*cursor);
-    return krb5_ktsrvint_close(context, id);
-}
-
-/*
- * krb5_kts_ops
- */
-
-const struct _krb5_kt_ops krb5_kts_ops = {
-    0,
-    "SRVTAB",   /* Prefix -- this string should not appear anywhere else! */
-    krb5_ktsrvtab_resolve,
-    krb5_ktsrvtab_get_name,
-    krb5_ktsrvtab_close,
-    krb5_ktsrvtab_get_entry,
-    krb5_ktsrvtab_start_seq_get,
-    krb5_ktsrvtab_get_next,
-    krb5_ktsrvtab_end_get,
-    0,
-    0,
-    0
-};
-
-/* formerly: lib/krb5/keytab/srvtab/kts_util.c */
-
-#include <stdio.h>
-
-/* The maximum sizes for V4 aname, realm, sname, and instance +1 */
-/* Taken from krb.h */
-#define         ANAME_SZ        40
-#define         REALM_SZ        40
-#define         SNAME_SZ        40
-#define         INST_SZ         40
-
-static krb5_error_code
-read_field(FILE *fp, char *s, int len)
-{
-    int c;
-
-    while ((c = getc(fp)) != 0) {
-        if (c == EOF || len <= 1)
-            return KRB5_KT_END;
-        *s = c;
-        s++;
-        len--;
-    }
-    *s = 0;
-    return 0;
-}
-
-krb5_error_code
-krb5_ktsrvint_open(krb5_context context, krb5_keytab id)
-{
-    KTFILEP(id) = fopen(KTFILENAME(id), "rb");
-    if (!KTFILEP(id))
-        return errno;
-    set_cloexec_file(KTFILEP(id));
-    return 0;
-}
-
-krb5_error_code
-krb5_ktsrvint_close(krb5_context context, krb5_keytab id)
-{
-    if (!KTFILEP(id))
-        return 0;
-    (void) fclose(KTFILEP(id));
-    KTFILEP(id) = 0;
-    return 0;
-}
-
-krb5_error_code
-krb5_ktsrvint_read_entry(krb5_context context, krb5_keytab id, krb5_keytab_entry *ret_entry)
-{
-    FILE *fp;
-    char name[SNAME_SZ], instance[INST_SZ], realm[REALM_SZ];
-    unsigned char key[8];
-    int vno;
-    krb5_error_code kerror;
-
-    /* Read in an entry from the srvtab file. */
-    fp = KTFILEP(id);
-    kerror = read_field(fp, name, sizeof(name));
-    if (kerror != 0)
-        return kerror;
-    kerror = read_field(fp, instance, sizeof(instance));
-    if (kerror != 0)
-        return kerror;
-    kerror = read_field(fp, realm, sizeof(realm));
-    if (kerror != 0)
-        return kerror;
-    vno = getc(fp);
-    if (vno == EOF)
-        return KRB5_KT_END;
-    if (fread(key, 1, sizeof(key), fp) != sizeof(key))
-        return KRB5_KT_END;
-
-    /* Fill in ret_entry with the data we read.  Everything maps well
-     * except for the timestamp, which we don't have a value for.  For
-     * now we just set it to 0. */
-    memset(ret_entry, 0, sizeof(*ret_entry));
-    ret_entry->magic = KV5M_KEYTAB_ENTRY;
-    kerror = krb5_425_conv_principal(context, name, instance, realm,
-                                     &ret_entry->principal);
-    if (kerror != 0)
-        return kerror;
-    ret_entry->vno = vno;
-    ret_entry->timestamp = 0;
-    ret_entry->key.enctype = ENCTYPE_DES_CBC_CRC;
-    ret_entry->key.magic = KV5M_KEYBLOCK;
-    ret_entry->key.length = sizeof(key);
-    ret_entry->key.contents = k5memdup(key, sizeof(key), &kerror);
-    if (ret_entry->key.contents == NULL) {
-        krb5_free_principal(context, ret_entry->principal);
-        return kerror;
-    }
-
-    return 0;
-}
-#endif /* LEAN_CLIENT */
index 0d39b2940cf88aa55d0bb070a4f82203613c815d..25752245ac384f8507cacd588349e90df6187e21 100644 (file)
 
 extern const krb5_kt_ops krb5_ktf_ops;
 extern const krb5_kt_ops krb5_ktf_writable_ops;
-extern const krb5_kt_ops krb5_kts_ops;
 extern const krb5_kt_ops krb5_mkt_ops;
 
 struct krb5_kt_typelist {
     const krb5_kt_ops *ops;
     const struct krb5_kt_typelist *next;
 };
-const static struct krb5_kt_typelist krb5_kt_typelist_srvtab = {
-    &krb5_kts_ops,
-    NULL
-};
 const static struct krb5_kt_typelist krb5_kt_typelist_memory = {
     &krb5_mkt_ops,
-    &krb5_kt_typelist_srvtab
+    NULL
 };
 const static struct krb5_kt_typelist krb5_kt_typelist_wrfile  = {
     &krb5_ktf_writable_ops,
index 7a8922623c3aeac8c04291283612a965d1b7aa37..342fe18dc1b0e97d70e8eeb5146c6827427dd76b 100644 (file)
@@ -56,9 +56,9 @@ get_as_key_skey(krb5_context context, krb5_principal client,
   If addrs is non-NULL, it is used for the addresses requested.  If it is
   null, the system standard addresses are used.
 
-  If keyblock is NULL, an appropriate key for creds->client is retrieved
-  from the system key store (e.g. /etc/srvtab).  If keyblock is non-NULL,
-  it is used as the decryption key.
+  If keyblock is NULL, an appropriate key for creds->client is retrieved from
+  the system key store (e.g. /etc/krb5.keytab).  If keyblock is non-NULL, it
+  is used as the decryption key.
 
   A succesful call will place the ticket in the credentials cache ccache.
 
index dfdb72dafcf25093e290bfb4d9272d7d09e7549d..038e4de4bbe69476538173086a1c15f4c82ed39a 100644 (file)
@@ -459,7 +459,6 @@ krb5_kt_resolve
 krb5_kt_start_seq_get
 krb5_ktf_ops
 krb5_ktf_writable_ops
-krb5_kts_ops
 krb5_kuserok
 krb5_lock_file
 krb5_make_authdata_kdc_issued
index 6f29e33c91514fa41cc44e5e102518dbb99e0713..46f2f1d4bc5d8a2f1ce8353c24ce53d5b2510561 100644 (file)
@@ -45,8 +45,8 @@ PASS=@PASS@
 unit-test-body:
        $(RM) krb5cc_rpc_test_*
        $(ENV_SETUP) $(VALGRIND) $(START_SERVERS)
-       RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab.$$$$ ; export RPC_TEST_SRVTAB ; \
-       trap "echo Failed, cleaning up... ; rm -f $$RPC_TEST_SRVTAB ; $(ENV_SETUP) $(STOP_SERVERS) ; trap '' 0 ; exit 1" 0 1 2 3 14 15 ; \
+       RPC_TEST_KEYTAB=/tmp/rpc_test_keytab.$$$$ ; export RPC_TEST_KEYTAB ; \
+       trap "echo Failed, cleaning up... ; rm -f $$RPC_TEST_KEYTAB ; $(ENV_SETUP) $(STOP_SERVERS) ; trap '' 0 ; exit 1" 0 1 2 3 14 15 ; \
        if $(ENV_SETUP) \
                $(RUNTEST) SERVER=./server CLIENT=./client \
                KINIT=$(BUILDTOP)/clients/kinit/kinit \
@@ -55,7 +55,7 @@ unit-test-body:
                PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS) ; \
        then \
                echo Cleaning up... ; \
-               rm -f $$RPC_TEST_SRVTAB krb5cc_rpc_test_* ; \
+               rm -f $$RPC_TEST_KEYTAB krb5cc_rpc_test_* ; \
                $(ENV_SETUP) $(STOP_SERVERS) ; \
                trap 0 ; exit 0 ; \
        else exit 1 ; fi
index ba57b703e9507f8926e093d6aa1fd14c44ef5536..ed179bbe3e29cd3be93da28094d7b2d67f4b7b7d 100644 (file)
@@ -139,7 +139,7 @@ proc rpc_test_start { } {
 
        if [info exists server_pid] { rpc_test_exit }
 
-       set env(KRB5_KTNAME) FILE:$env(RPC_TEST_SRVTAB)
+       set env(KRB5_KTNAME) FILE:$env(RPC_TEST_KEYTAB)
 
        verbose "% $SERVER" 1
        set server_pid [spawn $SERVER $PROT]
index a1b078374af54ba73395f58bc22a330571ef9289..6ba2b10ae13bcc1bc6be303fbce707488b020a7e 100644 (file)
@@ -121,8 +121,8 @@ proc setup_database {} {
 if ![info exists CANON_HOST] {
     set CANON_HOST [exec $env(QUALNAME)]
     setup_database
-    file delete $env(RPC_TEST_SRVTAB)
-    exec $env(MAKE_KEYTAB) -princ "server/$CANON_HOST" $env(RPC_TEST_SRVTAB)
+    file delete $env(RPC_TEST_KEYTAB)
+    exec $env(MAKE_KEYTAB) -princ "server/$CANON_HOST" $env(RPC_TEST_KEYTAB)
 }
 
 
index 968f52a67045735053fc16a5e26120e4507c02fe..b610f87efcd4a5d26f50b39e55ddcc0a34f78115 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # This script performs additional setup for the RPC unit test.  It
-# assumes that gmake has put TOP and RPC_TEST_SRVTAB into the
+# assumes that gmake has put TOP and RPC_TEST_KEYTAB into the
 # environment. 
 #
 # $Id$
@@ -42,9 +42,9 @@ if test $? != 0 ; then
 fi
 rm /tmp/rpc_test_setup$$
 
-rm -f $RPC_TEST_SRVTAB
+rm -f $RPC_TEST_KEYTAB
 
-eval $MAKE_KEYTAB -princ server/$CANON_HOST $RPC_TEST_SRVTAB $REDIRECT
+eval $MAKE_KEYTAB -princ server/$CANON_HOST $RPC_TEST_KEYTAB $REDIRECT
 
 # grep -s "$CANON_HOST SECURE-TEST.OV.COM" /etc/krb.realms
 # if [ $? != 0 ]; then
index 800ae3627d3a56bb16163dda8ee1f7f81dd72879..2333294689e46db8f1a7508617472ad811f0c832 100644 (file)
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KTUTIL" "1" " " "1.17" "MIT Kerberos"
+.TH "KTUTIL" "1" " " "1.18" "MIT Kerberos"
 .SH NAME
 ktutil \- Kerberos keytab file maintenance utility
 .
@@ -36,8 +36,8 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 .SH DESCRIPTION
 .sp
 The ktutil command invokes a command interface from which an
-administrator can read, write, or edit entries in a keytab or Kerberos
-V4 srvtab file.
+administrator can read, write, or edit entries in a keytab.  (Kerberos
+V4 srvtab files are no longer supported.)
 .SH COMMANDS
 .SS list
 .INDENT 0.0
@@ -59,16 +59,6 @@ Alias: \fBl\fP
 Read the Kerberos V5 keytab file \fIkeytab\fP into the current keylist.
 .sp
 Alias: \fBrkt\fP
-.SS read_st
-.INDENT 0.0
-.INDENT 3.5
-\fBread_st\fP \fIsrvtab\fP
-.UNINDENT
-.UNINDENT
-.sp
-Read the Kerberos V4 srvtab file \fIsrvtab\fP into the current keylist.
-.sp
-Alias: \fBrst\fP
 .SS write_kt
 .INDENT 0.0
 .INDENT 3.5
@@ -79,16 +69,6 @@ Alias: \fBrst\fP
 Write the current keylist into the Kerberos V5 keytab file \fIkeytab\fP\&.
 .sp
 Alias: \fBwkt\fP
-.SS write_st
-.INDENT 0.0
-.INDENT 3.5
-\fBwrite_st\fP \fIsrvtab\fP
-.UNINDENT
-.UNINDENT
-.sp
-Write the current keylist into the Kerberos V4 srvtab file \fIsrvtab\fP\&.
-.sp
-Alias: \fBwst\fP
 .SS clear_list
 .INDENT 0.0
 .INDENT 3.5
@@ -177,6 +157,6 @@ kadmin(1), kdb5_util(8), kerberos(7)
 .SH AUTHOR
 MIT
 .SH COPYRIGHT
-1985-2018, MIT
+1985-2019, MIT
 .\" Generated by docutils manpage writer.
 .
index d7b2965165eb3df6201956a8216d5cbae5e83be9..ea9bedd45209e4ce5045a1fe3e84bf261926636d 100644 (file)
@@ -440,8 +440,8 @@ proc delete_db {} {
        $tmppwd/kdc-db.ulog \
        $tmppwd/replica-db $tmppwd/replica-db.ok $tmppwd/replica-db.kadm5 $tmppwd/replica-db.kadm5.lock \
        $tmppwd/replica-db~ $tmppwd/replica-db~.ok $tmppwd/replica-db~.kadm5 $tmppwd/replica-db~.kadm5.lock
-    # Creating a new database means we need a new srvtab.
-    file delete $tmppwd/srvtab $tmppwd/cpw_srvtab
+    # Creating a new database means we need a new keytab.
+    file delete $tmppwd/keytab $tmppwd/cpw_keytab
 }
 
 delete_db
@@ -1510,11 +1510,9 @@ proc start_kpropd {} {
 
     envstack_push
     setup_kerberos_env replica
-    spawn $KPROPD -S -d -t -P [expr 10 + $portbase] -s $tmppwd/srvtab -f $tmppwd/incoming-replica-datatrans -p $KDB5_UTIL -a $tmppwd/kpropd-acl
+    spawn $KPROPD -S -d -t -P [expr 10 + $portbase] -s $tmppwd/keytab -f $tmppwd/incoming-replica-datatrans -p $KDB5_UTIL -a $tmppwd/kpropd-acl
     set kpropd_pid [exp_pid]
     set kpropd_spawn_id $spawn_id
-#    send_user [list $KPROPD -S -d -P [expr 10 + $portbase] -s $tmppwd/srvtab -f $tmppwd/incoming-replica-datatrans -p $KDB5_UTIL -a $tmppwd/kpropd-acl]\n
-#    spawn_shell
     envstack_pop
 }
 
@@ -1859,13 +1857,13 @@ proc add_random_key { kkey standalone } {
     }
 }
 
-# setup_srvtab
-# Set up a srvtab file.  start_kerberos_daemons and add_random_key
+# setup_keytab
+# Set up a keytab file.  start_kerberos_daemons and add_random_key
 # $id/$hostname must be called before this procedure.  If the
 # argument is non-zero, call pass at relevant points.  Returns 1 on
 # success, 0 on failure. If the id field is not provided, host is used.
 
-proc setup_srvtab { standalone {id host} } {
+proc setup_keytab { standalone {id host} } {
     global REALMNAME
     global KADMIN_LOCAL
     global KEY
@@ -1874,17 +1872,17 @@ proc setup_srvtab { standalone {id host} } {
     global spawn_id
     global last_service
 
-    if {!$standalone && [file exists $tmppwd/srvtab] && $last_service == $id} {
+    if {!$standalone && [file exists $tmppwd/keytab] && $last_service == $id} {
        return 1
     }
 
-    file delete $tmppwd/srvtab $tmppwd/srvtab.old
+    file delete $tmppwd/keytab $tmppwd/keytab.old
 
     if ![get_hostname] {
        return 0
     }
 
-    file delete $hostname-new-srvtab
+    file delete $hostname-new-keytab
 
     envstack_push
     setup_kerberos_env kdc
@@ -1892,40 +1890,40 @@ proc setup_srvtab { standalone {id host} } {
     envstack_pop
     expect_after {
        -re "(.*)\r\nkadmin.local:  " {
-           fail "kadmin.local srvtab (unmatched output: $expect_out(1,string))"
+           fail "kadmin.local keytab (unmatched output: $expect_out(1,string))"
            if {!$standalone} {
-               file delete $tmppwd/srvtab
+               file delete $tmppwd/keytab
            }
            catch "expect_after"
            return 0
        }
        timeout {
-           fail "kadmin.local srvtab"
+           fail "kadmin.local keytab"
            if {!$standalone} {
-               file delete $tmppwd/srvtab
+               file delete $tmppwd/keytab
            }
            catch "expect_after"
            return 0
        }
        eof {
-           fail "kadmin.local srvtab"
+           fail "kadmin.local keytab"
            if {!$standalone} {
-               file delete $tmppwd/srvtab
+               file delete $tmppwd/keytab
            }
            catch "expect_after"
            return 0
        }
     }
     expect "kadmin.local:  "
-    send "xst -k $hostname-new-srvtab $id/$hostname kiprop/$hostname\r"
-    expect "xst -k $hostname-new-srvtab $id/$hostname kiprop/$hostname\r\n"
+    send "xst -k $hostname-new-keytab $id/$hostname kiprop/$hostname\r"
+    expect "xst -k $hostname-new-keytab $id/$hostname kiprop/$hostname\r\n"
     expect {
-       -re ".*Entry for principal $id/$hostname.* added to keytab WRFILE:$hostname-new-srvtab." { }
+       -re ".*Entry for principal $id/$hostname.* added to keytab WRFILE:$hostname-new-keytab." { }
        -re "\r\nkadmin.local:  " {
            if {$standalone} {
-               fail "kadmin.local srvtab"
+               fail "kadmin.local keytab"
            } else {
-               file delete $tmppwd/srvtab
+               file delete $tmppwd/keytab
            }
            catch expect_after
            return 0
@@ -1935,27 +1933,27 @@ proc setup_srvtab { standalone {id host} } {
     send "quit\r"
     expect eof
     catch expect_after
-    if ![check_exit_status "kadmin.local srvtab"] {
+    if ![check_exit_status "kadmin.local keytab"] {
        if {!$standalone} {
-           file delete $tmppwd/srvtab
+           file delete $tmppwd/keytab
        }
        return 0
     }
 
-    catch "exec mv -f $hostname-new-srvtab $tmppwd/srvtab" exec_output
+    catch "exec mv -f $hostname-new-keytab $tmppwd/keytab" exec_output
     if ![string match "" $exec_output] {
        verbose -log "$exec_output"
-       perror "can't mv new srvtab"
+       perror "can't mv new keytab"
        return 0
     }
 
     if {$standalone} {
-       pass "kadmin.local srvtab"
+       pass "kadmin.local keytab"
     }
 
-    # Make the srvtab file globally readable in case we are using a
-    # root shell and the srvtab is NFS mounted.
-    catch "exec chmod a+r $tmppwd/srvtab"
+    # Make the keytab file globally readable in case we are using a
+    # root shell and the keytab is NFS mounted.
+    catch "exec chmod a+r $tmppwd/keytab"
 
     # Remember what we just extracted
     set last_service $id
index 582e087197704d84560e948d21c2e886de0ec5f6..e3357e769de8509c0f4d4339df81c1f3ca253f0c 100644 (file)
@@ -238,9 +238,9 @@ proc doit { } {
        perror "failed to set up gssservice/$hostname key"
     }
 
-    # Use kdb5_edit to create a srvtab entry for gssservice
-    if ![setup_srvtab 0 gssservice] {
-       perror "failed to set up gssservice srvtab"
+    # Use kdb5_edit to create a keytab entry for gssservice
+    if ![setup_keytab 0 gssservice] {
+       perror "failed to set up gssservice keytab"
     }
 
     catch "exec rm -f $tmppwd/gss_tk_0 $tmppwd/gss_tk_1 $tmppwd/gss_tk_2 $tmppwd/gss_tk_3"
@@ -278,7 +278,7 @@ proc doit { } {
     #
     # set KRB5CCNAME and KRB5_KTNAME
     #
-    set env(KRB5_KTNAME) FILE:$tmppwd/srvtab
+    set env(KRB5_KTNAME) FILE:$tmppwd/keytab
     verbose "KRB5_KTNAME=$env(KRB5_KTNAME)"
 
     # Now start the gss-server.
index 33fc34a7bb08929975399d1fc42f769aa9c98fd9..36a345258b41e97fdd06ecb191f770a1c1f36152 100644 (file)
@@ -457,62 +457,16 @@ proc kadmin_extract { instance name } {
     expect -re "assword\[^\r\n\]*: *" {
        send "adminpass$KEY\r"
     }
-#    expect -re "kadmin: Entry for principal $name/$instance with kvno [0-9], encryption type .* added to keytab WRFILE:$tmppwd/keytab."
     expect_after
     expect eof
     set k_stat [wait -i $spawn_id]
     verbose "wait -i $spawn_id returned $k_stat (kadmin xst)"
     catch "close -i $spawn_id"
-    catch "exec rm -f $instance-new-srvtab"
+    catch "exec rm -f $instance-new-keytab"
     pass "kadmin xst $instance $name"
     return 1
 }
 
-#++
-# kadmin_extractv4     - Test extract service key in v4 format function of
-#                        kadmin.
-#
-# Extracts service key for service name $name instance $instance in version
-# 4 format.  Returns 1 on success.
-#--
-#proc kadmin_extractv4 { instance name } {
-#    global REALMNAME
-#    global KADMIN
-#    global KEY
-#    global spawn_id
-#
-#    spawn $KADMIN -p krbtest/admin@$REALMNAME -q "xst4 $instance $name"
-#    expect_after {
-#      "Cannot contact any KDC" {
-#          fail "kadmin xst4 $instance $name lost KDC"
-#          catch "expect_after"
-#          return 0
-#      }
-#      timeout {
-#          fail "kadmin xst4 $instance $name"
-#          catch "expect_after"
-#          return 0
-#      }
-#      eof {
-#          fail "kadmin xst4 $instance $name"
-#          catch "expect_after"
-#          return 0
-#      }
-#    }
-#    expect -re "assword\[^\r\n\]*: *" {
-#      send "adminpass$KEY\r"
-#    }
-#    expect "extracted entry $name to key table $instance-new-v4-srvtab"
-#    expect_after
-#    expect eof
-#    set k_stat [wait -i $spawn_id]
-#    verbose "wait -i $spawn_id returned $k_stat (kadmin xst4)"
-#    catch "close -i $spawn_id"
-#    catch "exec rm -f $instance-new-v4-srvtab"
-#    pass "kadmin xst4 $instance $name"
-#    return 1
-#}
-
 #++
 # kadmin_delete        - Test delete principal function of kadmin.
 #
index 2221a65e401c4a4a9ebd4622438a61ca7f2f1bb1..f71ee8638b77ec48b87fad101abefa95887cf762 100644 (file)
@@ -72,8 +72,8 @@ proc doit { } {
        fail "kprop (host key)"
        return
     }
-    if ![setup_srvtab 0] {
-       fail "kprop (srvtab)"
+    if ![setup_keytab 0] {
+       fail "kprop (keytab)"
        return
     }
 
@@ -99,7 +99,7 @@ proc doit { } {
     sleep 1
 
     # Try a propagation.
-    spawn $KPROP -f $tmppwd/replica_datatrans -P [expr 10 + $portbase] -s $tmppwd/srvtab $hostname
+    spawn $KPROP -f $tmppwd/replica_datatrans -P [expr 10 + $portbase] -s $tmppwd/keytab $hostname
     expect eof
     set kprop_exit [check_exit_status "kprop (exit status)"]
     # log output for debugging
index 326f1848d47c6886a9f6afbe58d888cd138def3d..93a75f1d0d414d31265a6393c7f20c52af0ff929 100644 (file)
@@ -42,7 +42,7 @@ proc start_sserver_daemon { inetd } {
     # if inetd = 0, then we are running stand-alone
     if !{$inetd} {
            # Start the sserver
-           spawn $SSERVER -p [expr 8 + $portbase] -S $tmppwd/srvtab
+           spawn $SSERVER -p [expr 8 + $portbase] -S $tmppwd/keytab
            set sserver_pid [exp_pid]
            set sserver_spawn_id $spawn_id
 
@@ -52,7 +52,7 @@ proc start_sserver_daemon { inetd } {
            sleep 2
     } else {
            # Start the sserver
-           spawn $T_INETD [expr 8 + $portbase] $SSERVER sserver -S $tmppwd/srvtab
+           spawn $T_INETD [expr 8 + $portbase] $SSERVER sserver -S $tmppwd/keytab
            set sserver_pid [exp_pid]
            set sserver_spawn_id $spawn_id
 
@@ -166,8 +166,8 @@ proc doit { } {
        return
     }
 
-    # Use ksrvutil to create a srvtab entry for sample
-    if ![setup_srvtab 1 sample] {
+    # Use ksrvutil to create a keytab entry for sample
+    if ![setup_keytab 1 sample] {
        return
     }
 
index fa749035fc051b005bdd5f7582d5200c0996228d..d8b218248d0109d70c1551e37bbb37fc47a90343 100644 (file)
@@ -40,7 +40,7 @@ proc start_sim_server_daemon { } {
     global portbase
 
     # Start the sim_server
-    spawn $SIM_SERVER -p [expr 8 + $portbase] -S $tmppwd/srvtab
+    spawn $SIM_SERVER -p [expr 8 + $portbase] -S $tmppwd/keytab
     set sim_server_pid [exp_pid]
     set sim_server_spawn_id $spawn_id
 
@@ -179,8 +179,8 @@ proc doit { } {
        return
     }
 
-    # Use ksrvutil to create a srvtab entry for sample
-    if ![setup_srvtab 1 sample] {
+    # Use ksrvutil to create a keytab entry for sample
+    if ![setup_keytab 1 sample] {
        return
     }
 
index 5b5970fbaead8520981f2fc1002df7e312f0d74a..d284297e85d69e098b427ca0ab575ff82871911b 100644 (file)
@@ -166,8 +166,8 @@ proc doit { } {
     verbose "wait -i $spawn_id returned $k_stat (kadmin addpol)"
     catch "close -i $spawn_id"
 
-    # Use ksrvutil to create a srvtab entry.
-    if ![setup_srvtab 1] {
+    # Use ksrvutil to create a keytab entry.
+    if ![setup_keytab 1] {
        return
     }
 
index db09b895e586f70c992dac081a90c321b01025b5..df3195bb6e01566b22ef0a8d29e853cc8f681e29 100644 (file)
@@ -33,11 +33,6 @@ proc doit { } {
        return
     }
 
-    # Use ksrvutil to create a srvtab entry.
-#    if ![setup_srvtab 1] {
-#      return
-#    }
-
     # Use kinit to get a ticket.
     if ![kinit krbtest/admin adminpass$KEY 1] {
        return