Date: Fri, 28 Jan 2000 22:13:05 +0900 From: Yoshinobu Inoue <shin@nd.net.fujitsu.co.jp> To: fritz.heinrichmeyer@fernuni-hagen.de Cc: freebsd-current@FreeBSD.ORG Subject: Re: rsh broken? Message-ID: <20000128221305C.shin@nd.net.fujitsu.co.jp> In-Reply-To: <20000128174826K.shin@nd.net.fujitsu.co.jp> References: <38915126.789227C@fernuni-hagen.de> <20000128174826K.shin@nd.net.fujitsu.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
> > When using rsh from a friendly linux-mandrake box i get:
> >
> > rsh jfh00 ls
> > poll: protocol failure in circuit setup
> >
> > from a friendly freebsd box i get:
> > select: protocol failure in circuit setup
Woops bug was in rshd from the beginning. My test had a
leakage. It only happens on AF_INET socket, and I usually use
AF_INET6 socket on my environment so I didon't noticed it.
Please try following patch untill I actually commmit it.
Thanks for reporting it,
Yoshinobu Inoue
Index: rshd.c
===================================================================
RCS file: /home/ncvs/src/libexec/rshd/rshd.c,v
retrieving revision 1.28
diff -u -r1.28 rshd.c
--- rshd.c 2000/01/25 14:52:03 1.28
+++ rshd.c 2000/01/28 12:51:13
@@ -320,7 +320,7 @@
exit(1);
}
fromp->su_port = htons(port);
- if (connect(s, (struct sockaddr *)fromp, sizeof (*fromp)) < 0) {
+ if (connect(s, (struct sockaddr *)fromp, fromp->su_len) < 0) {
syslog(LOG_INFO, "connect second port %d: %m", port);
exit(1);
}
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000128221305C.shin>
