From: Geoffrey King Date: Sat, 15 Aug 1998 05:26:28 +0000 (+0000) Subject: * krcp.c (error): Don't call rcmd_stream_write if iamremote is not X-Git-Tag: krb5-1.1-beta1~578 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=444f87548c1976baf6116a5921e7e79c078fdf32;p=krb5.git * krcp.c (error): Don't call rcmd_stream_write if iamremote is not set, because it expects a valid file descriptor [krb5-appl/359]. Also, remove mistakenly duplicated comment above the function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10826 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 2437fd01f..cee882741 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,9 @@ +Sat Aug 15 00:01:15 1998 Geoffrey King + + * krcp.c (error): Don't call rcmd_stream_write if iamremote is not + set, because it expects a valid file descriptor [krb5-appl/359]. + Also, remove mistakenly duplicated comment above the function. + Mon Jul 27 00:06:20 1998 Geoffrey King * krlogin.c (main): Apply ghudson's patch so that rlogin -a diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 1a1a862dd..967014579 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -1134,12 +1134,6 @@ struct buffer *allocbuf(bp, fd, blksize) return (bp); } - - -/* This function is mostly vestigial, since under normal operation - * the -x flag doesn't get set for the server process for encrypted - * rcp. It only gets called by beta clients attempting user-to-user - * authentication. */ void #ifdef HAVE_STDARG_H error(char *fmt, ...) @@ -1164,8 +1158,9 @@ error(fmt, va_alist) (void) vsprintf(cp, fmt, ap); va_end(ap); - (void) rcmd_stream_write(rem, buf, strlen(buf)); - if (iamremote == 0) + if (iamremote) + (void) rcmd_stream_write(rem, buf, strlen(buf)); + else (void) write(2, buf+1, strlen(buf+1)); } @@ -1255,8 +1250,6 @@ char **save_argv(argc, argv) #endif - - /* This function is mostly vestigial, since under normal operation * the -x flag doesn't get set for the server process for encrypted * rcp. It only gets called by beta clients attempting user-to-user