From 684ac5c334c03708895ab38e9a5969ef2f10ef15 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sun, 27 Dec 1998 02:53:59 +0000 Subject: [PATCH] Temporary patch for krb5-appl/678; avoid data from stdout being mixed to stderr git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11095 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 7 +++++++ src/appl/bsd/defines.h | 1 + src/appl/bsd/kcmd.c | 2 +- src/appl/bsd/krsh.c | 4 ++-- src/appl/bsd/krshd.c | 10 ++++++---- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 1159663c8..9ea3553af 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,9 @@ +1998-11-28 Sam Hartman + + * krshd.c krsh.c: Use RCMD_BUFSIZ not RSH_BUFSIZE [krb5-appl/678] + + * kcmd.c: Move RCMD_BUFSIZ into defines.h + 1998-11-16 Geoffrey King * login.c (login_get_kconf): Also test whether *kconf_val is null @@ -10,6 +16,7 @@ * Makefile.in: Set the myfulldir and mydir variables (which are relative to buildtop and thisconfigdir, respectively.) + 1998-10-24 Marc Horowitz * login.c: update to new get_creds API diff --git a/src/appl/bsd/defines.h b/src/appl/bsd/defines.h index 6a975d3c1..fd9c3e14c 100644 --- a/src/appl/bsd/defines.h +++ b/src/appl/bsd/defines.h @@ -1,2 +1,3 @@ #define OPTS_FORWARD_CREDS 0x00000002 #define OPTS_FORWARDABLE_CREDS 0x00000001 +#define RCMD_BUFSIZ 5120 diff --git a/src/appl/bsd/kcmd.c b/src/appl/bsd/kcmd.c index f77571917..6ed5e8d77 100644 --- a/src/appl/bsd/kcmd.c +++ b/src/appl/bsd/kcmd.c @@ -98,7 +98,7 @@ extern krb5_context bsd_context; extern Key_schedule v4_schedule; #endif -#define RCMD_BUFSIZ 5120 + #define START_PORT 5120 /* arbitrary */ char *default_service = "host"; diff --git a/src/appl/bsd/krsh.c b/src/appl/bsd/krsh.c index 1b033e3cf..9d602b22a 100644 --- a/src/appl/bsd/krsh.c +++ b/src/appl/bsd/krsh.c @@ -93,7 +93,7 @@ krb5_sigtype sendsig(); #define UCB_RSH "/usr/ucb/rsh" #endif -#define RSH_BUFSIZ 4096 + krb5_context bsd_context; krb5_creds *cred; @@ -129,7 +129,7 @@ main(argc, argv0) char **argv0; { int rem, pid; - char *host=0, *cp, **ap, buf[RSH_BUFSIZ], *args, **argv = argv0, *user = 0; + char *host=0, *cp, **ap, buf[RCMD_BUFSIZ], *args, **argv = argv0, *user = 0; register int cc; struct passwd *pwd; fd_set readfrom, ready; diff --git a/src/appl/bsd/krshd.c b/src/appl/bsd/krshd.c index 6f9468e80..e8a1b11c8 100644 --- a/src/appl/bsd/krshd.c +++ b/src/appl/bsd/krshd.c @@ -73,7 +73,9 @@ char copyright[] = #define SERVE_NON_KRB #define LOG_REMOTE_REALM #define LOG_CMD - +#include "defines.h" + + #ifdef HAVE_UNISTD_H #include #endif @@ -163,7 +165,7 @@ Key_schedule v4_schedule; #define ARGSTR "ek54ciD:S:M:AP:?L:" -#define RSHD_BUFSIZ 5120 + #define MAXRETRIES 4 @@ -577,7 +579,7 @@ void doit(f, fromp) short port; int pv[2], pw[2], px[2], cc; fd_set ready, readfrom; - char buf[RSHD_BUFSIZ], sig; + char buf[RCMD_BUFSIZ], sig; struct sockaddr_in fromaddr; struct sockaddr_in localaddr; int non_privileged = 0; @@ -1457,7 +1459,7 @@ void error(fmt, a1, a2, a3) char *fmt; char *a1, *a2, *a3; { - char buf[RSHD_BUFSIZ]; + char buf[RCMD_BUFSIZ]; buf[0] = 1; (void) sprintf(buf+1, "%s: ", progname); -- 2.26.2