In order to reduce the size of binary programs when static linking is used, it is common to provide two krb5_kt_ops structures for each key table type, one for reading only in which the pointers to the add and delete functions are zero, and one for reading and writing.
typedef struct _krb5_kt_ops { char *prefix; /* routines always present */ krb5_error_code (*resolve)((char *, krb5_keytab *)); krb5_error_code (*get_name)((krb5_keytab, char *, int)); krb5_error_code (*close)((krb5_keytab)); krb5_error_code (*get)((krb5_keytab, krb5_principal, krb5_kvno, krb5_keytab_entry *)); krb5_error_code (*start_seq_get)((krb5_keytab, krb5_kt_cursor *)); krb5_error_code (*get_next)((krb5_keytab, krb5_keytab_entry *, krb5_kt_cursor *)); krb5_error_code (*end_get)((krb5_keytab, krb5_kt_cursor *)); /* routines to be included on extended version (write routines) */ krb5_error_code (*add)((krb5_keytab, krb5_keytab_entry *)); krb5_error_code (*remove)((krb5_keytab, krb5_keytab_entry *)); } krb5_kt_ops;