xref: /titanic_41/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rcfns.c (revision 505d05c73a6e56769f263d4803b22eddd168ee24)
1 #pragma ident	"%Z%%M%	%I%	%E% SMI"
2 
3 /*
4  * lib/krb5/rcache/rcfns.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 replay cache code.
31  */
32 
33 #include "k5-int.h"
34 #include "rc-int.h"
35 
36 krb5_error_code KRB5_CALLCONV
krb5_rc_initialize(krb5_context context,krb5_rcache id,krb5_deltat span)37 krb5_rc_initialize (krb5_context context, krb5_rcache id, krb5_deltat span)
38 {
39     return krb5_x(id->ops->init,(context, id, span));
40 }
41 
42 krb5_error_code KRB5_CALLCONV
krb5_rc_recover_or_initialize(krb5_context context,krb5_rcache id,krb5_deltat span)43 krb5_rc_recover_or_initialize (krb5_context context, krb5_rcache id,
44 			       krb5_deltat span)
45 {
46     return krb5_x(id->ops->recover_or_init,(context, id, span));
47 }
48 
49 krb5_error_code KRB5_CALLCONV
krb5_rc_recover(krb5_context context,krb5_rcache id)50 krb5_rc_recover (krb5_context context, krb5_rcache id)
51 {
52     return krb5_x((id)->ops->recover,(context, id));
53 }
54 
55 krb5_error_code KRB5_CALLCONV
krb5_rc_destroy(krb5_context context,krb5_rcache id)56 krb5_rc_destroy (krb5_context context, krb5_rcache id)
57 {
58     return krb5_x((id)->ops->destroy,(context, id));
59 }
60 
61 krb5_error_code KRB5_CALLCONV
krb5_rc_close(krb5_context context,krb5_rcache id)62 krb5_rc_close (krb5_context context, krb5_rcache id)
63 {
64     return krb5_x((id)->ops->close,(context, id));
65 }
66 
67 krb5_error_code KRB5_CALLCONV
krb5_rc_store(krb5_context context,krb5_rcache id,krb5_donot_replay * dontreplay)68 krb5_rc_store (krb5_context context, krb5_rcache id,
69 	       krb5_donot_replay *dontreplay)
70 {
71     return krb5_x((id)->ops->store,(context, id, dontreplay));
72 }
73 
74 krb5_error_code KRB5_CALLCONV
krb5_rc_expunge(krb5_context context,krb5_rcache id)75 krb5_rc_expunge (krb5_context context, krb5_rcache id)
76 {
77     return krb5_x((id)->ops->expunge,(context, id));
78 }
79 
80 krb5_error_code KRB5_CALLCONV
krb5_rc_get_lifespan(krb5_context context,krb5_rcache id,krb5_deltat * spanp)81 krb5_rc_get_lifespan (krb5_context context, krb5_rcache id,
82 		      krb5_deltat *spanp)
83 {
84     return krb5_x((id)->ops->get_span,(context, id, spanp));
85 }
86 
87 char *KRB5_CALLCONV
krb5_rc_get_name(krb5_context context,krb5_rcache id)88 krb5_rc_get_name (krb5_context context, krb5_rcache id)
89 {
90     return krb5_xc((id)->ops->get_name,(context, id));
91 }
92 
93 krb5_error_code KRB5_CALLCONV
krb5_rc_resolve(krb5_context context,krb5_rcache id,char * name)94 krb5_rc_resolve (krb5_context context, krb5_rcache id, char *name)
95 {
96     return krb5_x((id)->ops->resolve,(context, id, name));
97 }
98