KRB5_RUN_ENV=@KRB5_RUN_ENV@
DEFINES=-DKRB5_KERNEL
-ALL_CFLAGS=$(CFLAGS) $(DEFS) $(DEFINES) -I. -Igssapi
+ALL_CFLAGS=$(CFLAGS) $(WARN_CFLAGS) $(DEFS) $(DEFINES) -I. -Igssapi
PROG_LIBPATH=-L$(TOPLIBD)
SHLIB_EXPDEPS = \
gssapiP_generic.h gssapiP_krb5.h gssapi_err_generic.h \
gssapi_err_krb5.h gssapi_generic.h k5-buf.h k5-err.h \
k5-gmt_mktime.h k5-int-pkinit.h k5-int.h k5-platform.h \
- k5-plugin.h k5-thread.h k5-trace.h kernel_gss.c krb5.h \
- krb5/authdata_plugin.h krb5/krb5.h krb5/plugin.h krb5/preauth_plugin.h \
- osconf.h port-sockets.h profile.h socket-utils.h
+ k5-plugin.h k5-thread.h k5-trace.h kernel_gss.c kernel_gss.h \
+ krb5.h krb5/authdata_plugin.h krb5/krb5.h krb5/plugin.h \
+ krb5/preauth_plugin.h osconf.h port-sockets.h profile.h \
+ socket-utils.h
$(OUTPRE)k5seal.$(OBJEXT): autoconf.h com_err.h gssapi/gssapi.h \
gssapi/gssapi_ext.h gssapi/gssapi_krb5.h gssapiP_generic.h \
gssapiP_krb5.h gssapi_err_generic.h gssapi_err_krb5.h \
k5-buf.h k5-err.h k5-gmt_mktime.h k5-int-pkinit.h k5-int.h \
k5-platform.h k5-plugin.h k5-thread.h k5-trace.h krb5.h \
krb5/authdata_plugin.h krb5/krb5.h krb5/plugin.h krb5/preauth_plugin.h \
- osconf.h port-sockets.h profile.h socket-utils.h t_kgss_common.c
+ osconf.h port-sockets.h profile.h socket-utils.h t_kgss_common.c \
+ t_kgss_common.h
$(OUTPRE)t_kgss_user.$(OBJEXT): autoconf.h com_err.h \
gssapi/gssapi.h gssapi/gssapi_ext.h gssapi/gssapi_krb5.h \
k5-buf.h k5-err.h k5-gmt_mktime.h k5-int-pkinit.h k5-int.h \
t_kgss_user.c
$(OUTPRE)t_kgss_kernel.$(OBJEXT): autoconf.h com_err.h \
gssapi/gssapi.h gssapi/gssapi_ext.h gssapi/gssapi_krb5.h \
- k5-buf.h k5-err.h k5-gmt_mktime.h k5-int-pkinit.h k5-int.h \
- k5-platform.h k5-plugin.h k5-thread.h k5-trace.h krb5.h \
+ gssapiP_generic.h gssapiP_krb5.h gssapi_err_generic.h \
+ gssapi_err_krb5.h gssapi_generic.h k5-buf.h k5-err.h \
+ k5-gmt_mktime.h k5-int-pkinit.h k5-int.h k5-platform.h \
+ k5-plugin.h k5-thread.h k5-trace.h kernel_gss.h krb5.h \
krb5/authdata_plugin.h krb5/krb5.h krb5/plugin.h krb5/preauth_plugin.h \
- osconf.h port-sockets.h profile.h socket-utils.h t_kgss_kernel.c
+ osconf.h port-sockets.h profile.h socket-utils.h t_kgss_common.h \
+ t_kgss_kernel.c
*/
#include "gssapiP_krb5.h"
+#include "kernel_gss.h"
/* Normally defined in lib/gssapi/krb5/gssapi_krb5.c. */
static const gss_OID_desc oid_array[] = {
lkey_to_key(const gss_krb5_lucid_key_t *lkey, krb5_key *key_out)
{
krb5_keyblock kb;
- krb5_key key;
kb.enctype = lkey->type;
kb.length = lkey->length;
--- /dev/null
+/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
+/* util/gss-kernel-lib/kernel_gss.h - Declarations for kernel GSS library */
+/*
+ * Copyright (C) 2011 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.
+ */
+
+#ifndef KERNEL_GSS_H
+#define KERNEL_GSS_H
+
+#include <gssapi/gssapi_krb5.h>
+
+OM_uint32
+krb5_gss_import_lucid_sec_context(OM_uint32 *minor_status, void *lctx,
+ gss_ctx_id_t *context_handle_out);
+
+#endif /* KERNEL_GSS_H */
#include "k5-int.h"
#include <unistd.h>
#include <gssapi/gssapi_krb5.h>
+#include "t_kgss_common.h"
/* Write len bytes of data to fd, aborting on failure. */
void
#include "k5-int.h"
#include <unistd.h>
#include "gssapi_krb5.h"
+#include "gssapiP_krb5.h"
+#include "kernel_gss.h"
+#include "t_kgss_common.h"
/* If major represents an error, display an error message and exit. */
static void
read_wrap_token(gss_ctx_id_t ctx)
{
OM_uint32 major, minor;
- unsigned char *data;
- size_t len;
gss_buffer_desc wrapped, buf;
read_data(STDIN_FILENO, &wrapped.value, &wrapped.length);
read_mic_token(gss_ctx_id_t ctx)
{
OM_uint32 major, minor;
- unsigned char *data;
- size_t len;
gss_buffer_desc mic, buf;
read_data(STDIN_FILENO, &mic.value, &mic.length);
} else
abort();
assert(krb5int_buf_data(&buf) != NULL);
- *data_out = krb5int_buf_data(&buf);
+ *data_out = (unsigned char *)krb5int_buf_data(&buf);
*len_out = krb5int_buf_len(&buf);
}
read_wrap_token(gss_ctx_id_t ctx, int fd)
{
OM_uint32 major, minor;
- unsigned char *data;
- size_t len;
gss_buffer_desc wrapped, buf;
read_data(fd, &wrapped.value, &wrapped.length);
read_mic_token(gss_ctx_id_t ctx, int fd)
{
OM_uint32 major, minor;
- unsigned char *data;
- size_t len;
gss_buffer_desc mic, buf;
read_data(fd, &mic.value, &mic.length);