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/include | |
| 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/include')
| -rw-r--r-- | src/include/ChangeLog | 10 | ||||
| -rw-r--r-- | src/include/k5-int.h | 56 | ||||
| -rw-r--r-- | src/include/krb5.hin | 86 |
3 files changed, 85 insertions, 67 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog index ff5b9937c..8f044af33 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,13 @@ +2001-10-12 Ken Raeburn <raeburn@mit.edu> + + * k5-int.h (struct _krb5_kt_ops, krb5_kt_ops, krb5_kt_dfl_ops): + Definitions and declarations moved here... + * krb5.hin: ...from here. + (krb5_kt_get_type, krb5_kt_get_name, krb5_kt_close, + krb5_kt_get_entry, krb5_kt_start_seq_get, krb5_kt_next_entry, + krb5_kt_end_seq_get): Replaced macro definitions with declarations + for functions now in lib/krb5/keytab/ktfns.c. + 2001-10-09 Ken Raeburn <raeburn@mit.edu> * fake-stdlib.h: Make prototypes unconditional. diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 1edd2a135..b7f0c6292 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -1606,12 +1606,62 @@ struct _krb5_rc_ops { typedef struct _krb5_rc_ops krb5_rc_ops; -krb5_error_code krb5_rc_register_type - (krb5_context, - krb5_rc_ops *); +krb5_error_code krb5_rc_register_type (krb5_context, krb5_rc_ops *); extern krb5_rc_ops krb5_rc_dfl_ops; +typedef struct _krb5_kt_ops { + krb5_magic magic; + char *prefix; + /* routines always present */ + krb5_error_code (KRB5_CALLCONV *resolve) + (krb5_context, + krb5_const char *, + krb5_keytab *); + krb5_error_code (KRB5_CALLCONV *get_name) + (krb5_context, + krb5_keytab, + char *, + unsigned int); + krb5_error_code (KRB5_CALLCONV *close) + (krb5_context, + krb5_keytab); + krb5_error_code (KRB5_CALLCONV *get) + (krb5_context, + krb5_keytab, + krb5_const_principal, + krb5_kvno, + krb5_enctype, + krb5_keytab_entry *); + krb5_error_code (KRB5_CALLCONV *start_seq_get) + (krb5_context, + krb5_keytab, + krb5_kt_cursor *); + krb5_error_code (KRB5_CALLCONV *get_next) + (krb5_context, + krb5_keytab, + krb5_keytab_entry *, + krb5_kt_cursor *); + krb5_error_code (KRB5_CALLCONV *end_get) + (krb5_context, + krb5_keytab, + krb5_kt_cursor *); + /* routines to be included on extended version (write routines) */ + krb5_error_code (KRB5_CALLCONV *add) + (krb5_context, + krb5_keytab, + krb5_keytab_entry *); + krb5_error_code (KRB5_CALLCONV *remove) + (krb5_context, + krb5_keytab, + krb5_keytab_entry *); + + /* Handle for serializer */ + void * serializer; +} krb5_kt_ops; + +extern krb5_kt_ops krb5_kt_dfl_ops; + extern krb5_error_code krb5int_translate_gai_error (int); #endif /* _KRB5_INT_H */ diff --git a/src/include/krb5.hin b/src/include/krb5.hin index ee37016d7..117359631 100644 --- a/src/include/krb5.hin +++ b/src/include/krb5.hin @@ -1218,75 +1218,33 @@ typedef struct krb5_keytab_entry_st { } krb5_keytab_entry; +struct _krb5_kt_ops; typedef struct _krb5_kt { krb5_magic magic; struct _krb5_kt_ops *ops; krb5_pointer data; } *krb5_keytab; - -typedef struct _krb5_kt_ops { - krb5_magic magic; - char *prefix; - /* routines always present */ - krb5_error_code (KRB5_CALLCONV *resolve) - (krb5_context, - krb5_const char *, - krb5_keytab *); - krb5_error_code (KRB5_CALLCONV *get_name) - (krb5_context, - krb5_keytab, - char *, - unsigned int); - krb5_error_code (KRB5_CALLCONV *close) - (krb5_context, - krb5_keytab); - krb5_error_code (KRB5_CALLCONV *get) - (krb5_context, - krb5_keytab, - krb5_const_principal, - krb5_kvno, - krb5_enctype, - krb5_keytab_entry *); - krb5_error_code (KRB5_CALLCONV *start_seq_get) - (krb5_context, - krb5_keytab, - krb5_kt_cursor *); - krb5_error_code (KRB5_CALLCONV *get_next) - (krb5_context, - krb5_keytab, - krb5_keytab_entry *, - krb5_kt_cursor *); - krb5_error_code (KRB5_CALLCONV *end_get) - (krb5_context, - krb5_keytab, - krb5_kt_cursor *); - /* routines to be included on extended version (write routines) */ - krb5_error_code (KRB5_CALLCONV *add) - (krb5_context, - krb5_keytab, - krb5_keytab_entry *); - krb5_error_code (KRB5_CALLCONV *remove) - (krb5_context, - krb5_keytab, - krb5_keytab_entry *); - - /* Handle for serializer */ - void * serializer; -} krb5_kt_ops; - -#define krb5_kt_get_type(context, keytab) ((keytab)->ops->prefix) -#define krb5_kt_get_name(context, keytab, name, namelen) krb5_x((keytab)->ops->get_name,(context, keytab,name,namelen)) -#define krb5_kt_close(context, keytab) krb5_x((keytab)->ops->close,(context, keytab)) -#define krb5_kt_get_entry(context, keytab, principal, vno, enctype, entry) krb5_x((keytab)->ops->get,(context, keytab, principal, vno, enctype, entry)) -#define krb5_kt_start_seq_get(context, keytab, cursor) krb5_x((keytab)->ops->start_seq_get,(context, keytab, cursor)) -#define krb5_kt_next_entry(context, keytab, entry, cursor) krb5_x((keytab)->ops->get_next,(context, keytab, entry, cursor)) -#define krb5_kt_end_seq_get(context, keytab, cursor) krb5_x((keytab)->ops->end_get,(context, keytab, cursor)) -/* remove and add are functions, so that they can return NOWRITE - if not a writable keytab */ - - -extern krb5_kt_ops krb5_kt_dfl_ops; +char * +krb5_kt_get_type (krb5_context, krb5_keytab keytab); +krb5_error_code KRB5_CALLCONV +krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name, + unsigned int namelen); +krb5_error_code KRB5_CALLCONV +krb5_kt_close(krb5_context context, krb5_keytab 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); +krb5_error_code KRB5_CALLCONV +krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab, + krb5_kt_cursor *cursor); +krb5_error_code KRB5_CALLCONV +krb5_kt_next_entry(krb5_context context, krb5_keytab keytab, + krb5_keytab_entry *entry, krb5_kt_cursor *cursor); +krb5_error_code KRB5_CALLCONV +krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab, + krb5_kt_cursor *cursor); /* * end "keytab.h" @@ -1563,7 +1521,7 @@ krb5_error_code KRB5_CALLCONV krb5_chpw_result_code_string /* libkt.spec */ krb5_error_code KRB5_CALLCONV krb5_kt_register (krb5_context, - krb5_kt_ops * ); + struct _krb5_kt_ops * ); krb5_error_code KRB5_CALLCONV krb5_kt_resolve (krb5_context, krb5_const char *, |
