Date: Wed, 5 Aug 1998 08:23:20 -0700 (PDT) From: tinguely@plains.NoDak.edu To: freebsd-gnats-submit@FreeBSD.ORG Subject: bin/7500: rshd fails on apps that can have input Message-ID: <199808051523.IAA00861@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 7500
>Category: bin
>Synopsis: rshd fails on apps that can have input
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Aug 5 08:30:01 PDT 1998
>Last-Modified:
>Originator: Mark Tinguely
>Organization:
North Dakota State University
>Release: 2.2.7-RELEASE only
>Environment:
FreeBSD hookie 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0: Mon Jul 27 10:03:08 CDT 1998 root@hookie:/home/tinguely/2.2.7-RELEASE/sys/compile/dec i386
>Description:
rsh commands to 2.2.7-RELEASE machines that can handle more input
will terminate immediately
>How-To-Repeat:
rsh 2.2.7HOST /etc/rmt
rsh 2.2.7HOST /bin/cat
rsh 2.2.7HOST /bin/sh
rsh 2.2.7HOST dd ...
basically any remote shell that can accept more input.
>Fix:
the socket filenumber is being lost because it is defined a local*** rshd.c.orig Wed Aug 5 10:15:51 1998
variable to the if statement. below is a patch file:
*** rshd.c.orig Wed Aug 5 10:15:51 1998
--- rshd.c Wed Aug 5 10:13:17 1998
***************
*** 304,310 ****
(void) alarm(0);
if (port != 0) {
int lport = IPPORT_RESERVED - 1;
! int s = rresvport(&lport);
if (s < 0) {
syslog(LOG_ERR, "can't get stderr port: %m");
exit(1);
--- 304,310 ----
(void) alarm(0);
if (port != 0) {
int lport = IPPORT_RESERVED - 1;
! s = rresvport(&lport);
if (s < 0) {
syslog(LOG_ERR, "can't get stderr port: %m");
exit(1);
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808051523.IAA00861>
