169dc0907Sps57422 /*
269dc0907Sps57422  * lib/krb5/rcache/rc_none.c
369dc0907Sps57422  *
469dc0907Sps57422  * Copyright 2004 by the Massachusetts Institute of Technology.
569dc0907Sps57422  * All Rights Reserved.
669dc0907Sps57422  *
769dc0907Sps57422  * Export of this software from the United States of America may
869dc0907Sps57422  *   require a specific license from the United States Government.
969dc0907Sps57422  *   It is the responsibility of any person or organization contemplating
1069dc0907Sps57422  *   export to obtain such a license before exporting.
1169dc0907Sps57422  *
1269dc0907Sps57422  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
1369dc0907Sps57422  * distribute this software and its documentation for any purpose and
1469dc0907Sps57422  * without fee is hereby granted, provided that the above copyright
1569dc0907Sps57422  * notice appear in all copies and that both that copyright notice and
1669dc0907Sps57422  * this permission notice appear in supporting documentation, and that
1769dc0907Sps57422  * the name of M.I.T. not be used in advertising or publicity pertaining
1869dc0907Sps57422  * to distribution of the software without specific, written prior
1969dc0907Sps57422  * permission.  Furthermore if you modify this software you must label
2069dc0907Sps57422  * your software as modified software and not distribute it in such a
2169dc0907Sps57422  * fashion that it might be confused with the original M.I.T. software.
2269dc0907Sps57422  * M.I.T. makes no representations about the suitability of
2369dc0907Sps57422  * this software for any purpose.  It is provided "as is" without express
2469dc0907Sps57422  * or implied warranty.
2569dc0907Sps57422  *
2669dc0907Sps57422  *
2769dc0907Sps57422  * replay cache no-op implementation
2869dc0907Sps57422  */
2969dc0907Sps57422 
3069dc0907Sps57422 #include "k5-int.h"
3169dc0907Sps57422 #include "rc-int.h"
3269dc0907Sps57422 
3369dc0907Sps57422 static krb5_error_code KRB5_CALLCONV
krb5_rc_none_init(krb5_context ctx,krb5_rcache rc,krb5_deltat d)34*159d09a2SMark Phalan krb5_rc_none_init(krb5_context ctx, krb5_rcache rc, krb5_deltat d)
3569dc0907Sps57422 {
36*159d09a2SMark Phalan     return 0;
3769dc0907Sps57422 }
3869dc0907Sps57422 #define krb5_rc_none_recover_or_init krb5_rc_none_init
3969dc0907Sps57422 
4069dc0907Sps57422 static krb5_error_code KRB5_CALLCONV
krb5_rc_none_noargs(krb5_context ctx,krb5_rcache rc)4169dc0907Sps57422 krb5_rc_none_noargs(krb5_context ctx, krb5_rcache rc)
4269dc0907Sps57422 {
43*159d09a2SMark Phalan     return 0;
4469dc0907Sps57422 }
4569dc0907Sps57422 #define krb5_rc_none_recover	krb5_rc_none_noargs
4669dc0907Sps57422 #define krb5_rc_none_destroy	krb5_rc_none_noargs
4769dc0907Sps57422 #define krb5_rc_none_close	krb5_rc_none_noargs
4869dc0907Sps57422 #define krb5_rc_none_expunge	krb5_rc_none_noargs
4969dc0907Sps57422 
5069dc0907Sps57422 static krb5_error_code KRB5_CALLCONV
krb5_rc_none_store(krb5_context ctx,krb5_rcache rc,krb5_donot_replay * r)5169dc0907Sps57422 krb5_rc_none_store(krb5_context ctx, krb5_rcache rc, krb5_donot_replay *r)
5269dc0907Sps57422 {
53*159d09a2SMark Phalan     return 0;
5469dc0907Sps57422 }
5569dc0907Sps57422 
5669dc0907Sps57422 static krb5_error_code KRB5_CALLCONV
krb5_rc_none_get_span(krb5_context ctx,krb5_rcache rc,krb5_deltat * d)5769dc0907Sps57422 krb5_rc_none_get_span(krb5_context ctx, krb5_rcache rc, krb5_deltat *d)
5869dc0907Sps57422 {
59*159d09a2SMark Phalan     return 0;
6069dc0907Sps57422 }
6169dc0907Sps57422 
6269dc0907Sps57422 static char * KRB5_CALLCONV
krb5_rc_none_get_name(krb5_context ctx,krb5_rcache rc)6369dc0907Sps57422 krb5_rc_none_get_name(krb5_context ctx, krb5_rcache rc)
6469dc0907Sps57422 {
65*159d09a2SMark Phalan     return "";
6669dc0907Sps57422 }
6769dc0907Sps57422 
6869dc0907Sps57422 static krb5_error_code KRB5_CALLCONV
krb5_rc_none_resolve(krb5_context ctx,krb5_rcache rc,char * name)6969dc0907Sps57422 krb5_rc_none_resolve(krb5_context ctx, krb5_rcache rc, char *name)
7069dc0907Sps57422 {
7169dc0907Sps57422     rc->data = "NONE";
72*159d09a2SMark Phalan     return 0;
7369dc0907Sps57422 }
7469dc0907Sps57422 
7569dc0907Sps57422 const krb5_rc_ops krb5_rc_none_ops = {
76*159d09a2SMark Phalan     0,
7769dc0907Sps57422     "NONE",
7869dc0907Sps57422     krb5_rc_none_init,
7969dc0907Sps57422     krb5_rc_none_recover,
8069dc0907Sps57422     krb5_rc_none_recover_or_init,
8169dc0907Sps57422     krb5_rc_none_destroy,
8269dc0907Sps57422     krb5_rc_none_close,
8369dc0907Sps57422     krb5_rc_none_store,
8469dc0907Sps57422     krb5_rc_none_expunge,
8569dc0907Sps57422     krb5_rc_none_get_span,
8669dc0907Sps57422     krb5_rc_none_get_name,
8769dc0907Sps57422     krb5_rc_none_resolve
8869dc0907Sps57422 };
89