--- /dev/null
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/copyright.h>.
+ *
+ * krb5_ktfile_add()
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char rcsid_ktf_add_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/krb5_err.h>
+#include <krb5/ext-proto.h>
+
+#include "ktfile.h"
+
+krb5_error_code
+krb5_ktfile_add(id, entry)
+krb5_keytab id;
+krb5_keytab_entry *entry;
+{
+ krb5_error_code retval;
+
+ if (retval = krb5_ktfileint_openw(id))
+ return retval;
+ if (fseek(KTFILEP(id), 0, 2) == -1)
+ return KRB5_KT_END;
+ retval = krb5_ktfileint_write_entry(id, entry);
+ krb5_ktfileint_close(id);
+ return retval;
+}
--- /dev/null
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/copyright.h>.
+ *
+ * krb5_ktfile_end_get()
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char rcsid_ktf_endget_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/ext-proto.h>
+
+#include "ktfile.h"
+
+krb5_error_code
+krb5_ktfile_end_get(id, cursor)
+krb5_keytab id;
+krb5_kt_cursor cursor;
+{
+ xfree(cursor);
+ return krb5_ktfileint_close(id);
+}
--- /dev/null
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/copyright.h>.
+ *
+ * krb5_ktfile_get_next()
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char rcsid_ktf_next_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/krb5_err.h>
+#include <krb5/ext-proto.h>
+
+#include "ktfile.h"
+
+krb5_error_code
+krb5_ktfile_get_next(id, entry, cursor)
+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_ktfileint_read_entry(id, &cur_entry))
+ return kerror;
+ *entry = *cur_entry;
+ xfree(cur_entry);
+ return 0;
+}
--- /dev/null
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/copyright.h>.
+ *
+ * krb5_ktfile_add()
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char rcsid_ktf_add_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/krb5_err.h>
+#include <krb5/ext-proto.h>
+#include <errno.h>
+
+#include "ktfile.h"
+
+krb5_error_code
+krb5_ktfile_remove(id, entry)
+krb5_keytab id;
+krb5_keytab_entry *entry;
+{
+ return EOPNOTSUPP;
+}
--- /dev/null
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/copyright.h>.
+ *
+ * krb5_ktfile_start_seq_get()
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char rcsid_ktf_ssget_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/ext-proto.h>
+#include <errno.h>
+
+#include "ktfile.h"
+
+krb5_error_code
+krb5_ktfile_start_seq_get(id, cursorp)
+krb5_keytab id;
+krb5_kt_cursor *cursorp;
+{
+ krb5_error_code retval;
+ long *fileoff;
+
+ if (retval = krb5_ktfileint_openr(id))
+ return retval;
+
+ if (!(fileoff = (long *)malloc(sizeof(*fileoff)))) {
+ krb5_ktfileint_close(id);
+ return ENOMEM;
+ }
+ *fileoff = ftell(KTFILEP(id));
+ cursorp = (krb5_kt_cursor *)fileoff;
+
+ return 0;
+}