From 5c54e7838b4fcddeed9b053415b475d96b61be50 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 26 Feb 1996 00:14:35 +0000 Subject: [PATCH] Fix the server side of the krlogin bug detecting eof in connection close Also, import the ops changes to do with enable-athena. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7545 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 16 ++++++++++++++++ src/appl/bsd/configure.in | 5 ++++- src/appl/bsd/krcp.c | 6 ++++-- src/appl/bsd/krlogin.c | 2 ++ src/appl/bsd/krlogind.c | 2 +- src/appl/bsd/krsh.c | 4 ++-- 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 8549d29f0..c05209c48 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,10 @@ +Sun Feb 25 18:50:45 1996 Sam Hartman + + * krlogind.c (v5_des_read): Fix server side of bug in detecing eof + on the network connection. Same as client change: v5_des_read + needs to return 0 if read returns <= 0, notjust a strict + inequality. + Mon Feb 12 22:41:06 1996 Theodore Y. Ts'o * kcmd.c (kcmd): Fix lint flame (added missing cast). @@ -11,6 +18,15 @@ Fri Feb 9 20:18:48 1996 * krlogind.c (recvauth): Fix v4 incompatability created by checksum code; if using v4, don't try to verify a v5 checksum. +||||||| 5.174.2.1 +Fri Feb 2 16:10:56 1996 Sam Hartman + + * configure.in (save_path): Look for "ucb" varients in /usr/athena/bin if --enable-athena specified. + + + * krsh.c krlogin.c krcp.c (try_normal): If a--enable-athena, don't quit just because we are encrypted. + + Thu Feb 1 00:09:13 1996 Sam Hartman * rcp.M: Fix typo. diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index de267b7b2..c8d859718 100644 --- a/src/appl/bsd/configure.in +++ b/src/appl/bsd/configure.in @@ -69,7 +69,10 @@ dnl Check for where the BSD rlogin, rcp, and rsh programs live. dnl save_path=$PATH AC_PROG_ECHO_N -PATH=/bin:/usr/bin:/usr/bsd:/usr/ucb +AC_ARG_ENABLE([athena], +[ --enable-athena build with MIT Project Athena configuration], +[PATH=/usr/athena/bin:/bin:/usr/bin:/usr/bsd:/usr/ucb], +[PATH=/bin:/usr/bin:/usr/bsd:/usr/ucb]) AC_PATH_PROG(UCB_RLOGIN,rlogin,/usr/ucb/rlogin) AC_PATH_PROG(UCB_RSH,rsh,/usr/ucb/rsh) AC_PATH_PROG(UCB_RCP,rcp,/usr/ucb/rcp) diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index f46e16352..e96c5f431 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -1220,8 +1220,10 @@ void try_normal(argv) char **argv; { register int i; - - if (!encryptflag) { +#ifndef KRB5_ATHENA_COMPAT + if (!encryptflag) + #endif + { fprintf(stderr,"trying normal rcp (%s)\n", UCB_RCP); fflush(stderr); /* close all but stdin, stdout, stderr */ diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index 1450a5095..e8b205da8 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -1564,8 +1564,10 @@ void try_normal(argv) { register char *host; +#ifndef KRB5_ATHENA_COMPAT if (encrypt_flag) exit(1); +#endif fprintf(stderr,"trying normal rlogin (%s)\n", UCB_RLOGIN); fflush(stderr); diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c index ab9f5ea3e..924a1937a 100644 --- a/src/appl/bsd/krlogind.c +++ b/src/appl/bsd/krlogind.c @@ -1226,7 +1226,7 @@ v5_des_read(fd, buf, len) cc = krb5_net_read(bsd_context, fd, &c, 1); /* we should check for non-blocking here, but we'd have to make it save partial reads as well. */ - if (cc < 0) return 0; /* read error */ + if (cc <= 0) return 0; /* read error */ if (cc == 1) { if (c == 0) gotzero = 1; } diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c index 8ac92ef30..88c630e23 100644 --- a/src/appl/bsd/krsh.c +++ b/src/appl/bsd/krsh.c @@ -547,9 +547,10 @@ void try_normal(argv) { char *host; +#ifndef KRB5_ATHENA_COMPAT if (encrypt_flag) exit(1); - +#endif /* * if we were invoked as 'rsh host mumble', strip off the rsh * from arglist. @@ -683,4 +684,3 @@ int des_write(fd, buf, len) else return(len); } #endif /* KERBEROS */ - -- 2.26.2