diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2001-10-12 22:49:02 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2001-10-12 22:49:02 +0000 |
| commit | 54295aa631adac66b62f2b9f6b8894540eb78f05 (patch) | |
| tree | 97700d2f6526ca45cb702784188c9e5b487b7e60 /src/lib | |
| parent | 040c38e78a516685158540e53ebcf8c542dde995 (diff) | |
Replace keytab function-table dispatch macros in krb5.h with functions defined
in krb5 library. Make keytab-related structures internal.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13807 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/keytab/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lib/krb5/keytab/Makefile.in | 3 | ||||
| -rw-r--r-- | src/lib/krb5/keytab/ktfns.c | 79 |
3 files changed, 87 insertions, 0 deletions
diff --git a/src/lib/krb5/keytab/ChangeLog b/src/lib/krb5/keytab/ChangeLog index 95679384c..637819762 100644 --- a/src/lib/krb5/keytab/ChangeLog +++ b/src/lib/krb5/keytab/ChangeLog @@ -1,3 +1,8 @@ +2001-10-12 Ken Raeburn <raeburn@mit.edu> + + * ktfns.c: New file. + * Makefile.in (STLIBOBJS, OBJS, SRCS): Build it. + 2001-10-09 Ken Raeburn <raeburn@mit.edu> * ktbase.c: Make prototypes unconditional. diff --git a/src/lib/krb5/keytab/Makefile.in b/src/lib/krb5/keytab/Makefile.in index bc677eb37..532d40032 100644 --- a/src/lib/krb5/keytab/Makefile.in +++ b/src/lib/krb5/keytab/Makefile.in @@ -17,6 +17,7 @@ STLIBOBJS= \ ktdefault.o \ ktfr_entry.o \ ktremove.o \ + ktfns.o \ read_servi.o OBJS= \ @@ -25,6 +26,7 @@ OBJS= \ $(OUTPRE)ktdefault.$(OBJEXT) \ $(OUTPRE)ktfr_entry.$(OBJEXT) \ $(OUTPRE)ktremove.$(OBJEXT) \ + $(OUTPRE)ktfns.$(OBJEXT) \ $(OUTPRE)read_servi.$(OBJEXT) SRCS= \ @@ -33,6 +35,7 @@ SRCS= \ $(srcdir)/ktdefault.c \ $(srcdir)/ktfr_entry.c \ $(srcdir)/ktremove.c \ + $(srcdir)/ktfns.c \ $(srcdir)/read_servi.c all-windows:: subdirs $(OBJFILE) diff --git a/src/lib/krb5/keytab/ktfns.c b/src/lib/krb5/keytab/ktfns.c new file mode 100644 index 000000000..25e14b60f --- /dev/null +++ b/src/lib/krb5/keytab/ktfns.c @@ -0,0 +1,79 @@ +/* + * lib/krb5/keytab/ktfns.c + * + * Copyright 2001 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. + */ + +/* + * Dispatch methods for keytab code. + */ + +#include "k5-int.h" + +char * +krb5_kt_get_type (krb5_context context, krb5_keytab keytab) +{ + return keytab->ops->prefix; +} + +krb5_error_code KRB5_CALLCONV +krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name, + unsigned int namelen) +{ + return krb5_x((keytab)->ops->get_name,(context, keytab,name,namelen)); +} + +krb5_error_code KRB5_CALLCONV +krb5_kt_close(krb5_context context, krb5_keytab keytab) +{ + return krb5_x((keytab)->ops->close,(context, keytab)); +} + +krb5_error_code KRB5_CALLCONV +krb5_kt_get_entry(krb5_context context, krb5_keytab keytab, + krb5_const_principal principal, krb5_kvno vno, + krb5_enctype enctype, krb5_keytab_entry *entry) +{ + return krb5_x((keytab)->ops->get,(context, keytab, principal, vno, enctype, entry)); +} + +krb5_error_code KRB5_CALLCONV +krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab, + krb5_kt_cursor *cursor) +{ + return krb5_x((keytab)->ops->start_seq_get,(context, keytab, cursor)); +} + +krb5_error_code KRB5_CALLCONV +krb5_kt_next_entry(krb5_context context, krb5_keytab keytab, + krb5_keytab_entry *entry, krb5_kt_cursor *cursor) +{ + return krb5_x((keytab)->ops->get_next,(context, keytab, entry, cursor)); +} + +krb5_error_code KRB5_CALLCONV +krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab, + krb5_kt_cursor *cursor) +{ + return krb5_x((keytab)->ops->end_get,(context, keytab, cursor)); +} |
