1 #pragma ident	"%Z%%M%	%I%	%E% SMI"
2 
3 /*
4  * lib/krb5/rcache/rc_none.c
5  *
6  * Copyright 2004 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  * replay cache no-op implementation
30  */
31 
32 #include "k5-int.h"
33 #include "rc-int.h"
34 
35 static krb5_error_code KRB5_CALLCONV
36 krb5_rc_none_init(krb5_context ctx, krb5_rcache rc, krb5_deltat lifespan)
37 {
38 	return (0);
39 }
40 #define krb5_rc_none_recover_or_init krb5_rc_none_init
41 
42 static krb5_error_code KRB5_CALLCONV
43 krb5_rc_none_noargs(krb5_context ctx, krb5_rcache rc)
44 {
45 	return (0);
46 }
47 #define krb5_rc_none_recover	krb5_rc_none_noargs
48 #define krb5_rc_none_destroy	krb5_rc_none_noargs
49 #define krb5_rc_none_close	krb5_rc_none_noargs
50 #define krb5_rc_none_expunge	krb5_rc_none_noargs
51 
52 static krb5_error_code KRB5_CALLCONV
53 krb5_rc_none_store(krb5_context ctx, krb5_rcache rc, krb5_donot_replay *r)
54 {
55 	return (0);
56 }
57 
58 static krb5_error_code KRB5_CALLCONV
59 krb5_rc_none_get_span(krb5_context ctx, krb5_rcache rc, krb5_deltat *d)
60 {
61 	return (0);
62 }
63 
64 static char * KRB5_CALLCONV
65 krb5_rc_none_get_name(krb5_context ctx, krb5_rcache rc)
66 {
67 	return ("");
68 }
69 
70 static krb5_error_code KRB5_CALLCONV
71 krb5_rc_none_resolve(krb5_context ctx, krb5_rcache rc, char *name)
72 {
73 	rc->data = "NONE";
74 	return (0);
75 }
76 
77 const krb5_rc_ops krb5_rc_none_ops = {
78 	(0),
79 	"NONE",
80 	krb5_rc_none_init,
81 	krb5_rc_none_recover,
82 	krb5_rc_none_recover_or_init,
83 	krb5_rc_none_destroy,
84 	krb5_rc_none_close,
85 	krb5_rc_none_store,
86 	krb5_rc_none_expunge,
87 	krb5_rc_none_get_span,
88 	krb5_rc_none_get_name,
89 	krb5_rc_none_resolve
90 };
91