From 71fdba4c460d5eeb152869246f91aa8f999e50c0 Mon Sep 17 00:00:00 2001 From: John Carr Date: Tue, 11 Feb 1992 03:12:06 +0000 Subject: [PATCH] Add debugging, fix printf calls git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2203 dc483132-0cff-0310-8789-dd5450dbe970 --- src/slave/kpropd.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/slave/kpropd.c b/src/slave/kpropd.c index f0fed3474..934801adf 100644 --- a/src/slave/kpropd.c +++ b/src/slave/kpropd.c @@ -109,7 +109,8 @@ void recv_error(); static void usage() { fprintf(stderr, - "\nUsage: %s [-r realm] [-s srvtab] [-dS] [-f slave_file]\n"); + "\nUsage: %s [-r realm] [-s srvtab] [-dS] [-f slave_file]\n", + progname); fprintf(stderr, "\t[-F kerberos_db_file ] [-p kdb5_edit_pathname]\n\n", progname); exit(1); @@ -150,7 +151,7 @@ void do_standalone() sin.sin_port = sp->s_port; if (bind(finet, (struct sockaddr *) &sin, sizeof(sin)) < 0) { perror("bind"); - com_err(progname, errno, "while binding listener socker"); + com_err(progname, errno, "while binding listener socket"); exit(1); } if (!debug) @@ -512,7 +513,19 @@ kerberos_authenticate(fd, clientp, sin) receiver_addr.contents = (krb5_octet *) malloc(sizeof(r_sin.sin_addr)); memcpy((char *) receiver_addr.contents, (char *) &r_sin.sin_addr, sizeof(r_sin.sin_addr)); - + + if (debug) { + char *name; + if (retval = krb5_unparse_name(server, &name)) { + com_err(progname, retval, + "While unparsing client name"); + exit(1); + } + printf("krb5_recvauth(&%d, %s, %s, ...)\n", fd, + kprop_version, name); + free(name); + } + if (retval = krb5_recvauth((void *) &fd, kprop_version, server, &sender_addr, kerb_keytab, NULL, NULL, "dfl", &my_seq_num, clientp, &ticket, -- 2.26.2