summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGünther Deschner <gdeschner@redhat.com>2013-03-07 23:07:55 +0100
committerSimo Sorce <simo@redhat.com>2013-03-14 13:42:50 -0400
commit25e52de4cacb3b2bb96475bbb90d9f518bcc1127 (patch)
tree92fc56bbb542c3476f244cb27dae2d9a5b3dad33
parent9fd4d3a355fefcf1c903502102e2e6407ae5f6dd (diff)
downloadgss-proxy-25e52de4cacb3b2bb96475bbb90d9f518bcc1127.tar.gz
gss-proxy-25e52de4cacb3b2bb96475bbb90d9f518bcc1127.tar.xz
gss-proxy-25e52de4cacb3b2bb96475bbb90d9f518bcc1127.zip
mechglue: add trace debugging
This is enabled via --with-gssidebug. Signed-off-by: Simo Sorce <simo@redhat.com>
-rw-r--r--proxy/conf_macros.m414
-rw-r--r--proxy/configure.ac1
-rw-r--r--proxy/src/mechglue/gpp_accept_sec_context.c2
-rw-r--r--proxy/src/mechglue/gpp_acquire_cred.c6
-rw-r--r--proxy/src/mechglue/gpp_context.c19
-rw-r--r--proxy/src/mechglue/gpp_creds.c17
-rw-r--r--proxy/src/mechglue/gpp_display_status.c2
-rw-r--r--proxy/src/mechglue/gpp_import_and_canon_name.c25
-rw-r--r--proxy/src/mechglue/gpp_indicate_mechs.c8
-rw-r--r--proxy/src/mechglue/gpp_init_sec_context.c2
-rw-r--r--proxy/src/mechglue/gpp_misc.c10
-rw-r--r--proxy/src/mechglue/gpp_priv_integ.c20
-rw-r--r--proxy/src/mechglue/gss_plugin.h20
13 files changed, 146 insertions, 0 deletions
diff --git a/proxy/conf_macros.m4 b/proxy/conf_macros.m4
index 3f7a81b..a0575f8 100644
--- a/proxy/conf_macros.m4
+++ b/proxy/conf_macros.m4
@@ -219,3 +219,17 @@ AC_DEFUN([WITH_CC_PATH],
AC_DEFINE_UNQUOTED(CCACHE_PATH, "$config_ccpath", [Where to store ccache files for gssproxy])
])
+AC_DEFUN([WITH_GSSIDEBUG],
+ [ AC_ARG_WITH([gssidebug],
+ [AC_HELP_STRING([--with-gssidebug],
+ [Whether to build with interposer debugging support [no]]
+ )
+ ],
+ [],
+ with_gssidebug=no
+ )
+ if test x"$with_gssidebug" = xyes; then
+ AC_DEFINE_UNQUOTED(GSSI_DEBUGGING, 1, [Build with interposer debugging support])
+ fi
+ ])
+
diff --git a/proxy/configure.ac b/proxy/configure.ac
index 5c12414..9290bee 100644
--- a/proxy/configure.ac
+++ b/proxy/configure.ac
@@ -65,6 +65,7 @@ WITH_TEST_DIR
WITH_MANPAGES
WITH_XML_CATALOG
WITH_SELINUX
+WITH_GSSIDEBUG
m4_include([external/pkg.m4])
m4_include([external/libpopt.m4])
diff --git a/proxy/src/mechglue/gpp_accept_sec_context.c b/proxy/src/mechglue/gpp_accept_sec_context.c
index 920d886..d91728e 100644
--- a/proxy/src/mechglue/gpp_accept_sec_context.c
+++ b/proxy/src/mechglue/gpp_accept_sec_context.c
@@ -44,6 +44,8 @@ OM_uint32 gssi_accept_sec_context(OM_uint32 *minor_status,
struct gpp_name_handle *name = NULL;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
behavior = gpp_get_behavior();
if (*context_handle) {
diff --git a/proxy/src/mechglue/gpp_acquire_cred.c b/proxy/src/mechglue/gpp_acquire_cred.c
index 1a655d3..85d4608 100644
--- a/proxy/src/mechglue/gpp_acquire_cred.c
+++ b/proxy/src/mechglue/gpp_acquire_cred.c
@@ -83,6 +83,8 @@ OM_uint32 gssi_acquire_cred(OM_uint32 *minor_status,
OM_uint32 maj, min;
OM_uint32 tmaj, tmin;
+ GSSI_TRACE();
+
if (!output_cred_handle) {
*minor_status = gpp_map_error(EINVAL);
return GSS_S_FAILURE;
@@ -175,6 +177,8 @@ OM_uint32 gssi_add_cred(OM_uint32 *minor_status,
OM_uint32 time_req, time_rec;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
if (!output_cred_handle) {
return GSS_S_CALL_INACCESSIBLE_WRITE;
}
@@ -250,6 +254,8 @@ OM_uint32 gssi_acquire_cred_with_password(OM_uint32 *minor_status,
gss_OID_set special_mechs;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)desired_name;
if (!output_cred_handle) {
diff --git a/proxy/src/mechglue/gpp_context.c b/proxy/src/mechglue/gpp_context.c
index 07125be..b5c8cfc 100644
--- a/proxy/src/mechglue/gpp_context.c
+++ b/proxy/src/mechglue/gpp_context.c
@@ -35,6 +35,8 @@ OM_uint32 gssi_export_sec_context(OM_uint32 *minor_status,
gss_buffer_desc output_token;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx = (struct gpp_context_handle *)context_handle;
if (!ctx) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -64,6 +66,7 @@ OM_uint32 gssi_import_sec_context(OM_uint32 *minor_status,
gss_buffer_t interprocess_token,
gss_ctx_id_t *context_handle)
{
+ GSSI_TRACE();
return GSS_S_UNAVAILABLE;
}
@@ -78,6 +81,8 @@ OM_uint32 gssi_import_sec_context_by_mech(OM_uint32 *minor_status,
OM_uint32 maj, min = 0;
uint32_t len;
+ GSSI_TRACE();
+
ctx = calloc(1, sizeof(struct gpp_context_handle));
if (!ctx) {
*minor_status = 0;
@@ -128,6 +133,8 @@ OM_uint32 gssi_process_context_token(OM_uint32 *minor_status,
struct gpp_context_handle *ctx;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx = (struct gpp_context_handle *)context_handle;
if (!ctx) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -153,6 +160,8 @@ OM_uint32 gssi_context_time(OM_uint32 *minor_status,
struct gpp_context_handle *ctx;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
ctx = (struct gpp_context_handle *)context_handle;
@@ -201,6 +210,8 @@ OM_uint32 gssi_inquire_context(OM_uint32 *minor_status,
gss_OID mech_oid;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
if (!context_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
}
@@ -291,6 +302,8 @@ OM_uint32 gssi_inquire_sec_context_by_oid(OM_uint32 *minor_status,
struct gpp_context_handle *ctx;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx = (struct gpp_context_handle *)context_handle;
if (!ctx) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -318,6 +331,8 @@ OM_uint32 gssi_set_sec_context_option(OM_uint32 *minor_status,
struct gpp_context_handle *ctx;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
if (context_handle) {
ctx = (struct gpp_context_handle *)context_handle;
} else {
@@ -354,6 +369,8 @@ OM_uint32 gssi_delete_sec_context(OM_uint32 *minor_status,
OM_uint32 maj, min;
OM_uint32 rmaj = GSS_S_COMPLETE;
+ GSSI_TRACE();
+
ctx = (struct gpp_context_handle *)*context_handle;
*context_handle = GSS_C_NO_CONTEXT;
@@ -387,6 +404,8 @@ OM_uint32 gssi_pseudo_random(OM_uint32 *minor_status,
struct gpp_context_handle *ctx;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx = (struct gpp_context_handle *)context_handle;
if (!ctx) {
return GSS_S_CALL_INACCESSIBLE_READ;
diff --git a/proxy/src/mechglue/gpp_creds.c b/proxy/src/mechglue/gpp_creds.c
index 6a880f1..30610e9 100644
--- a/proxy/src/mechglue/gpp_creds.c
+++ b/proxy/src/mechglue/gpp_creds.c
@@ -126,6 +126,8 @@ OM_uint32 gssi_inquire_cred(OM_uint32 *minor_status,
struct gpp_name_handle *gpname = NULL;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
if (cred_handle == GSS_C_NO_CREDENTIAL) {
maj = gppint_get_def_creds(&min, gpp_get_behavior(), NULL,
GSS_C_INITIATE, &cred);
@@ -183,6 +185,8 @@ OM_uint32 gssi_inquire_cred_by_mech(OM_uint32 *minor_status,
struct gpp_name_handle *gpname = NULL;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
if (cred_handle == GSS_C_NO_CREDENTIAL) {
maj = gppint_get_def_creds(&min, gpp_get_behavior(), NULL,
GSS_C_INITIATE, &cred);
@@ -239,6 +243,8 @@ OM_uint32 gssi_inquire_cred_by_oid(OM_uint32 *minor_status,
struct gpp_cred_handle *cred = NULL;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (cred_handle == GSS_C_NO_CREDENTIAL) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -266,6 +272,8 @@ OM_uint32 gssi_set_cred_option(OM_uint32 *minor_status,
struct gpp_cred_handle *cred = NULL;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (*cred_handle == GSS_C_NO_CREDENTIAL) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -295,6 +303,8 @@ OM_uint32 gssi_store_cred(OM_uint32 *minor_status,
struct gpp_cred_handle *cred = NULL;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (input_cred_handle == GSS_C_NO_CREDENTIAL) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -322,6 +332,8 @@ OM_uint32 gssi_release_cred(OM_uint32 *minor_status,
OM_uint32 maj, min;
OM_uint32 rmaj = GSS_S_COMPLETE;
+ GSSI_TRACE();
+
if (*cred_handle == GSS_C_NO_CREDENTIAL) {
*minor_status = 0;
return GSS_S_COMPLETE;
@@ -355,6 +367,8 @@ OM_uint32 gssi_export_cred(OM_uint32 *minor_status,
{
struct gpp_cred_handle *cred;
+ GSSI_TRACE();
+
cred = (struct gpp_cred_handle *)cred_handle;
if (!cred) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -373,6 +387,7 @@ OM_uint32 gssi_import_cred(OM_uint32 *minor_status,
gss_buffer_t token,
gss_cred_id_t *cred_handle)
{
+ GSSI_TRACE();
return GSS_S_UNAVAILABLE;
}
@@ -387,6 +402,8 @@ OM_uint32 gssi_import_cred_by_mech(OM_uint32 *minor_status,
OM_uint32 maj, min = 0;
uint32_t len;
+ GSSI_TRACE();
+
cred = calloc(1, sizeof(struct gpp_cred_handle));
if (!cred) {
*minor_status = 0;
diff --git a/proxy/src/mechglue/gpp_display_status.c b/proxy/src/mechglue/gpp_display_status.c
index 68cbf1f..a6ca502 100644
--- a/proxy/src/mechglue/gpp_display_status.c
+++ b/proxy/src/mechglue/gpp_display_status.c
@@ -34,6 +34,8 @@ OM_uint32 gssi_display_status(OM_uint32 *minor_status,
{
OM_uint32 maj, min, val;
+ GSSI_TRACE();
+
/* This function is only ever called for minor status values */
if (status_type != GSS_C_MECH_CODE) {
return GSS_S_BAD_STATUS;
diff --git a/proxy/src/mechglue/gpp_import_and_canon_name.c b/proxy/src/mechglue/gpp_import_and_canon_name.c
index e121782..ce8e102 100644
--- a/proxy/src/mechglue/gpp_import_and_canon_name.c
+++ b/proxy/src/mechglue/gpp_import_and_canon_name.c
@@ -33,6 +33,8 @@ OM_uint32 gssi_display_name(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -62,6 +64,8 @@ OM_uint32 gssi_display_name_ext(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -86,6 +90,7 @@ OM_uint32 gssi_import_name(OM_uint32 *minor_status,
gss_OID input_name_type,
gss_name_t *output_name)
{
+ GSSI_TRACE();
return GSS_S_UNAVAILABLE;
}
@@ -98,6 +103,8 @@ OM_uint32 gssi_import_name_by_mech(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
if (mech_type == GSS_C_NO_OID) {
return GSS_S_CALL_INACCESSIBLE_READ;
}
@@ -144,6 +151,8 @@ OM_uint32 gssi_export_name(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -166,6 +175,8 @@ OM_uint32 gssi_export_name_composite(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -191,6 +202,8 @@ OM_uint32 gssi_duplicate_name(OM_uint32 *minor_status,
struct gpp_name_handle *out_name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
in_name = (struct gpp_name_handle *)input_name;
if (!in_name->local && !in_name->remote) {
return GSS_S_BAD_NAME;
@@ -239,6 +252,8 @@ OM_uint32 gssi_inquire_name(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -268,6 +283,8 @@ OM_uint32 gssi_release_name(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)*input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -295,6 +312,8 @@ OM_uint32 gssi_compare_name(OM_uint32 *minor_status,
struct gpp_name_handle *gpname2;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
gpname1 = (struct gpp_name_handle *)name1;
gpname2 = (struct gpp_name_handle *)name2;
@@ -349,6 +368,8 @@ OM_uint32 gssi_get_name_attribute(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -376,6 +397,8 @@ OM_uint32 gssi_set_name_attribute(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
@@ -400,6 +423,8 @@ OM_uint32 gssi_delete_name_attribute(OM_uint32 *minor_status,
struct gpp_name_handle *name;
OM_uint32 maj, min = 0;
+ GSSI_TRACE();
+
name = (struct gpp_name_handle *)input_name;
if (!name->local && !name->remote) {
return GSS_S_BAD_NAME;
diff --git a/proxy/src/mechglue/gpp_indicate_mechs.c b/proxy/src/mechglue/gpp_indicate_mechs.c
index e5dac1c..45ed930 100644
--- a/proxy/src/mechglue/gpp_indicate_mechs.c
+++ b/proxy/src/mechglue/gpp_indicate_mechs.c
@@ -28,6 +28,7 @@
/* This will never be called, added only for completeness */
OM_uint32 gssi_indicate_mechs(OM_uint32 *minor_status, gss_OID_set *mech_set)
{
+ GSSI_TRACE();
*minor_status = 0;
return GSS_S_FAILURE;
}
@@ -40,6 +41,8 @@ OM_uint32 gssi_inquire_names_for_mech(OM_uint32 *minor_status,
OM_uint32 tmaj, tmin;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
behavior = gpp_get_behavior();
tmaj = GSS_S_COMPLETE;
tmin = 0;
@@ -91,6 +94,8 @@ OM_uint32 gssi_inquire_attrs_for_mech(OM_uint32 *minor_status,
OM_uint32 tmaj, tmin;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
behavior = gpp_get_behavior();
tmaj = GSS_S_COMPLETE;
tmin = 0;
@@ -142,6 +147,8 @@ OM_uint32 gssi_inquire_saslname_for_mech(OM_uint32 *minor_status,
OM_uint32 tmaj, tmin;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
behavior = gpp_get_behavior();
tmaj = GSS_S_COMPLETE;
tmin = 0;
@@ -191,6 +198,7 @@ OM_uint32 gssi_inquire_mech_for_saslname(OM_uint32 *minor_status,
const gss_buffer_t sasl_mech_name,
gss_OID *mech_type)
{
+ GSSI_TRACE();
/* FIXME: How to call into mechglue ? */
return GSS_S_UNAVAILABLE;
}
diff --git a/proxy/src/mechglue/gpp_init_sec_context.c b/proxy/src/mechglue/gpp_init_sec_context.c
index 95d1f7d..fc0489f 100644
--- a/proxy/src/mechglue/gpp_init_sec_context.c
+++ b/proxy/src/mechglue/gpp_init_sec_context.c
@@ -89,6 +89,8 @@ OM_uint32 gssi_init_sec_context(OM_uint32 *minor_status,
OM_uint32 tmaj, tmin;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
if (target_name == GSS_C_NO_NAME) {
return GSS_S_CALL_INACCESSIBLE_READ;
}
diff --git a/proxy/src/mechglue/gpp_misc.c b/proxy/src/mechglue/gpp_misc.c
index f97d97e..f76c53b 100644
--- a/proxy/src/mechglue/gpp_misc.c
+++ b/proxy/src/mechglue/gpp_misc.c
@@ -33,6 +33,8 @@ OM_uint32 gssi_mech_invoke(OM_uint32 *minor_status,
enum gpp_behavior behavior;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
/* FIXME: implement remote invoke mech, only local for now */
behavior = gpp_get_behavior();
if (behavior == GPP_REMOTE_ONLY) {
@@ -67,6 +69,8 @@ OM_uint32 gssi_localname(OM_uint32 *minor_status, const gss_name_t name,
struct gpp_name_handle *gpname;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (name == GSS_C_NO_NAME) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -100,6 +104,8 @@ OM_uint32 gssi_authorize_localname(OM_uint32 *minor_status,
gss_name_t username = GSS_C_NO_NAME;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (name == GSS_C_NO_NAME) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -135,6 +141,8 @@ OM_uint32 gssi_map_name_to_any(OM_uint32 *minor_status, gss_name_t name,
struct gpp_name_handle *gpname;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (name == GSS_C_NO_NAME) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -166,6 +174,8 @@ OM_uint32 gssi_release_any_name_mapping(OM_uint32 *minor_status,
struct gpp_name_handle *gpname;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
*minor_status = 0;
if (name == GSS_C_NO_NAME) {
return GSS_S_CALL_INACCESSIBLE_READ;
diff --git a/proxy/src/mechglue/gpp_priv_integ.c b/proxy/src/mechglue/gpp_priv_integ.c
index a27dae4..f3e9a5e 100644
--- a/proxy/src/mechglue/gpp_priv_integ.c
+++ b/proxy/src/mechglue/gpp_priv_integ.c
@@ -36,6 +36,8 @@ OM_uint32 gssi_wrap(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -68,6 +70,8 @@ OM_uint32 gssi_wrap_size_limit(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -100,6 +104,8 @@ OM_uint32 gssi_wrap_iov(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -132,6 +138,8 @@ OM_uint32 gssi_wrap_iov_length(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -165,6 +173,8 @@ OM_uint32 gssi_wrap_aead(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -197,6 +207,8 @@ OM_uint32 gssi_unwrap(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -228,6 +240,8 @@ OM_uint32 gssi_unwrap_iov(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -259,6 +273,8 @@ OM_uint32 gssi_unwrap_aead(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -290,6 +306,8 @@ OM_uint32 gssi_get_mic(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
@@ -322,6 +340,8 @@ OM_uint32 gssi_verify_mic(OM_uint32 *minor_status,
struct gpp_context_handle *ctx_handle;
OM_uint32 maj, min;
+ GSSI_TRACE();
+
ctx_handle = (struct gpp_context_handle *)context_handle;
if (!ctx_handle) {
return GSS_S_CALL_INACCESSIBLE_READ;
diff --git a/proxy/src/mechglue/gss_plugin.h b/proxy/src/mechglue/gss_plugin.h
index 02f6adc..c53eb38 100644
--- a/proxy/src/mechglue/gss_plugin.h
+++ b/proxy/src/mechglue/gss_plugin.h
@@ -54,6 +54,26 @@ enum gpp_behavior {
GPP_REMOTE_ONLY,
};
+#ifdef GSSI_DEBUGGING
+
+#define GSSI_DEBUG(...) \
+do { \
+ fprintf(stderr, "GSSI %s:%d ", __FUNCTION__, __LINE__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fflush(stderr); \
+} while(0);
+
+#define GSSI_TRACE(...) \
+do { \
+ fprintf(stderr, "GSSI %s:%d called\n", __FUNCTION__, __LINE__); \
+ fflush(stderr); \
+} while(0);
+
+#else
+#define GSSI_DEBUG(...)
+#define GSSI_TRACE(...)
+#endif /* GSSI_DEBUGGING */
+
gss_OID_set gss_mech_interposer(gss_OID mech_type);
enum gpp_behavior gpp_get_behavior(void);
bool gpp_is_special_oid(const gss_OID mech_type);