From 27daaa9460920d2cd91227ab2ec2c184da5b5d7a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Mon, 28 Feb 2000 21:54:26 +0000 Subject: [PATCH] * krlogin.c (main): Don't output debugging messages if debugging wasn't turned on git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12088 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 5 +++++ src/appl/bsd/krlogin.c | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 31bd1b4a0..9b9c7c8d0 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,8 @@ +2000-02-28 Ken Raeburn + + * krlogin.c (main): Don't output debugging messages if debugging + wasn't turned on. + 2000-02-10 Ken Raeburn * login.c (main): Only destroy xtra_creds if non-null. (Patch diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index 061109eb5..da4a88980 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -376,7 +376,7 @@ main(argc, argv) MSG_DAT v4_msg_data; #endif #endif - int debug_port = 0; + int port, debug_port = 0; memset(&defaultservent, 0, sizeof(struct servent)); if (strrchr(argv[0], '/')) @@ -521,7 +521,9 @@ main(argc, argv) #endif - if(debug_port == 0) { + if (debug_port) + port = debug_port; + else { #ifdef KERBEROS /* * if there is an entry in /etc/services for Kerberos login, @@ -544,7 +546,7 @@ main(argc, argv) } #endif /* KERBEROS */ - debug_port = sp->s_port; + port = sp->s_port; } @@ -621,7 +623,7 @@ main(argc, argv) if (Fflag) authopts |= OPTS_FORWARDABLE_CREDS; - status = kcmd(&sock, &host, debug_port, + status = kcmd(&sock, &host, port, null_local_username ? "" : pwd->pw_name, name ? name : pwd->pw_name, term, 0, "host", krb_realm, @@ -635,7 +637,7 @@ main(argc, argv) if (status) { #ifdef KRB5_KRB4_COMPAT fprintf(stderr, "Trying krb4 rlogin...\n"); - status = k4cmd(&sock, &host, debug_port, + status = k4cmd(&sock, &host, port, null_local_username ? "" : pwd->pw_name, name ? name : pwd->pw_name, term, 0, &v4_ticket, "rcmd", krb_realm, @@ -666,7 +668,7 @@ main(argc, argv) rem = sock; #else - rem = rcmd(&host, debug_port, + rem = rcmd(&host, port, null_local_username ? "" : pwd->pw_name, name ? name : pwd->pw_name, term, 0); #endif /* KERBEROS */ -- 2.26.2