1 #pragma ident "%Z%%M% %I% %E% SMI" 2 3 /* 4 * lib/krb5/keytab/ktfns.c 5 * 6 * Copyright 2001 by the Massachusetts Institute of Technology. 7 * All Rights Reserved. 8 * 9 * Export of this software from the United States of America may 10 * require a specific license from the United States Government. 11 * It is the responsibility of any person or organization contemplating 12 * export to obtain such a license before exporting. 13 * 14 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 15 * distribute this software and its documentation for any purpose and 16 * without fee is hereby granted, provided that the above copyright 17 * notice appear in all copies and that both that copyright notice and 18 * this permission notice appear in supporting documentation, and that 19 * the name of M.I.T. not be used in advertising or publicity pertaining 20 * to distribution of the software without specific, written prior 21 * permission. Furthermore if you modify this software you must label 22 * your software as modified software and not distribute it in such a 23 * fashion that it might be confused with the original M.I.T. software. 24 * M.I.T. makes no representations about the suitability of 25 * this software for any purpose. It is provided "as is" without express 26 * or implied warranty. 27 */ 28 29 /* 30 * Dispatch methods for keytab code. 31 */ 32 33 #include "k5-int.h" 34 35 char * KRB5_CALLCONV 36 krb5_kt_get_type (krb5_context context, krb5_keytab keytab) 37 { 38 return keytab->ops->prefix; 39 } 40 41 krb5_error_code KRB5_CALLCONV 42 krb5_kt_get_name(krb5_context context, krb5_keytab keytab, char *name, 43 unsigned int namelen) 44 { 45 return krb5_x((keytab)->ops->get_name,(context, keytab,name,namelen)); 46 } 47 48 krb5_error_code KRB5_CALLCONV 49 krb5_kt_close(krb5_context context, krb5_keytab keytab) 50 { 51 return krb5_x((keytab)->ops->close,(context, keytab)); 52 } 53 54 krb5_error_code KRB5_CALLCONV 55 krb5_kt_get_entry(krb5_context context, krb5_keytab keytab, 56 krb5_const_principal principal, krb5_kvno vno, 57 krb5_enctype enctype, krb5_keytab_entry *entry) 58 { 59 return krb5_x((keytab)->ops->get,(context, keytab, principal, vno, enctype, entry)); 60 } 61 62 krb5_error_code KRB5_CALLCONV 63 krb5_kt_start_seq_get(krb5_context context, krb5_keytab keytab, 64 krb5_kt_cursor *cursor) 65 { 66 return krb5_x((keytab)->ops->start_seq_get,(context, keytab, cursor)); 67 } 68 69 krb5_error_code KRB5_CALLCONV 70 krb5_kt_next_entry(krb5_context context, krb5_keytab keytab, 71 krb5_keytab_entry *entry, krb5_kt_cursor *cursor) 72 { 73 return krb5_x((keytab)->ops->get_next,(context, keytab, entry, cursor)); 74 } 75 76 krb5_error_code KRB5_CALLCONV 77 krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab, 78 krb5_kt_cursor *cursor) 79 { 80 return krb5_x((keytab)->ops->end_get,(context, keytab, cursor)); 81 } 82