From nobody@FreeBSD.org  Mon Oct 31 22:12:27 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E595F16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Oct 2005 22:12:27 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B064043D48
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Oct 2005 22:12:27 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9VMCR8w084532
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Oct 2005 22:12:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9VMCRMb084531;
	Mon, 31 Oct 2005 22:12:27 GMT
	(envelope-from nobody)
Message-Id: <200510312212.j9VMCRMb084531@www.freebsd.org>
Date: Mon, 31 Oct 2005 22:12:27 GMT
From: matt wilbur <matt@photon.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: unable to rsh to 5.4-STABLE system (10/14/05) with args
X-Send-Pr-Version: www-2.3

>Number:         88301
>Category:       bin
>Synopsis:       [libutil] unable to rsh to 5.4-STABLE system (10/14/05) with args
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 31 22:20:16 GMT 2005
>Closed-Date:    Wed Jan 11 06:42:10 GMT 2006
>Last-Modified:  Wed Jan 11 06:42:10 GMT 2006
>Originator:     matt wilbur
>Release:        5.4-STABLE
>Organization:
PRA
>Environment:
FreeBSD wdc-mx.photon.com 5.4-STABLE FreeBSD 5.4-STABLE #0: Fri Oct 14 11:01:11 EDT 2005     jamie@wdc-mx.photon.com:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
Unable to rsh to host when proving a cmd to execute. rsh <5.4-stable host> works fine, gives a shell. rsh <5.4-stable host> ls gives this error:
matt@photon ~ > rsh wdc-mx ls
select: protocol failure in circuit setup.
rsh: connection failed

When I roll back to a 5.4-RELEASE rshd (which incidentally is not linked with libpam) it works fine.

In both cases tcpdump shows the exact same exchange (given the exact same cmd given)..


>How-To-Repeat:
enable rshd in inetd.conf, verify /etc/pam.d/rsh is configured correctly, configure /etc/hosts.equiv or ~/.rhosts to allow rsh without password. rsh to "problem" system with a cmd to execute on distant end (eg rsh host ls).


>Fix:
roll back to 5.4-RELEASE rshd, works fine.       
>Release-Note:
>Audit-Trail:

From: Brooks Davis <brooks@one-eyed-alien.net>
To: matt wilbur <matt@photon.com>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05) with args
Date: Mon, 31 Oct 2005 14:30:26 -0800

 "rsh <host>" and "rsh <host> <command>" actually use different
 protocols.  Are you sure you have both rshd and rlogind enabled on the
 upgraded system?  Also, I fixed a bug in libutil recently that had
 similar symptoms.  If the client host has a name like a.b.c and the
 server is b.c, the patch at this URL may fix it:
 
 http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libutil/trimdomain.c.diff?r1=1.5&r2=1.6
 
 -- Brooks

From: "Matt Wilbur" <matt@photon.com>
To: <brooks@one-eyed-alien.net>
Cc: <freebsd-gnats-submit@freebsd.org>
Subject: Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05) with args
Date: Mon, 31 Oct 2005 14:53:31 -0800

 This is a multi-part message in MIME format.
 
 ------_=_NextPart_001_01C5DE6D.EA49CFF7
 Content-Type: text/plain;
 	charset="UTF-8"
 Content-Transfer-Encoding: base64
 
 cmxvZ2luZCBpcyB3b3JraW5nIGZpbmUuLiBCdXQgSS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lidXRpbC90cmltZG9tYWluLmMuZGlmZj9yMT0xLjUmcjI9MS42Ij5odHRwOi8v
 d3d3LmZyZWVic2Qub3JnL2NnaS9jdnN3ZWIuY2dpL3NyYy9saWIvbGlidXRpbC90cmltZG9tYWlu
 LmMuZGlmZj9yMT0xLjUmcjI9MS42PC9BPjxCUj4NCjxCUj4NCi0tIEJyb29rczxCUj4NCjwvRk9O
 VD4NCjwvUD4NCg0KPC9CT0RZPg0KPC9IVE1MPg==
 
 ------_=_NextPart_001_01C5DE6D.EA49CFF7--

From: Matt Wilbur <matt@photon.com>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: <freebsd-gnats-submit@freebsd.org>
Subject: Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05)
 with args
Date: Tue, 01 Nov 2005 06:56:15 -0800

 > This message is in MIME format. Since your mail reader does not understand
 this format, some or all of this message may not be legible.
 
 --B_3213672976_3008756
 Content-type: text/plain;
 	charset="ISO-8859-1"
 Content-transfer-encoding: quoted-printable
 
 Ok .. Very wacky :)
 
 The clients has a hostname of =B3hostname=B2, the server has a hostname of
 =B3hostname.domain.com=B2 (the opposite of the case you described).. Yet..
 
 Your patch fixed it!
 
 Thank you very much..
 matt
 
 On 10/31/05 2:30 PM, "Brooks Davis" <brooks@one-eyed-alien.net> wrote:
 
 > "rsh <host>" and "rsh <host> <command>" actually use different
 > protocols.  Are you sure you have both rshd and rlogind enabled on the
 > upgraded system?  Also, I fixed a bug in libutil recently that had
 > similar symptoms.  If the client host has a name like a.b.c and the
 > server is b.c, the patch at this URL may fix it:
 >=20
 > http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libutil/trimdomain.c.diff?r=
 1=3D1.5
 > =3D1.6=20
 > <http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libutil/trimdomain.c.diff?=
 r1=3D1.
 > 5&r2=3D1.6>=20
 >=20
 > -- Brooks
 >=20
 
 
 
 --B_3213672976_3008756
 Content-type: text/html;
 	charset="ISO-8859-1"
 Content-transfer-encoding: quoted-printable
 
 <HTML>
 <HEAD>
 <TITLE>Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05) with a=
 rgs</TITLE>
 </HEAD>
 <BODY>
 <FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>Ok ..=
  Very wacky :)<BR>
 <BR>
 The clients has a hostname of &#8220;hostname&#8221;, the server has a host=
 name of &#8220;hostname.domain.com&#8221; (the opposite of the case you desc=
 ribed).. Yet..<BR>
 <BR>
 Your patch fixed it!<BR>
 <BR>
 Thank you very much.. <BR>
 matt<BR>
 <BR>
 On 10/31/05 2:30 PM, &quot;Brooks Davis&quot; &lt;brooks@one-eyed-alien.net=
 &gt; wrote:<BR>
 <BR>
 </SPAN></FONT><BLOCKQUOTE><FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYL=
 E=3D'font-size:12.0px'>&quot;rsh &lt;host&gt;&quot; and &quot;rsh &lt;host&gt;=
  &lt;command&gt;&quot; actually use different<BR>
 protocols. &nbsp;Are you sure you have both rshd and rlogind enabled on the=
 <BR>
 upgraded system? &nbsp;Also, I fixed a bug in libutil recently that had<BR>
 similar symptoms. &nbsp;If the client host has a name like a.b.c and the<BR=
 >
 server is b.c, the patch at this URL may fix it:<BR>
 <BR>
 <a href=3D"http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libutil/trimdomain.c=
 .diff?r1=3D1.5=3D1.6">http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libutil/trim=
 domain.c.diff?r1=3D1.5=3D1.6</a> <a href=3D"http://www.freebsd.org/cgi/cvsweb.cgi/=
 src/lib/libutil/trimdomain.c.diff?r1=3D1.5&r2=3D1.6">&lt;http://www.freebsd.org/=
 cgi/cvsweb.cgi/src/lib/libutil/trimdomain.c.diff?r1=3D1.5&amp;r2=3D1.6&gt;</a> <=
 BR>
 <BR>
 -- Brooks<BR>
 <BR>
 </SPAN></FONT></BLOCKQUOTE><FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STY=
 LE=3D'font-size:12.0px'><BR>
 </SPAN></FONT>
 </BODY>
 </HTML>
 
 
 --B_3213672976_3008756--
 
State-Changed-From-To: open->patched 
State-Changed-By: brooks 
State-Changed-When: Tue Nov 1 19:26:56 GMT 2005 
State-Changed-Why:  
I apparently fixed this in src/lib/libutil/trimdomain.c rev 1.6. 


Responsible-Changed-From-To: freebsd-bugs->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Tue Nov 1 19:26:56 GMT 2005 
Responsible-Changed-Why:  
I apparently fixed this in src/lib/libutil/trimdomain.c rev 1.6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=88301 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Matt Wilbur <matt@photon.com>
Cc: Brooks Davis <brooks@one-eyed-alien.net>, freebsd-gnats-submit@freebsd.org
Subject: Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05) with args
Date: Tue, 1 Nov 2005 11:26:41 -0800

 On Tue, Nov 01, 2005 at 06:56:15AM -0800, Matt Wilbur wrote:
 > Ok .. Very wacky :)
 > 
 > The clients has a hostname of hostname, the server has a hostname of
 > hostname.domain.com (the opposite of the case you described).. Yet..
 > 
 > Your patch fixed it!
 
 Great!  I'll mark this PR patched at take ownership so I can merge the
 fix after RELENG_6 is unfrozen.
 
 I think you're saying the client hostname is "xxxxx" and the server is
 "yyyyy.domain.com".  Is that correct?
 
 -- Brooks

From: Matt Wilbur <matt@photon.com>
To: Brooks Davis <brooks@one-eyed-alien.net>
Cc: <freebsd-gnats-submit@freebsd.org>
Subject: Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05)
 with args
Date: Tue, 01 Nov 2005 11:47:57 -0800

 > This message is in MIME format. Since your mail reader does not understand
 this format, some or all of this message may not be legible.
 
 --B_3213690477_4020880
 Content-type: text/plain;
 	charset="ISO-8859-1"
 Content-transfer-encoding: quoted-printable
 
 On 11/1/05 11:26 AM, "Brooks Davis" <brooks@one-eyed-alien.net> wrote:
 
 > Great!  I'll mark this PR patched at take ownership so I can merge the
 > fix after RELENG_6 is unfrozen.
 >=20
 > I think you're saying the client hostname is "xxxxx" and the server is
 > "yyyyy.domain.com".  Is that correct?
 >=20
 > -- Brooks
 >=20
 
 Yep, that=B9s correct. Client hostname(s) were just hostname not fqdn (eg
 sargon, photon, etc).. Destination hostname was wdc-mx.photon.com (fqdn)..
 
 Thanks again
 -matt
 
 --B_3213690477_4020880
 Content-type: text/html;
 	charset="ISO-8859-1"
 Content-transfer-encoding: quoted-printable
 
 <HTML>
 <HEAD>
 <TITLE>Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05) with a=
 rgs</TITLE>
 </HEAD>
 <BODY>
 <FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYLE=3D'font-size:12.0px'>On 11=
 /1/05 11:26 AM, &quot;Brooks Davis&quot; &lt;brooks@one-eyed-alien.net&gt; w=
 rote:<BR>
 <BR>
 </SPAN></FONT><BLOCKQUOTE><FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STYL=
 E=3D'font-size:12.0px'>Great! &nbsp;I'll mark this PR patched at take ownershi=
 p so I can merge the<BR>
 fix after RELENG_6 is unfrozen.<BR>
 <BR>
 I think you're saying the client hostname is &quot;xxxxx&quot; and the serv=
 er is<BR>
 &quot;yyyyy.domain.com&quot;. &nbsp;Is that correct?<BR>
 <BR>
 -- Brooks<BR>
 <BR>
 </SPAN></FONT></BLOCKQUOTE><FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN STY=
 LE=3D'font-size:12.0px'><BR>
 Yep, that&#8217;s correct. Client hostname(s) were just hostname not fqdn (=
 eg sargon, photon, etc).. Destination hostname was wdc-mx.photon.com (fqdn).=
 .<BR>
 <BR>
 Thanks again<BR>
 -matt</SPAN></FONT>
 </BODY>
 </HTML>
 
 
 --B_3213690477_4020880--
 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: Matt Wilbur <matt@photon.com>
Cc: Brooks Davis <brooks@one-eyed-alien.net>, freebsd-gnats-submit@freebsd.org
Subject: Re: misc/88301: unable to rsh to 5.4-STABLE system (10/14/05) with args
Date: Wed, 21 Dec 2005 16:52:40 -0800

 I've merged this to RELENG_6.  I'd like to let it sit there a bit
 before merging to RELENG_5 to make there aren't big issues with logs.
 
 -- Brooks
State-Changed-From-To: patched->closed 
State-Changed-By: brooks 
State-Changed-When: Wed Jan 11 06:40:42 UTC 2006 
State-Changed-Why:  
Merged to RELENG_5.  No plans to merge to RELENG_4. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=88301 
>Unformatted:
