summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorps57422 <none@none>2007-10-19 11:13:03 -0700
committerps57422 <none@none>2007-10-19 11:13:03 -0700
commitc33df7ede245a3815b726e3eb38752e85ebb081f (patch)
tree638a0b7404c4e7e6fa486050f841b48bc277c90b
parent4b35a1e2d00421d0b7a0df86d93d4c010c483e45 (diff)
downloadillumos-gate-c33df7ede245a3815b726e3eb38752e85ebb081f.tar.gz
6355106 rcache should include the "none" type
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/Makefile.com2
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc-int.h1
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_base.c9
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_none.c88
4 files changed, 96 insertions, 4 deletions
diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
index 4ea78d42c4..2f3bf18abf 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
@@ -161,7 +161,7 @@ K5_OS_UTS=init_os_ctx.o timeofday.o toffset.o c_ustime.o
K5_POSIX= setenv.o daemon.o
K5_RCACHE=rc_base.o rc_file.o rc_mem.o rc_common.o rc_io.o rcdef.o rc_conv.o \
- ser_rc.o rcfns.o
+ ser_rc.o rcfns.o rc_none.o
MECH= accept_sec_context.o store_cred.o \
add_cred.o disp_com_err_status.o disp_major_status.o \
diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc-int.h b/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc-int.h
index 00db4e386f..bff3499c36 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc-int.h
+++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc-int.h
@@ -74,6 +74,5 @@ typedef struct _krb5_rc_ops krb5_rc_ops;
krb5_error_code krb5_rc_register_type (krb5_context, const krb5_rc_ops *);
extern krb5_rc_ops *krb5_rc_dfl_ops;
-extern const krb5_rc_ops krb5_rc_none_ops;
#endif /* __KRB5_RCACHE_INT_H__ */
diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_base.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_base.c
index 9ac9cb84c5..574f837ab7 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_base.c
+++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_base.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -30,7 +30,12 @@ struct krb5_rc_typelist
const krb5_rc_ops *ops;
struct krb5_rc_typelist *next;
};
-static struct krb5_rc_typelist rc_mem_type = { &krb5_rc_mem_ops, 0 };
+
+extern krb5_rc_ops krb5_rc_none_ops; /* defined in rc_none.c */
+
+static struct krb5_rc_typelist rc_none_type = { &krb5_rc_none_ops, 0 };
+static struct krb5_rc_typelist rc_mem_type =
+ { &krb5_rc_mem_ops, &rc_none_type };
static struct krb5_rc_typelist krb5_rc_typelist_dfl =
{ &krb5_rc_file_ops, &rc_mem_type };
static struct krb5_rc_typelist *typehead = &krb5_rc_typelist_dfl;
diff --git a/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_none.c b/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_none.c
new file mode 100644
index 0000000000..9d8117dabe
--- /dev/null
+++ b/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/rc_none.c
@@ -0,0 +1,88 @@
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+/*
+ * lib/krb5/rcache/rc_none.c
+ *
+ * Copyright 2004 by the Massachusetts Institute of Technology.
+ * All Rights Reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ *
+ * replay cache no-op implementation
+ */
+
+#include "k5-int.h"
+
+static krb5_error_code KRB5_CALLCONV
+krb5_rc_none_init(krb5_context ctx, krb5_rcache rc, krb5_deltat lifespan)
+{
+ return (0);
+}
+#define krb5_rc_none_recover_or_init krb5_rc_none_init
+
+static krb5_error_code KRB5_CALLCONV
+krb5_rc_none_noargs(krb5_context ctx, krb5_rcache rc)
+{
+ return (0);
+}
+#define krb5_rc_none_recover krb5_rc_none_noargs
+#define krb5_rc_none_destroy krb5_rc_none_noargs
+#define krb5_rc_none_close krb5_rc_none_noargs
+#define krb5_rc_none_expunge krb5_rc_none_noargs
+
+static krb5_error_code KRB5_CALLCONV
+krb5_rc_none_store(krb5_context ctx, krb5_rcache rc, krb5_donot_replay *r)
+{
+ return (0);
+}
+
+static krb5_error_code KRB5_CALLCONV
+krb5_rc_none_get_span(krb5_context ctx, krb5_rcache rc, krb5_deltat *d)
+{
+ return (0);
+}
+
+static char * KRB5_CALLCONV
+krb5_rc_none_get_name(krb5_context ctx, krb5_rcache rc)
+{
+ return ("");
+}
+
+static krb5_error_code KRB5_CALLCONV
+krb5_rc_none_resolve(krb5_context ctx, krb5_rcache rc, char *name)
+{
+ rc->data = "NONE";
+ return (0);
+}
+
+const krb5_rc_ops krb5_rc_none_ops = {
+ (0),
+ "NONE",
+ krb5_rc_none_init,
+ krb5_rc_none_recover,
+ krb5_rc_none_destroy,
+ krb5_rc_none_close,
+ krb5_rc_none_store,
+ krb5_rc_none_expunge,
+ krb5_rc_none_get_span,
+ krb5_rc_none_get_name,
+ krb5_rc_none_resolve
+};