Skip to content

Commit

Permalink
Activate various debug options, print more debug info.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadamowski committed Jan 22, 2012
1 parent 679f898 commit ee37b5b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/krb5/os/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ KRB5_RUN_ENV = @KRB5_RUN_ENV@
PROG_LIBPATH=-L$(TOPLIBD)
PROG_RPATH=$(KRB5_LIBDIR)
DEFS=
DEFINES=-DLIBDIR=\"$(KRB5_LIBDIR)\"
DEFINES=-DLIBDIR=\"$(KRB5_LIBDIR)\" -DDEBUG -DTEST
LOCALINCLUDES=-I$(top_srcdir)/util/profile

##DOS##BUILDTOP = ..\..\..
Expand Down
1 change: 1 addition & 0 deletions src/lib/krb5/os/locate_kdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ k5_free_serverlist (struct serverlist *list)
list->nservers = 0;
}

#define TEST
#include <stdarg.h>
static inline void
Tprintf(const char *fmt, ...)
Expand Down
14 changes: 9 additions & 5 deletions src/lib/krb5/os/sendto_kdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
#define DEFAULT_UDP_PREF_LIMIT 1465
#define HARD_UDP_LIMIT 32700 /* could probably do 64K-epsilon ? */

#undef DEBUG
/*#undef DEBUG*/

#ifdef DEBUG
int krb5int_debug_sendto_kdc = 0;
int krb5int_debug_sendto_kdc = 1;
#define debug krb5int_debug_sendto_kdc

static void
Expand Down Expand Up @@ -338,15 +338,19 @@ krb5_sendto_kdc(krb5_context context, const krb5_data *message,

retval = k5_locate_kdc(context, realm, &servers, *use_master,
tcp_only ? SOCK_STREAM : 0);
if (retval)
dprint("k5_locate_kdc retval: [%d]\n", retval);

if (retval) {
dprint("Error [%d], message: [%s]\n", context->err.code, context->err.msg);
return retval;
}
#ifdef KRB5_KRBLDAP
dprint("using krbldap protocol to send kerberos message.");
dprint("using krbldap protocol to send kerberos message.\n");
retval = krbldap_sendto(context, message, &servers, socktype1, socktype2,
NULL, reply, NULL, NULL, &server_used,
check_for_svc_unavailable, &err);
#else
dprint("using kerberos v5 protocol to send kerberos message.");
dprint("using kerberos v5 protocol to send kerberos message.\n");
retval = k5_sendto(context, message, &servers, socktype1, socktype2,
NULL, reply, NULL, NULL, &server_used,
check_for_svc_unavailable, &err);
Expand Down

0 comments on commit ee37b5b

Please sign in to comment.