projects
/
moonshot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d093300
)
build without RADIUS-related headers if no acceptor
author
Luke Howard
<lukeh@padl.com>
Tue, 13 Sep 2011 04:16:17 +0000
(14:16 +1000)
committer
Luke Howard
<lukeh@padl.com>
Tue, 13 Sep 2011 04:16:17 +0000
(14:16 +1000)
moonshot/mech_eap/Makefile.am
patch
|
blob
|
history
moonshot/mech_eap/gssapiP_eap.h
patch
|
blob
|
history
moonshot/mech_eap/import_sec_context.c
patch
|
blob
|
history
moonshot/mech_eap/util.h
patch
|
blob
|
history
moonshot/mech_eap/util_radius.h
patch
|
blob
|
history
diff --git
a/moonshot/mech_eap/Makefile.am
b/moonshot/mech_eap/Makefile.am
index
0214ca0
..
86b575e
100644
(file)
--- a/
moonshot/mech_eap/Makefile.am
+++ b/
moonshot/mech_eap/Makefile.am
@@
-73,7
+73,6
@@
mech_eap_la_SOURCES = \
store_cred.c \
unwrap.c \
unwrap_iov.c \
store_cred.c \
unwrap.c \
unwrap_iov.c \
- util_base64.c \
util_buffer.c \
util_context.c \
util_cksum.c \
util_buffer.c \
util_context.c \
util_cksum.c \
@@
-105,6
+104,7
@@
mech_eap_la_SOURCES += \
release_any_name_mapping.c \
set_name_attribute.c \
util_attr.cpp \
release_any_name_mapping.c \
set_name_attribute.c \
util_attr.cpp \
+ util_base64.c \
util_json.cpp \
util_radius.cpp
util_json.cpp \
util_radius.cpp
diff --git
a/moonshot/mech_eap/gssapiP_eap.h
b/moonshot/mech_eap/gssapiP_eap.h
index
fcd4bab
..
b141032
100644
(file)
--- a/
moonshot/mech_eap/gssapiP_eap.h
+++ b/
moonshot/mech_eap/gssapiP_eap.h
@@
-83,6
+83,7
@@
typedef const gss_OID_desc *gss_const_OID;
#include <wpabuf.h>
/* FreeRADIUS headers */
#include <wpabuf.h>
/* FreeRADIUS headers */
+#ifdef GSSEAP_ENABLE_ACCEPTOR
#ifdef __cplusplus
extern "C" {
#define operator fr_operator
#ifdef __cplusplus
extern "C" {
#define operator fr_operator
@@
-95,6
+96,7
@@
extern "C" {
#undef operator
}
#endif
#undef operator
}
#endif
+#endif /* GSSEAP_ENABLE_ACCEPTOR */
#include "gsseap_err.h"
#include "radsec_err.h"
#include "gsseap_err.h"
#include "radsec_err.h"
@@
-184,6
+186,7
@@
struct gss_eap_initiator_ctx {
struct wpabuf reqData;
};
struct wpabuf reqData;
};
+#ifdef GSSEAP_ENABLE_ACCEPTOR
struct gss_eap_acceptor_ctx {
struct rs_context *radContext;
struct rs_connection *radConn;
struct gss_eap_acceptor_ctx {
struct rs_context *radContext;
struct rs_connection *radConn;
@@
-191,6
+194,7
@@
struct gss_eap_acceptor_ctx {
gss_buffer_desc state;
VALUE_PAIR *vps;
};
gss_buffer_desc state;
VALUE_PAIR *vps;
};
+#endif
#ifdef HAVE_HEIMDAL_VERSION
struct gss_ctx_id_t_desc_struct
#ifdef HAVE_HEIMDAL_VERSION
struct gss_ctx_id_t_desc_struct
@@
-215,8
+219,10
@@
struct gss_ctx_id_struct
union {
struct gss_eap_initiator_ctx initiator;
#define initiatorCtx ctxU.initiator
union {
struct gss_eap_initiator_ctx initiator;
#define initiatorCtx ctxU.initiator
+#ifdef GSSEAP_ENABLE_ACCEPTOR
struct gss_eap_acceptor_ctx acceptor;
#define acceptorCtx ctxU.acceptor
struct gss_eap_acceptor_ctx acceptor;
#define acceptorCtx ctxU.acceptor
+#endif
#ifdef GSSEAP_ENABLE_REAUTH
gss_ctx_id_t reauth;
#define reauthCtx ctxU.reauth
#ifdef GSSEAP_ENABLE_REAUTH
gss_ctx_id_t reauth;
#define reauthCtx ctxU.reauth
@@
-311,6
+317,10
@@
gssEapSaveStatusInfo(OM_uint32 minor, const char *format, ...);
#define IS_WIRE_ERROR(err) ((err) > GSSEAP_RESERVED && \
(err) <= GSSEAP_RADIUS_PROT_FAILURE)
#define IS_WIRE_ERROR(err) ((err) > GSSEAP_RESERVED && \
(err) <= GSSEAP_RADIUS_PROT_FAILURE)
+/* upper bound of RADIUS error range must be kept in sync with radsec.h */
+#define IS_RADIUS_ERROR(err) ((err) >= ERROR_TABLE_BASE_rse && \
+ (err) <= ERROR_TABLE_BASE_rse + 20)
+
/* export_sec_context.c */
OM_uint32
gssEapExportSecContext(OM_uint32 *minor,
/* export_sec_context.c */
OM_uint32
gssEapExportSecContext(OM_uint32 *minor,
diff --git
a/moonshot/mech_eap/import_sec_context.c
b/moonshot/mech_eap/import_sec_context.c
index
9d6ae3d
..
1b9c0ad
100644
(file)
--- a/
moonshot/mech_eap/import_sec_context.c
+++ b/
moonshot/mech_eap/import_sec_context.c
@@
-48,6
+48,7
@@
} \
} while (0)
} \
} while (0)
+#ifdef GSSEAP_ENABLE_ACCEPTOR
static OM_uint32
gssEapImportPartialContext(OM_uint32 *minor,
unsigned char **pBuf,
static OM_uint32
gssEapImportPartialContext(OM_uint32 *minor,
unsigned char **pBuf,
@@
-113,6
+114,7
@@
gssEapImportPartialContext(OM_uint32 *minor,
return GSS_S_COMPLETE;
}
return GSS_S_COMPLETE;
}
+#endif
static OM_uint32
importMechanismOid(OM_uint32 *minor,
static OM_uint32
importMechanismOid(OM_uint32 *minor,
@@
-304,6
+306,7
@@
gssEapImportContext(OM_uint32 *minor,
if (GSS_ERROR(major))
return major;
if (GSS_ERROR(major))
return major;
+#ifdef GSSEAP_ENABLE_ACCEPTOR
/*
* The partial context should only be expected for unestablished
* acceptor contexts.
/*
* The partial context should only be expected for unestablished
* acceptor contexts.
@@
-318,6
+321,7
@@
gssEapImportContext(OM_uint32 *minor,
#ifdef GSSEAP_DEBUG
assert(remain == 0);
#endif
#ifdef GSSEAP_DEBUG
assert(remain == 0);
#endif
+#endif
major = GSS_S_COMPLETE;
*minor = 0;
major = GSS_S_COMPLETE;
*minor = 0;
diff --git
a/moonshot/mech_eap/util.h
b/moonshot/mech_eap/util.h
index
04fa4b9
..
905916b
100644
(file)
--- a/
moonshot/mech_eap/util.h
+++ b/
moonshot/mech_eap/util.h
@@
-960,9
+960,11
@@
gssBufferToKrbData(gss_buffer_t buffer, krb5_data *data)
}
#endif
}
#endif
+#ifdef GSSEAP_ENABLE_ACCEPTOR
#include "util_json.h"
#include "util_attr.h"
#include "util_base64.h"
#include "util_json.h"
#include "util_attr.h"
#include "util_base64.h"
+#endif
#ifdef GSSEAP_ENABLE_REAUTH
#include "util_reauth.h"
#endif
#ifdef GSSEAP_ENABLE_REAUTH
#include "util_reauth.h"
#endif
diff --git
a/moonshot/mech_eap/util_radius.h
b/moonshot/mech_eap/util_radius.h
index
04e6fc5
..
da790ab
100644
(file)
--- a/
moonshot/mech_eap/util_radius.h
+++ b/
moonshot/mech_eap/util_radius.h
@@
-170,9
+170,6
@@
gssEapRadiusMapError(OM_uint32 *minor,
#define PW_SAML_AAA_ASSERTION 132
#define PW_MS_WINDOWS_AUTH_DATA 133
#define PW_SAML_AAA_ASSERTION 132
#define PW_MS_WINDOWS_AUTH_DATA 133
-#define IS_RADIUS_ERROR(code) ((code) >= ERROR_TABLE_BASE_rse && \
- (code) <= ERROR_TABLE_BASE_rse + RSE_TIMEOUT_IO)
-
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
}
#endif