summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/ccache/memory
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2000-07-14 22:47:27 +0000
committerKen Raeburn <raeburn@mit.edu>2000-07-14 22:47:27 +0000
commit86cd2e57aca75d613f0fae35a29523d9cc4d15bf (patch)
tree082950331c7342b179cf58e1b2f3658c253046f4 /src/lib/krb5/ccache/memory
parent39da3633bd6543dda762295a467c24ee91897781 (diff)
Delete subdirectories we aren't compiling any more.
Rescued contents of "README", "todo", and test cases. Test cases aren't actually used at present; this should be fixed, but they'll probably need some work. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12547 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/ccache/memory')
-rw-r--r--src/lib/krb5/ccache/memory/.Sanitize54
-rw-r--r--src/lib/krb5/ccache/memory/.rconf1
-rw-r--r--src/lib/krb5/ccache/memory/ChangeLog89
-rw-r--r--src/lib/krb5/ccache/memory/Makefile.in41
-rw-r--r--src/lib/krb5/ccache/memory/mcc-proto.h97
-rw-r--r--src/lib/krb5/ccache/memory/mcc.h57
-rw-r--r--src/lib/krb5/ccache/memory/mcc_close.c49
-rw-r--r--src/lib/krb5/ccache/memory/mcc_destry.c86
-rw-r--r--src/lib/krb5/ccache/memory/mcc_eseq.c56
-rw-r--r--src/lib/krb5/ccache/memory/mcc_gennew.c95
-rw-r--r--src/lib/krb5/ccache/memory/mcc_getnam.c47
-rw-r--r--src/lib/krb5/ccache/memory/mcc_gprin.c61
-rw-r--r--src/lib/krb5/ccache/memory/mcc_init.c60
-rw-r--r--src/lib/krb5/ccache/memory/mcc_nseq.c115
-rw-r--r--src/lib/krb5/ccache/memory/mcc_ops.c53
-rw-r--r--src/lib/krb5/ccache/memory/mcc_reslv.c103
-rw-r--r--src/lib/krb5/ccache/memory/mcc_retrv.c248
-rw-r--r--src/lib/krb5/ccache/memory/mcc_sflags.c53
-rw-r--r--src/lib/krb5/ccache/memory/mcc_sseq.c57
-rw-r--r--src/lib/krb5/ccache/memory/mcc_store.c46
-rw-r--r--src/lib/krb5/ccache/memory/mcc_test.c140
21 files changed, 0 insertions, 1608 deletions
diff --git a/src/lib/krb5/ccache/memory/.Sanitize b/src/lib/krb5/ccache/memory/.Sanitize
deleted file mode 100644
index 1c7116a8c..000000000
--- a/src/lib/krb5/ccache/memory/.Sanitize
+++ /dev/null
@@ -1,54 +0,0 @@
-# Sanitize.in for Kerberos V5
-
-# Each directory to survive it's way into a release will need a file
-# like this one called "./.Sanitize". All keyword lines must exist,
-# and must exist in the order specified by this file. Each directory
-# in the tree will be processed, top down, in the following order.
-
-# Hash started lines like this one are comments and will be deleted
-# before anything else is done. Blank lines will also be squashed
-# out.
-
-# The lines between the "Do-first:" line and the "Things-to-keep:"
-# line are executed as a /bin/sh shell script before anything else is
-# done in this
-
-Do-first:
-
-# All files listed between the "Things-to-keep:" line and the
-# "Files-to-sed:" line will be kept. All other files will be removed.
-# Directories listed in this section will have their own Sanitize
-# called. Directories not listed will be removed in their entirety
-# with rm -rf.
-
-Things-to-keep:
-
-.cvsignore
-.rconf
-ChangeLog
-Makefile.in
-configure
-configure.in
-mcc-proto.h
-mcc.h
-mcc_close.c
-mcc_destry.c
-mcc_eseq.c
-mcc_gennew.c
-mcc_getnam.c
-mcc_gprin.c
-mcc_init.c
-mcc_nseq.c
-mcc_ops.c
-mcc_reslv.c
-mcc_retrv.c
-mcc_sflags.c
-mcc_sseq.c
-mcc_store.c
-mcc_test.c
-
-Things-to-lose:
-
-Do-last:
-
-# End of file.
diff --git a/src/lib/krb5/ccache/memory/.rconf b/src/lib/krb5/ccache/memory/.rconf
deleted file mode 100644
index dd88165d7..000000000
--- a/src/lib/krb5/ccache/memory/.rconf
+++ /dev/null
@@ -1 +0,0 @@
-ignore mcc_test.c
diff --git a/src/lib/krb5/ccache/memory/ChangeLog b/src/lib/krb5/ccache/memory/ChangeLog
deleted file mode 100644
index 6df731889..000000000
--- a/src/lib/krb5/ccache/memory/ChangeLog
+++ /dev/null
@@ -1,89 +0,0 @@
-1999-11-23 Ken Raeburn <raeburn@mit.edu>
-
- * mcc.h (mcc_head): Define as macro to give exported name a krb5
- prefix.
-
-1999-10-26 Wilfredo Sanchez <tritan@mit.edu>
-
- * Makefile.in: Clean up usage of CFLAGS, CPPFLAGS, DEFS, DEFINES,
- LOCAL_INCLUDES such that one can override CFLAGS from the command
- line without losing CPP search patchs and defines. Some associated
- Makefile cleanup.
-
-1999-08-23 Ken Raeburn <raeburn@mit.edu>
-
- * mcc_retrv.c (krb5_mcc_retrieve): Replace with a version that
- calls krb5_cc_retrieve_cred_default.
-
-Mon May 10 15:25:06 1999 Danilo Almeida <dalmeida@mit.edu>
-
- * Makefile.in: Do win32 build in subdir.
-
-1998-11-13 Theodore Ts'o <tytso@rsts-11.mit.edu>
-
- * Makefile.in: Set the myfulldir and mydir variables (which are
- relative to buildtop and thisconfigdir, respectively.)
-
-1998-05-27 Theodore Ts'o <tytso@rsts-11.mit.edu>
-
- * Makefile.in: Update Makefile so that it can be built under
- Windows
-
-Fri Feb 27 18:03:33 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
-
- * Makefile.in: Changed thisconfigdir to point at the lib/krb5
- directory, since we've moved all of the configure.in
- tests to the toplevel lib/krb5 configure.in
-
-Wed Feb 18 16:20:15 1998 Tom Yu <tlyu@mit.edu>
-
- * Makefile.in: Remove trailing slash from thisconfigdir. Fix up
- BUILDTOP for new conventions.
-
-Mon Feb 2 17:02:29 1998 Theodore Ts'o <tytso@rsts-11.mit.edu>
-
- * Makefile.in: Define BUILDTOP and thisconfigdir in the Makefile
-
-Mon Sep 15 15:15:33 1997 Ezra Peisach <epeisach@mit.edu>
-
- * mcc-proto.h, mcc_reslv.c (krb5_mcc_resolve): Incoming name
- is const char *
-
-Thu Jan 2 17:02:00 1997 Tom Yu <tlyu@mit.edu>
-
- * Makefile.in:
- * configure.in: Update to new library build procedure.
-
-Thu Aug 15 16:48:22 1996 Tom Yu <tlyu@mit.edu>
-
- * mcc_retrv.c: Add parens to def'n of flags_match because == has
- higher precedence than &. (noticed by -Wall)
-
-Tue Jun 11 20:15:01 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
-
- * mcc_close.c (krb5_mcc_close): Remove inclusion of malloc.h
-
-Thu Feb 1 15:47:25 1996 Sam Hartman <hartmans@tertius.mit.edu>
-
- * mcc_retrv.c (ktype_reasonable): removed.
- (krb5_mcc_retrieve): Accept any enctype unless matching spefic enctype match.
-
-Thu Jan 25 14:50:51 1996 Sam Hartman <hartmans@tertius.mit.edu>
-
- * mcc_retrv.c (ktype_reasonable): Rename ktype_match
- (krb5_mcc_retrieve): Match enctype exactly if requested.
-
-Sat Nov 4 00:45:42 1995 Theodore Y. Ts'o <tytso@dcl>
-
- * mcc_ops.c: Remove excess code which is defined in fcc_ops.c
- (which may not be the right place for it anyway).
-
- * mcc.h: Remove use of krb5_ccache_sessions
-
- * mcc_destry.c (krb5_mcc_destroy): Remove use of krb5_ccache_sessions
-
- * mcc_gennew.c (krb5_mcc_generate_new): Remove use of
- krb5_ccache_sessions
-
- * mcc_reslv.c (krb5_mcc_resolve): Remove use of krb5_ccache_sessions
-
diff --git a/src/lib/krb5/ccache/memory/Makefile.in b/src/lib/krb5/ccache/memory/Makefile.in
deleted file mode 100644
index fbe248fb8..000000000
--- a/src/lib/krb5/ccache/memory/Makefile.in
+++ /dev/null
@@ -1,41 +0,0 @@
-thisconfigdir=./../..
-myfulldir=lib/krb5/ccache/memory
-mydir=ccache/memory
-BUILDTOP=$(REL)$(U)$(S)$(U)$(S)$(U)$(S)$(U)
-
-##DOS##BUILDTOP = ..\..\..\..
-##DOS##PREFIXDIR = ccache\memory
-##DOS##OBJFILE = $(OUTPRE)file.lst
-##WIN16##LIBNAME=..\..\krb5.lib
-
-
-STLIBOBJS = \
- mcc_close.o mcc_destry.o mcc_eseq.o \
- mcc_gennew.o mcc_getnam.o mcc_gprin.o \
- mcc_init.o mcc_nseq.o \
- mcc_reslv.o mcc_retrv.o mcc_sseq.o \
- mcc_store.o mcc_ops.o \
- mcc_sflags.o
-
-OBJS = $(OUTPRE)mcc_close.$(OBJEXT) $(OUTPRE)mcc_destry.$(OBJEXT) $(OUTPRE)mcc_eseq.$(OBJEXT) \
- $(OUTPRE)mcc_gennew.$(OBJEXT) $(OUTPRE)mcc_getnam.$(OBJEXT) $(OUTPRE)mcc_gprin.$(OBJEXT) \
- $(OUTPRE)mcc_init.$(OBJEXT) $(OUTPRE)mcc_nseq.$(OBJEXT) \
- $(OUTPRE)mcc_reslv.$(OBJEXT) $(OUTPRE)mcc_retrv.$(OBJEXT) $(OUTPRE)mcc_sseq.$(OBJEXT) \
- $(OUTPRE)mcc_store.$(OBJEXT) $(OUTPRE)mcc_ops.$(OBJEXT) \
- $(OUTPRE)mcc_sflags.$(OBJEXT)
-
-SRCS = $(srcdir)/mcc_close.c $(srcdir)/mcc_destry.c $(srcdir)/mcc_eseq.c \
- $(srcdir)/mcc_gennew.c $(srcdir)/mcc_getnam.c $(srcdir)/mcc_gprin.c \
- $(srcdir)/mcc_init.c $(srcdir)/mcc_nseq.c \
- $(srcdir)/mcc_reslv.c $(srcdir)/mcc_retrv.c $(srcdir)/mcc_sseq.c \
- $(srcdir)/mcc_store.c $(srcdir)/mcc_ops.c \
- $(srcdir)/mcc_sflags.c
-
-##DOS##LIBOBJS = $(OBJS)
-
-all-unix:: all-libobjs
-all-windows:: $(OBJS)
-
-clean-unix:: clean-libobjs
-
-clean-windows::
diff --git a/src/lib/krb5/ccache/memory/mcc-proto.h b/src/lib/krb5/ccache/memory/mcc-proto.h
deleted file mode 100644
index dc065bad7..000000000
--- a/src/lib/krb5/ccache/memory/mcc-proto.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * lib/krb5/ccache/memory/mcc-proto.h
- *
- * 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.
- *
- *
- * Prototypes for Memory-based credentials cache
- */
-
-
-#ifndef KRB5_MCC_PROTO__
-#define KRB5_MCC_PROTO__
-
-/* mcc_close.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_close
- PROTOTYPE((krb5_context, krb5_ccache id ));
-
-/* mcc_destry.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_destroy
- PROTOTYPE((krb5_context, krb5_ccache id ));
-
-/* mcc_eseq.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_end_seq_get
- PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor ));
-
-/* mcc_gennew.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_generate_new
- PROTOTYPE((krb5_context, krb5_ccache *id ));
-
-/* mcc_getnam.c */
-char * KRB5_CALLCONV krb5_mcc_get_name
- PROTOTYPE((krb5_context, krb5_ccache id ));
-
-/* mcc_gprin.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_get_principal
- PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal *princ ));
-
-/* mcc_init.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_initialize
- PROTOTYPE((krb5_context, krb5_ccache id , krb5_principal princ ));
-
-/* mcc_nseq.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_next_cred
- PROTOTYPE((krb5_context,
- krb5_ccache id ,
- krb5_cc_cursor *cursor ,
- krb5_creds *creds ));
-
-/* mcc_reslv.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_resolve
- PROTOTYPE((krb5_context, krb5_ccache *id , const char *residual ));
-
-/* mcc_retrv.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_retrieve
- PROTOTYPE((krb5_context,
- krb5_ccache id ,
- krb5_flags whichfields ,
- krb5_creds *mcreds ,
- krb5_creds *creds ));
-
-/* mcc_sseq.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_start_seq_get
- PROTOTYPE((krb5_context, krb5_ccache id , krb5_cc_cursor *cursor ));
-
-/* mcc_store.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_store
- PROTOTYPE((krb5_context, krb5_ccache id , krb5_creds *creds ));
-
-/* mcc_sflags.c */
-krb5_error_code KRB5_CALLCONV krb5_mcc_set_flags
- PROTOTYPE((krb5_context, krb5_ccache id , krb5_flags flags ));
-
-/* mcc_ops.c */
-extern krb5_cc_ops krb5_mcc_ops;
-krb5_error_code krb5_change_cache
- PROTOTYPE(());
-#endif /* KRB5_MCC_PROTO__ */
diff --git a/src/lib/krb5/ccache/memory/mcc.h b/src/lib/krb5/ccache/memory/mcc.h
deleted file mode 100644
index 97cb05c2b..000000000
--- a/src/lib/krb5/ccache/memory/mcc.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * lib/krb5/ccache/memory/mcc.h
- *
- * 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.
- *
- *
- * This file contains constant and function declarations used in the
- * memory-based credential cache routines.
- */
-
-#ifndef __KRB5_MEMORY_CCACHE__
-#define __KRB5_MEMORY_CCACHE__
-
-#include "k5-int.h"
-#include "mcc-proto.h"
-
-#define KRB5_OK 0
-
-typedef struct _krb5_mcc_link {
- struct _krb5_mcc_link *next;
- krb5_creds *creds;
-} krb5_mcc_link, FAR *krb5_mcc_cursor;
-
-typedef struct _krb5_mcc_data {
- struct _krb5_mcc_data *next;
- char *name;
- krb5_principal prin;
- krb5_mcc_cursor link;
-} krb5_mcc_data;
-
-#define mcc_head krb5int_mcc_head
-extern krb5_mcc_data FAR *mcc_head;
-#if 0
-extern int krb5_cache_sessions;
-#endif
-
-#endif /* __KRB5_MEMORY_CCACHE__ */
diff --git a/src/lib/krb5/ccache/memory/mcc_close.c b/src/lib/krb5/ccache/memory/mcc_close.c
deleted file mode 100644
index 9125f1d1e..000000000
--- a/src/lib/krb5/ccache/memory/mcc_close.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_close.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_close.
- */
-
-
-
-#include "mcc.h"
-/*
- * Modifies:
- * id
- *
- * Effects:
- * Closes the file cache, invalidates the id, and frees any resources
- * associated with the cache.
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_close(context, id)
- krb5_context context;
- krb5_ccache id;
-{
- krb5_xfree(id);
-
- return KRB5_OK;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_destry.c b/src/lib/krb5/ccache/memory/mcc_destry.c
deleted file mode 100644
index 4d70038eb..000000000
--- a/src/lib/krb5/ccache/memory/mcc_destry.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * lib/krb5/ccache/memory/mcc_destry.c
- *
- * Copyright 1990 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.
- *
- *
- * This file contains the source code for krb5_mcc_destroy.
- */
-
-#include <errno.h>
-#include "mcc.h"
-
-void
-krb5_mcc_free(context, id)
- krb5_context context;
- krb5_ccache id;
-{
- krb5_mcc_cursor curr,next;
-
- for (curr = ((krb5_mcc_data *)id->data)->link; curr;)
- {
- krb5_free_creds(context, curr->creds);
- next = curr->next;
- krb5_xfree(curr);
- curr = next;
- }
- ((krb5_mcc_data *)id->data)->link = NULL;
- krb5_free_principal(context, ((krb5_mcc_data *)id->data)->prin);
-}
-
-/*
- * Effects:
- * Destroys the contents of id.
- *
- * Errors:
- * none
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_destroy(context, id)
- krb5_context context;
- krb5_ccache id;
-{
- krb5_mcc_data *curr;
-
- if (mcc_head && ((krb5_mcc_data *)id->data) == mcc_head)
- mcc_head = mcc_head->next;
- else {
- for (curr=mcc_head; curr; curr=curr->next)
- if (curr->next == ((krb5_mcc_data *)id->data)) {
- curr->next = curr->next->next;
- break;
- }
- }
-
- krb5_mcc_free(context, id);
-
- krb5_xfree(((krb5_mcc_data *)id->data)->name);
- krb5_xfree(id->data);
- krb5_xfree(id);
-#if 0
- --krb5_cache_sessions;
-#endif
-
- krb5_change_cache ();
- return KRB5_OK;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_eseq.c b/src/lib/krb5/ccache/memory/mcc_eseq.c
deleted file mode 100644
index c567d21f6..000000000
--- a/src/lib/krb5/ccache/memory/mcc_eseq.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * lib/krb5/ccache/memory/mcc_eseq.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_end_seq_get.
- */
-
-
-#include "mcc.h"
-
-/*
- * Requires:
- * cursor is a krb5_cc_cursor originally obtained from
- * krb5_mcc_start_seq_get.
- *
- * Modifies:
- * id, cursor
- *
- * Effects:
- * Finishes sequential processing of the file credentials ccache id,
- * and invalidates the cursor (it must never be used after this call).
- */
-/* ARGSUSED */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_end_seq_get(context, id, cursor)
- krb5_context context;
- krb5_ccache id;
- krb5_cc_cursor *cursor;
-{
- *cursor = 0L;
- return KRB5_OK;
-}
-
-
diff --git a/src/lib/krb5/ccache/memory/mcc_gennew.c b/src/lib/krb5/ccache/memory/mcc_gennew.c
deleted file mode 100644
index 8720a6168..000000000
--- a/src/lib/krb5/ccache/memory/mcc_gennew.c
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * lib/krb5/ccache/memory/mcc_gennew.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_generate_new.
- */
-
-#include "mcc.h"
-#include "k5-int.h"
-
-extern krb5_cc_ops krb5_mcc_ops;
-
-/*
- * Effects:
- * Creates a new file cred cache whose name is guaranteed to be
- * unique. The name begins with the string TKT_ROOT (from mcc.h).
- * The cache is not opened, but the new filename is reserved.
- *
- * Returns:
- * The filled in krb5_ccache id.
- *
- * Errors:
- * KRB5_CC_NOMEM - there was insufficient memory to allocate the
- * krb5_ccache. id is undefined.
- * system errors (from open)
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_generate_new (context, id)
- krb5_context context;
- krb5_ccache *id;
-{
- krb5_ccache lid;
- char scratch[6+1]; /* 6 for the scratch part, +1 for NUL */
-
- /* Allocate memory */
- lid = (krb5_ccache) malloc(sizeof(struct _krb5_ccache));
- if (lid == NULL)
- return KRB5_CC_NOMEM;
-
- lid->ops = &krb5_mcc_ops;
-
- (void) strcpy(scratch, "XXXXXX");
- mktemp(scratch);
-
- lid->data = (krb5_pointer) malloc(sizeof(krb5_mcc_data));
- if (lid->data == NULL) {
- krb5_xfree(lid);
- return KRB5_CC_NOMEM;
- }
-
- ((krb5_mcc_data *) lid->data)->name = (char *)
- malloc(strlen(scratch) + 1);
- if (((krb5_mcc_data *) lid->data)->name == NULL) {
- krb5_xfree(((krb5_mcc_data *) lid->data));
- krb5_xfree(lid);
- return KRB5_CC_NOMEM;
- }
- ((krb5_mcc_data *) lid->data)->link = NULL;
- ((krb5_mcc_data *) lid->data)->prin = NULL;
-
- /* Set up the filename */
- strcpy(((krb5_mcc_data *) lid->data)->name, scratch);
-
- *id = lid;
-#if 0
- ++krb5_cache_sessions;
-#endif
- ((krb5_mcc_data *)lid->data)->next = mcc_head;
- mcc_head = (krb5_mcc_data *)lid->data;
-
- krb5_change_cache ();
- return KRB5_OK;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_getnam.c b/src/lib/krb5/ccache/memory/mcc_getnam.c
deleted file mode 100644
index f4c611992..000000000
--- a/src/lib/krb5/ccache/memory/mcc_getnam.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_getnam.c
- *
- * Copyright 1990 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.
- *
- *
- * This file contains the source code for krb5_mcc_get_name.
- */
-
-
-
-#include "mcc.h"
-
-/*
- * Requires:
- * id is a file credential cache
- *
- * Returns:
- * The name of the file cred cache id.
- */
-char * KRB5_CALLCONV
-krb5_mcc_get_name (context, id)
- krb5_context context;
- krb5_ccache id;
-{
- return (char *) ((krb5_mcc_data *) id->data)->name;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_gprin.c b/src/lib/krb5/ccache/memory/mcc_gprin.c
deleted file mode 100644
index 90d02ca54..000000000
--- a/src/lib/krb5/ccache/memory/mcc_gprin.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_gprin.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_get_principal.
- */
-
-
-#include "mcc.h"
-
-/*
- * Modifies:
- * id, princ
- *
- * Effects:
- * Retrieves the primary principal from id, as set with
- * krb5_mcc_initialize. The principal is returned is allocated
- * storage that must be freed by the caller via krb5_free_principal.
- *
- * Errors:
- * system errors
- * KRB5_CC_NOMEM
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_get_principal(context, id, princ)
- krb5_context context;
- krb5_ccache id;
- krb5_principal *princ;
-{
- krb5_mcc_data *ptr = (krb5_mcc_data *)id->data;
- if (!ptr->prin)
- {
- *princ = 0L;
- return KRB5_FCC_NOFILE;
- }
- return krb5_copy_principal(context, ptr->prin, princ);
-}
-
-
diff --git a/src/lib/krb5/ccache/memory/mcc_init.c b/src/lib/krb5/ccache/memory/mcc_init.c
deleted file mode 100644
index 773e24197..000000000
--- a/src/lib/krb5/ccache/memory/mcc_init.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * lib/krb5/ccache/memory/mcc_init.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_initialize.
- */
-
-#include "mcc.h"
-
-/*
- * Modifies:
- * id
- *
- * Effects:
- * Creates/refreshes the file cred cache id. If the cache exists, its
- * contents are destroyed.
- *
- * Errors:
- * system errors
- * permission errors
- */
-void krb5_mcc_free KRB5_PROTOTYPE((krb5_context context, krb5_ccache id));
-
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_initialize(context, id, princ)
- krb5_context context;
- krb5_ccache id;
- krb5_principal princ;
-{
- krb5_error_code ret;
-
- krb5_mcc_free(context, id);
- ret = krb5_copy_principal(context, princ,
- &((krb5_mcc_data *)id->data)->prin);
- if (ret == KRB5_OK)
- krb5_change_cache();
- return ret;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_nseq.c b/src/lib/krb5/ccache/memory/mcc_nseq.c
deleted file mode 100644
index 3b533a291..000000000
--- a/src/lib/krb5/ccache/memory/mcc_nseq.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_nseq.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_next_cred.
- */
-
-#include "mcc.h"
-
-/*
- * Requires:
- * cursor is a krb5_cc_cursor originally obtained from
- * krb5_mcc_start_seq_get.
- *
- * Modifes:
- * cursor, creds
- *
- * Effects:
- * Fills in creds with the "next" credentals structure from the cache
- * id. The actual order the creds are returned in is arbitrary.
- * Space is allocated for the variable length fields in the
- * credentials structure, so the object returned must be passed to
- * krb5_destroy_credential.
- *
- * The cursor is updated for the next call to krb5_mcc_next_cred.
- *
- * Errors:
- * system errors
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_next_cred(context, id, cursor, creds)
- krb5_context context;
- krb5_ccache id;
- krb5_cc_cursor *cursor;
- krb5_creds *creds;
-{
- krb5_mcc_cursor mcursor;
- krb5_error_code retval;
- krb5_data *scratch;
-
- mcursor = (krb5_mcc_cursor) *cursor;
- if (mcursor == NULL)
- return KRB5_CC_END;
- memset(creds, 0, sizeof(krb5_creds));
- if (mcursor->creds) {
- *creds = *mcursor->creds;
- retval = krb5_copy_principal(context, mcursor->creds->client, &creds->client);
- if (retval)
- return retval;
- retval = krb5_copy_principal(context, mcursor->creds->server,
- &creds->server);
- if (retval)
- goto cleanclient;
- retval = krb5_copy_keyblock_contents(context, &mcursor->creds->keyblock,
- &creds->keyblock);
- if (retval)
- goto cleanserver;
- retval = krb5_copy_addresses(context, mcursor->creds->addresses,
- &creds->addresses);
- if (retval)
- goto cleanblock;
- retval = krb5_copy_data(context, &mcursor->creds->ticket, &scratch);
- if (retval)
- goto cleanaddrs;
- creds->ticket = *scratch;
- krb5_xfree(scratch);
- retval = krb5_copy_data(context, &mcursor->creds->second_ticket, &scratch);
- if (retval)
- goto cleanticket;
- creds->second_ticket = *scratch;
- krb5_xfree(scratch);
- retval = krb5_copy_authdata(context, mcursor->creds->authdata,
- &creds->authdata);
- if (retval)
- goto clearticket;
- }
- *cursor = (krb5_cc_cursor)mcursor->next;
- return KRB5_OK;
-
-clearticket:
- memset(creds->ticket.data,0,creds->ticket.length);
-cleanticket:
- krb5_xfree(creds->ticket.data);
-cleanaddrs:
- krb5_free_addresses(context, creds->addresses);
-cleanblock:
- krb5_xfree(creds->keyblock.contents);
-cleanserver:
- krb5_free_principal(context, creds->server);
-cleanclient:
- krb5_free_principal(context, creds->client);
- return retval;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_ops.c b/src/lib/krb5/ccache/memory/mcc_ops.c
deleted file mode 100644
index 51f8c8808..000000000
--- a/src/lib/krb5/ccache/memory/mcc_ops.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_ops.c
- *
- * Copyright 1990 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.
- *
- *
- * This file contains the structure krb5_mcc_ops.
- */
-
-#define NEED_WINDOWS
-#include "mcc.h"
-
-krb5_cc_ops krb5_mcc_ops = {
- 0,
- "MEMORY",
- krb5_mcc_get_name,
- krb5_mcc_resolve,
- krb5_mcc_generate_new,
- krb5_mcc_initialize,
- krb5_mcc_destroy,
- krb5_mcc_close,
- krb5_mcc_store,
- krb5_mcc_retrieve,
- krb5_mcc_get_principal,
- krb5_mcc_start_seq_get,
- krb5_mcc_next_cred,
- krb5_mcc_end_seq_get,
- NULL, /* XXX krb5_mcc_remove, */
- krb5_mcc_set_flags,
-};
-
-krb5_mcc_data *mcc_head=0L;
-
diff --git a/src/lib/krb5/ccache/memory/mcc_reslv.c b/src/lib/krb5/ccache/memory/mcc_reslv.c
deleted file mode 100644
index 2b256d6e4..000000000
--- a/src/lib/krb5/ccache/memory/mcc_reslv.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_reslv.c
- *
- * Copyright 1990 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.
- *
- *
- * This file contains the source code for krb5_mcc_resolve.
- */
-
-
-
-#include "mcc.h"
-
-extern krb5_cc_ops krb5_mcc_ops;
-
-/*
- * Requires:
- * residual is a legal path name, and a null-terminated string
- *
- * Modifies:
- * id
- *
- * Effects:
- * creates a file-based cred cache that will reside in the file
- * residual. The cache is not opened, but the filename is reserved.
- *
- * Returns:
- * A filled in krb5_ccache structure "id".
- *
- * Errors:
- * KRB5_CC_NOMEM - there was insufficient memory to allocate the
- * krb5_ccache. id is undefined.
- * permission errors
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_resolve (context, id, residual)
- krb5_context context;
- krb5_ccache *id;
- const char *residual;
-{
- krb5_ccache lid;
- krb5_mcc_data *ptr;
-
-
- lid = (krb5_ccache) malloc(sizeof(struct _krb5_ccache));
- if (lid == NULL)
- return KRB5_CC_NOMEM;
-
- lid->ops = &krb5_mcc_ops;
-
- for (ptr = mcc_head; ptr; ptr=ptr->next)
- if (!strcmp(ptr->name, residual))
- break;
- if (ptr) {
- lid->data = ptr;
- } else {
- lid->data = (krb5_pointer) malloc(sizeof(krb5_mcc_data));
- if (lid->data == NULL) {
- krb5_xfree(lid);
- return KRB5_CC_NOMEM;
- }
-
- ((krb5_mcc_data *) lid->data)->name = (char *)
- malloc(strlen(residual) + 1);
- if (((krb5_mcc_data *)lid->data)->name == NULL) {
- krb5_xfree(((krb5_mcc_data *)lid->data));
- krb5_xfree(lid);
- return KRB5_CC_NOMEM;
- }
- strcpy(((krb5_mcc_data *)lid->data)->name, residual);
- ((krb5_mcc_data *)lid->data)->link = 0L;
- ((krb5_mcc_data *)lid->data)->prin = 0L;
-
-
- ((krb5_mcc_data *)lid->data)->next = mcc_head;
- mcc_head = (krb5_mcc_data *)lid->data;
-#if 0
- ++krb5_cache_sessions;
-#endif
- }
- *id = lid;
- return KRB5_OK;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_retrv.c b/src/lib/krb5/ccache/memory/mcc_retrv.c
deleted file mode 100644
index cdb6ae3d1..000000000
--- a/src/lib/krb5/ccache/memory/mcc_retrv.c
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_retrv.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_retrieve.
- */
-
-#if 0
-
-#include "mcc.h"
-
-#define set(bits) (whichfields & bits)
-#define flags_match(a,b) (((a) & (b)) == (a))
-#define times_match_exact(t1,t2) (memcmp((char *)(t1), (char *)(t2), sizeof(*(t1))) == 0)
-
-static krb5_boolean times_match PROTOTYPE((const krb5_ticket_times *,
- const krb5_ticket_times *));
-static krb5_boolean standard_fields_match
- PROTOTYPE((krb5_context,
- const krb5_creds *,
- const krb5_creds *));
-
-static krb5_boolean srvname_match
- PROTOTYPE((krb5_context,
- const krb5_creds *,
- const krb5_creds *));
-
-static krb5_boolean authdata_match
- PROTOTYPE ((krb5_authdata * const *, krb5_authdata * const *));
-
-
-static krb5_boolean
-data_match(data1, data2)
-register const krb5_data *data1, *data2;
-{
- if (!data1) {
- if (!data2)
- return TRUE;
- else
- return FALSE;
- }
- if (!data2) return FALSE;
-
- if (data1->length != data2->length)
- return FALSE;
- else
- return memcmp(data1->data, data2->data, data1->length) ? FALSE : TRUE;
-}
-
-
-
-/*
- * Effects:
- * Searches the file cred cache for a credential matching mcreds,
- * with the fields specified by whichfields. If one if found, it is
- * returned in creds, which should be freed by the caller with
- * krb5_free_credentials().
- *
- * The fields are interpreted in the following way (all constants are
- * preceded by KRB5_TC_). MATCH_IS_SKEY requires the is_skey field to
- * match exactly. MATCH_TIMES requires the requested lifetime to be
- * at least as great as that specified; MATCH_TIMES_EXACT requires the
- * requested lifetime to be exactly that specified. MATCH_FLAGS
- * requires only the set bits in mcreds be set in creds;
- * MATCH_FLAGS_EXACT requires all bits to match.
- *
- * Errors:
- * system errors
- * permission errors
- * KRB5_CC_NOMEM
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_retrieve(context, id, whichfields, mcreds, creds)
- krb5_context context;
- krb5_ccache id;
- krb5_flags whichfields;
- krb5_creds *mcreds;
- krb5_creds *creds;
-{
- /* This function could be considerably faster if it kept indexing */
- /* information.. sounds like a "next version" idea to me. :-) */
-
- krb5_cc_cursor cursor;
- krb5_error_code kret;
- krb5_creds fetchcreds;
-
- kret = krb5_mcc_start_seq_get(context, id, &cursor);
- if (kret != KRB5_OK)
- return kret;
-
- while ((kret = krb5_mcc_next_cred(context, id, &cursor, &fetchcreds)) == KRB5_OK) {
- if (((set(KRB5_TC_MATCH_SRV_NAMEONLY) &&
- srvname_match(context, mcreds, &fetchcreds)) ||
- standard_fields_match(context, mcreds, &fetchcreds))
- &&
- (! set(KRB5_TC_MATCH_IS_SKEY) ||
- mcreds->is_skey == fetchcreds.is_skey)
- &&
- (! set(KRB5_TC_MATCH_FLAGS_EXACT) ||
- mcreds->ticket_flags == fetchcreds.ticket_flags)
- &&
- (! set(KRB5_TC_MATCH_FLAGS) ||
- flags_match(mcreds->ticket_flags, fetchcreds.ticket_flags))
- &&
- (! set(KRB5_TC_MATCH_TIMES_EXACT) ||
- times_match_exact(&mcreds->times, &fetchcreds.times))
- &&
- (! set(KRB5_TC_MATCH_TIMES) ||
- times_match(&mcreds->times, &fetchcreds.times))
- &&
- ( ! set(KRB5_TC_MATCH_AUTHDATA) ||
- authdata_match(mcreds->authdata, fetchcreds.authdata))
- &&
- (! set(KRB5_TC_MATCH_2ND_TKT) ||
- data_match (&mcreds->second_ticket, &fetchcreds.second_ticket))
- &&
- ((! set(KRB5_TC_MATCH_KTYPE))||
- (mcreds->keyblock.enctype == fetchcreds.keyblock.enctype))
- )
- {
- krb5_mcc_end_seq_get(context, id, &cursor);
- *creds = fetchcreds;
- return KRB5_OK;
- }
-
- /* This one doesn't match */
- krb5_free_cred_contents(context, &fetchcreds);
- }
-
- /* If we get here, a match wasn't found */
- krb5_mcc_end_seq_get(context, id, &cursor);
- return KRB5_CC_NOTFOUND;
-}
-
-static krb5_boolean
-times_match(t1, t2)
-register const krb5_ticket_times *t1;
-register const krb5_ticket_times *t2;
-{
- if (t1->renew_till) {
- if (t1->renew_till > t2->renew_till)
- return FALSE; /* this one expires too late */
- }
- if (t1->endtime) {
- if (t1->endtime > t2->endtime)
- return FALSE; /* this one expires too late */
- }
- /* only care about expiration on a times_match */
- return TRUE;
-}
-
-static krb5_boolean
-standard_fields_match(context, mcreds, creds)
- krb5_context context;
-register const krb5_creds *mcreds, *creds;
-{
- return (krb5_principal_compare(context, mcreds->client,creds->client) &&
- krb5_principal_compare(context, mcreds->server,creds->server));
-}
-
-/* only match the server name portion, not the server realm portion */
-
-static krb5_boolean
-srvname_match(context, mcreds, creds)
- krb5_context context;
-register const krb5_creds *mcreds, *creds;
-{
- krb5_boolean retval;
- krb5_principal_data p1, p2;
-
- retval = krb5_principal_compare(context, mcreds->client,creds->client);
- if (retval != TRUE)
- return retval;
- /*
- * Hack to ignore the server realm for the purposes of the compare.
- */
- p1 = *mcreds->server;
- p2 = *creds->server;
- p1.realm = p2.realm;
- return krb5_principal_compare(context, &p1, &p2);
-}
-
-static krb5_boolean
-authdata_match(mdata, data)
- register krb5_authdata * const *mdata, * const *data;
-{
- register const krb5_authdata *mdatap, *datap;
-
- if (mdata == data)
- return TRUE;
-
- if (mdata == NULL)
- return *data == NULL;
-
- if (data == NULL)
- return *mdata == NULL;
-
- while ((mdatap = *mdata) && (datap = *data)) {
- if ((mdatap->ad_type != datap->ad_type) ||
- (mdatap->length != datap->length) ||
- (memcmp ((char *)mdatap->contents,
- (char *)datap->contents, mdatap->length) != 0))
- return FALSE;
- mdata++;
- data++;
- }
- return (*mdata == NULL) && (*data == NULL);
-}
-
-#else
-
-#include "k5-int.h"
-
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_retrieve(context, id, whichfields, mcreds, creds)
- krb5_context context;
- krb5_ccache id;
- krb5_flags whichfields;
- krb5_creds *mcreds;
- krb5_creds *creds;
-{
- return krb5_cc_retrieve_cred_default (context, id, whichfields,
- mcreds, creds);
-}
-
-#endif
diff --git a/src/lib/krb5/ccache/memory/mcc_sflags.c b/src/lib/krb5/ccache/memory/mcc_sflags.c
deleted file mode 100644
index 9747d7530..000000000
--- a/src/lib/krb5/ccache/memory/mcc_sflags.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_sflags.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_set_flags.
- */
-
-
-
-#include "mcc.h"
-
-/*
- * Requires:
- * id is a cred cache returned by krb5_mcc_resolve or
- * krb5_mcc_generate_new, but has not been opened by krb5_mcc_initialize.
- *
- * Modifies:
- * id
- *
- * Effects:
- * Sets the operational flags of id to flags.
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_set_flags(context, id, flags)
- krb5_context context;
- krb5_ccache id;
- krb5_flags flags;
-{
- return KRB5_OK;
-}
-
diff --git a/src/lib/krb5/ccache/memory/mcc_sseq.c b/src/lib/krb5/ccache/memory/mcc_sseq.c
deleted file mode 100644
index 90836df0d..000000000
--- a/src/lib/krb5/ccache/memory/mcc_sseq.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_sseq.c
- *
- * 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.
- *
- *
- * This file contains the source code for krb5_mcc_start_seq_get.
- */
-
-
-#include "mcc.h"
-
-/*
- * Effects:
- * Prepares for a sequential search of the credentials cache.
- * Returns a krb5_cc_cursor to be used with krb5_mcc_next_cred and
- * krb5_mcc_end_seq_get.
- *
- * If the cache is modified between the time of this call and the time
- * of the final krb5_mcc_end_seq_get, the results are undefined.
- *
- * Errors:
- * KRB5_CC_NOMEM
- * system errors
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_start_seq_get(context, id, cursor)
- krb5_context context;
- krb5_ccache id;
- krb5_cc_cursor *cursor;
-{
- krb5_mcc_cursor mcursor;
-
- mcursor = ((krb5_mcc_data *)id->data)->link;
- *cursor = (krb5_cc_cursor) mcursor;
- return KRB5_OK;
-}
diff --git a/src/lib/krb5/ccache/memory/mcc_store.c b/src/lib/krb5/ccache/memory/mcc_store.c
deleted file mode 100644
index 91a433f60..000000000
--- a/src/lib/krb5/ccache/memory/mcc_store.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * lib/ccache/memory/mcc_store.c
- *
- * Copyright 1995 Locus Computing Corporation
- *
- * This file contains the source code for krb5_mcc_store.
- */
-
-
-#include <errno.h>
-#include "mcc.h"
-
-#define CHECK(ret) if (ret != KRB5_OK) return ret;
-
-/*
- * Modifies:
- * the memory cache
- *
- * Effects:
- * stores creds in the memory cred cache
- *
- * Errors:
- * system errors
- * storage failure errors
- */
-krb5_error_code KRB5_CALLCONV
-krb5_mcc_store(context, id, creds)
- krb5_context context;
- krb5_ccache id;
- krb5_creds *creds;
-{
- krb5_error_code ret;
- krb5_mcc_cursor mcursor;
-
- mcursor = (krb5_mcc_cursor)malloc(sizeof(krb5_mcc_link));
- if (mcursor == NULL)
- return KRB5_CC_NOMEM;
- ret = krb5_copy_creds(context, creds, &mcursor->creds);
- if (ret == KRB5_OK) {
- mcursor->next = ((krb5_mcc_data *)id->data)->link;
- ((krb5_mcc_data *)id->data)->link = mcursor;
- krb5_change_cache();
- }
- return ret;
-}
-
diff --git a/src/lib/krb5/ccache/memory/mcc_test.c b/src/lib/krb5/ccache/memory/mcc_test.c
deleted file mode 100644
index b117aed33..000000000
--- a/src/lib/krb5/ccache/memory/mcc_test.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * lib/krb5/ccache/file/mcc_test.c
- *
- * Copyright 1990 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 "mcc.h"
-
-krb5_data client1 = {
-#define DATA "client1-comp1"
- sizeof(DATA),
- DATA,
-#undef DATA
-};
-
-krb5_data client2 = {
-#define DATA "client1-comp2"
- sizeof(DATA),
- DATA,
-#undef DATA
-};
-
-krb5_data server1 = {
-#define DATA "server1-comp1"
- sizeof(DATA),
- DATA,
-#undef DATA
-};
-
-krb5_data server2 = {
-#define DATA "server1-comp2"
- sizeof(DATA),
- DATA,
-#undef DATA
-};
-
-krb5_creds test_creds = {
- NULL,
- NULL,
- {
- 1,
- 1,
- (unsigned char *) "1"
- },
- {
- 1111,
- 2222,
- 3333,
- 4444
- },
- 1,
- 5555,
- {
-#define TICKET "This is ticket 1"
- sizeof(TICKET),
- TICKET,
-#undef TICKET
- },
- {
-#define TICKET "This is ticket 2"
- sizeof(TICKET),
- TICKET,
-#undef TICKET
- },
-};
-
-void init_test_cred()
-{
- test_creds.client = (krb5_principal) malloc(sizeof(krb5_data *)*3);
- test_creds.client[0] = &client1;
- test_creds.client[1] = &client2;
- test_creds.client[2] = NULL;
-
- test_creds.server = (krb5_principal) malloc(sizeof(krb5_data *)*3);
- test_creds.server[0] = &server1;
- test_creds.server[1] = &server2;
- test_creds.server[2] = NULL;
-}
-
-#define CHECK(kret,msg) \
- if (kret != KRB5_OK) {\
- printf("%s returned %d\n", msg, kret);\
- };
-
-void mcc_test()
-{
- krb5_ccache id;
- krb5_creds creds;
- krb5_error_code kret;
- krb5_cc_cursor cursor;
-
- init_test_cred();
-
- kret = krb5_mcc_resolve(context, &id, "/tmp/tkt_test");
- CHECK(kret, "resolve");
- kret = krb5_mcc_initialize(context, id, test_creds.client);
- CHECK(kret, "initialize");
- kret = krb5_mcc_store(context, id, &test_creds);
- CHECK(kret, "store");
-
- kret = krb5_mcc_start_seq_get(context, id, &cursor);
- CHECK(kret, "start_seq_get");
- kret = 0;
- while (kret != KRB5_CC_END) {
- printf("Calling next_cred\n");
- kret = krb5_mcc_next_cred(context, id, &cursor, &creds);
- CHECK(kret, "next_cred");
- }
- kret = krb5_mcc_end_seq_get(context, id, &cursor);
- CHECK(kret, "end_seq_get");
-
- kret = krb5_mcc_destroy(context, id);
- CHECK(kret, "destroy");
- kret = krb5_mcc_close(context, id);
- CHECK(kret, "close");
-}
-