diff options
| author | W. Trevor King <wking@tremily.us> | 2012-05-17 21:26:36 -0400 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2012-05-23 15:56:21 -0400 |
| commit | 372b3e2a4f3bd9d1b2e05abec4c04b99962e582f (patch) | |
| tree | 9c92308e48f76f8efc15d92dda32cc5dadd6e428 /src/include | |
| parent | 9fa7456b57eb59a4302f50a0254e9981d23dc590 (diff) | |
| download | krb5-372b3e2a4f3bd9d1b2e05abec4c04b99962e582f.tar.gz krb5-372b3e2a4f3bd9d1b2e05abec4c04b99962e582f.tar.xz krb5-372b3e2a4f3bd9d1b2e05abec4c04b99962e582f.zip | |
Convert DEBUG_REFERRALS to TRACE_* framework
The referrals debugging code under DEBUG_REFERRALS ceased building
correctly at some point. Convert this debugging code to use the
tracing framework instead, including adding new trace macros to
k5-trace.h.
ticket: 7151
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/k5-int.h | 7 | ||||
| -rw-r--r-- | src/include/k5-trace.h | 46 |
2 files changed, 47 insertions, 6 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 1ea8c10c9..ca18baf13 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -2272,14 +2272,9 @@ extern krb5_error_code krb5int_c_mandatory_cksumtype(krb5_context, krb5_enctype, krb5_cksumtype *); /* - * Referral definitions, debugging hooks, and subfunctions. + * Referral definitions and subfunctions. */ #define KRB5_REFERRAL_MAXHOPS 10 -/* #define DEBUG_REFERRALS */ - -#ifdef DEBUG_REFERRALS -void krb5int_dbgref_dump_principal(char *, krb5_principal); -#endif /* Common hostname-parsing code. */ krb5_error_code diff --git a/src/include/k5-trace.h b/src/include/k5-trace.h index c889c50ea..f64dc70b8 100644 --- a/src/include/k5-trace.h +++ b/src/include/k5-trace.h @@ -386,4 +386,50 @@ void krb5int_trace(krb5_context context, const char *fmt, ...); #define TRACE_TKT_CREDS_WRONG_ENCTYPE(c) \ TRACE(c, "Retrying TGS request with desired service ticket enctypes") +#define TRACE_GET_HOST_REALM(c, host) \ + TRACE(c, "Get host realm for {str}", host) +#define TRACE_GET_HOST_REALM_LOCALHOST(c, localhost) \ + TRACE(c, "Use local host {str} to get host realm", localhost) +#define TRACE_GET_HOST_REALM_DOMAIN_REALM_MAP(c, host) \ + TRACE(c, "Look up {str} in the domain_realm map", host) +#define TRACE_GET_HOST_REALM_TEMP_REALM(c, realm) \ + TRACE(c, "Temporary realm is {str}", realm) +#define TRACE_GET_HOST_REALM_RETURN(c, host, realm) \ + TRACE(c, "Got realm {str} for host {str}", realm, host) + +#define TRACE_GET_FALLBACK_HOST_REALM(c, host) \ + TRACE(c, "Get fallback host realm for {str}", host) +#define TRACE_GET_FALLBACK_HOST_REALM_RETURN(c, host, realm) \ + TRACE(c, "Got fallback realm {str} for host {str}", realm, host) + +#define TRACE_CLEAN_HOSTNAME(c, host, size, localhost) \ + TRACE(c, "Clean host {str} with local host {lenstr}", \ + host, size, localhost) +#define TRACE_CLEAN_HOSTNAME_RETURN(c, host, size, localhost) \ + TRACE(c, "Cleaned host {str} to local host {lenstr}", \ + host, size, localhost) + +#define TRACE_SNAME_TO_PRINCIPAL(c, host, sname, type) \ + TRACE(c, "Convert service {str} ({ptype}) on host {str} to principal", \ + sname, type, host) +#define TRACE_SNAME_TO_PRINCIPAL_NOCANON(c, host) \ + TRACE(c, "Failed to canonicalize {str}; using as-is", host) +#define TRACE_SNAME_TO_PRINCIPAL_CANON(c, host) \ + TRACE(c, "Remote host after forward canonicalization: {str}", host) +#define TRACE_SNAME_TO_PRINCIPAL_RDNS(c, host) \ + TRACE(c, "Remote host after reverse DNS processing: {str}", host) +#define TRACE_SNAME_TO_PRINCIPAL_RETURN(c, princ) \ + TRACE(c, "Got service principal {princ}", princ) + +#define TRACE_CHECK_REPLY_SERVER_DIFFERS(c, request, reply) \ + TRACE(c, "Reply server {princ} differs from requested {princ}", \ + reply, request) + +#define TRACE_GET_CRED_VIA_TKT_EXT(c, request, reply, kdcoptions) \ + TRACE(c, "Get cred via TGT {princ} after requesting {prince} " \ + "(canonicalize {str})", \ + reply, request, kdcoptions & KDC_OPT_CANONICALIZE ? "on" : "off") +#define TRACE_GET_CRED_VIA_TKT_EXT_RETURN(c, ret) \ + TRACE(c, "Got cred; {kerr}", ret) + #endif /* K5_TRACE_H */ |
