From Mark_Andrews@isc.org  Wed Apr 21 20:12:17 2004
Return-Path: <Mark_Andrews@isc.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D697116A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Apr 2004 20:12:17 -0700 (PDT)
Received: from farside.isc.org (farside.isc.org [204.152.187.5])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C4DE143D41
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 21 Apr 2004 20:12:17 -0700 (PDT)
	(envelope-from Mark_Andrews@isc.org)
Received: from drugs.dv.isc.org (localhost [IPv6:::1])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by farside.isc.org (Postfix) with ESMTP id 83229A864
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Apr 2004 03:12:12 +0000 (UTC)
	(envelope-from marka@isc.org)
Received: from drugs.dv.isc.org (localhost [127.0.0.1])
	by drugs.dv.isc.org (8.12.10/8.12.10) with ESMTP id i3M3C5eu099188
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 22 Apr 2004 13:12:05 +1000 (EST)
	(envelope-from marka@drugs.dv.isc.org)
Received: (from marka@localhost)
	by drugs.dv.isc.org (8.12.10/8.12.10/Submit) id i3M3C4T1099187;
	Thu, 22 Apr 2004 13:12:04 +1000 (EST)
	(envelope-from marka)
Message-Id: <200404220312.i3M3C4T1099187@drugs.dv.isc.org>
Date: Thu, 22 Apr 2004 13:12:04 +1000 (EST)
From: Mark Andrews <Mark_Andrews@isc.org>
Reply-To: Mark Andrews <Mark_Andrews@isc.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: cvs generates invalid cvs command lines
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         65869
>Category:       gnu
>Synopsis:       cvs generates invalid cvs command lines
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 21 20:20:14 PDT 2004
>Closed-Date:    Tue May 20 10:28:02 UTC 2008
>Last-Modified:  Tue May 20 10:28:02 UTC 2008
>Originator:     Mark Andrews
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
ISC
>Environment:
System: FreeBSD drugs.dv.isc.org 4.9-STABLE FreeBSD 4.9-STABLE #14: Sat Feb 14 12:56:29 EST 2004 marka@drugs.dv.isc.org:/usr/obj/usr/src/sys/DRUGS i386


>Description:

	If a user is specified in the cvs root and that user is not the
	current user the '-l user' appears *after* the hostname.

	e.g.
		:ext:user@host:/remote
	
	results in the following ssh command

		ssh host -l user cvs server

	which should be

		ssh -l user host cvs server


>How-To-Repeat:
	
>Fix:

Index: contrib/cvs/src/client.c
===================================================================
RCS file: /home/ncvs/src/contrib/cvs/src/client.c,v
retrieving revision 1.2.2.7
diff -u -r1.2.2.7 client.c
--- contrib/cvs/src/client.c	15 Apr 2004 15:35:26 -0000	1.2.2.7
+++ contrib/cvs/src/client.c	22 Apr 2004 03:04:16 -0000
@@ -4922,7 +4922,6 @@
 	char **p = argv;
 
 	*p++ = cvs_rsh;
-	*p++ = root->hostname;
 
 	/* If the login names differ between client and server
 	 * pass it on to rsh.
@@ -4933,6 +4932,7 @@
 	    *p++ = root->username;
 	}
 
+	*p++ = root->hostname;
 	*p++ = command;
 	*p++ = NULL;
 
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: ceri 
State-Changed-When: Thu Apr 22 03:28:02 PDT 2004 
State-Changed-Why:  
"ssh host -l user cvs server" should actually work just the same. 
However, if you'd like to see this fixed then I'd suggest mailing your 
patch to bug-cvs@gnu.org for inclusion in the next release of CVS, and 
FreeBSD will then pick it up in the next import. 

Please followup to let us know how you get on.  Thanks. 

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

From: Ceri Davies <ceri@FreeBSD.org>
To: Mark Andrews <Mark_Andrews@isc.org>
Cc: FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Subject: Re: gnu/65869: cvs generates invalid cvs command lines
Date: Fri, 23 Apr 2004 13:16:24 +0100

 On Fri, Apr 23, 2004 at 09:36:04AM +1000, Mark Andrews wrote:
 > 
 > > Synopsis: cvs generates invalid cvs command lines
 > > 
 > > State-Changed-From-To: open->feedback
 > > State-Changed-By: ceri
 > > State-Changed-When: Thu Apr 22 03:28:02 PDT 2004
 > > State-Changed-Why: 
 > > "ssh host -l user cvs server" should actually work just the same.
 > 
 > 	No it shouldn't.  It says to run the command "-l" on "host"
 > 	with arguements "user cvs server"
 
 It seems to work for me, on Solaris and FreeBSD:
 
  $ ssh rios2 -l foo cvs server
  foo@rios2's password:
 
 > > However, if you'd like to see this fixed then I'd suggest mailing your
 > > patch to bug-cvs@gnu.org for inclusion in the next release of CVS, and
 > > FreeBSD will then pick it up in the next import.
 > 
 > 	I've sent a complaint to cvs-bugs@gnu.org against
 > 	client.c:1.318.4.19 which is the HEAD of the cvs1-11-x-branch.
 
 Great, thanks.
 
 Ceri
 -- 

From: Mark Andrews <Mark_Andrews@isc.org>
To: Ceri Davies <ceri@freebsd.org>
Cc: freebsd-bugs@freebsd.org
Subject: Re: gnu/65869: cvs generates invalid cvs command lines 
Date: Fri, 23 Apr 2004 09:36:04 +1000

 > Synopsis: cvs generates invalid cvs command lines
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: ceri
 > State-Changed-When: Thu Apr 22 03:28:02 PDT 2004
 > State-Changed-Why: 
 > "ssh host -l user cvs server" should actually work just the same.
 
 	No it shouldn't.  It says to run the command "-l" on "host"
 	with arguements "user cvs server"
 
 	This isn't Linux with its broken getopt() implementation.
 
 	Note: the other half of the #ifdef/#else/#endif gets the
 	arguement list correct.
 
 > However, if you'd like to see this fixed then I'd suggest mailing your
 > patch to bug-cvs@gnu.org for inclusion in the next release of CVS, and
 > FreeBSD will then pick it up in the next import.
 
 	I've sent a complaint to cvs-bugs@gnu.org against
 	client.c:1.318.4.19 which is the HEAD of the cvs1-11-x-branch.
 
 > Please followup to let us know how you get on.  Thanks.
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=65869
 --
 Mark Andrews, ISC
 1 Seymour St., Dundas Valley, NSW 2117, Australia
 PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews@isc.org

From: Mark Andrews <Mark_Andrews@isc.org>
To: Ceri Davies <ceri@FreeBSD.org>,
	FreeBSD Gnats Submit <freebsd-gnats-submit@FreeBSD.org>
Cc:  
Subject: Re: gnu/65869: cvs generates invalid cvs command lines 
Date: Sat, 24 Apr 2004 07:29:20 +1000

 > On Fri, Apr 23, 2004 at 09:36:04AM +1000, Mark Andrews wrote:
 > > 
 > > > Synopsis: cvs generates invalid cvs command lines
 > > > 
 > > > State-Changed-From-To: open->feedback
 > > > State-Changed-By: ceri
 > > > State-Changed-When: Thu Apr 22 03:28:02 PDT 2004
 > > > State-Changed-Why: 
 > > > "ssh host -l user cvs server" should actually work just the same.
 > > 
 > > 	No it shouldn't.  It says to run the command "-l" on "host"
 > > 	with arguements "user cvs server"
 > 
 > It seems to work for me, on Solaris and FreeBSD:
 
 	Looks like openssh has a bug. There are other ssh implementations
 	that actually do the right thing.
  
 >  $ ssh rios2 -l foo cvs server
 >  foo@rios2's password:
 > 
 > > > However, if you'd like to see this fixed then I'd suggest mailing your
 > > > patch to bug-cvs@gnu.org for inclusion in the next release of CVS, and
 > > > FreeBSD will then pick it up in the next import.
 > > 
 > > 	I've sent a complaint to cvs-bugs@gnu.org against
 > > 	client.c:1.318.4.19 which is the HEAD of the cvs1-11-x-branch.
 > 
 > Great, thanks.
 > 
 > Ceri
 > -- 
 --
 Mark Andrews, ISC
 1 Seymour St., Dundas Valley, NSW 2117, Australia
 PHONE: +61 2 9871 4742                 INTERNET: Mark_Andrews@isc.org

From: Mark Andrews <Mark_Andrews@isc.org>
To: freebsd-gnats-submit@FreeBSD.org, Mark_Andrews@isc.org
Cc:  
Subject: Re: gnu/65869: cvs generates invalid cvs command lines
Date: Wed, 28 Apr 2004 09:42:07 +1000

 I don't know why my previous message hasn't made the log.
 
 Anyway see the following.
 
 http://ccvs.cvshome.org/unbranded-source/browse/ccvs/src/rsh-client.c.diff?r1=1.6&r2=1.7
 http://ccvs.cvshome.org/unbranded-source/browse/ccvs/src/client.c.diff?r1=1.318.4.19&r2=1.318.4.20
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Oct 23 19:18:44 GMT 2005 
State-Changed-Why:  
Feedback received quite some time ago. 

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

From: Marc Olzheim <marcolz@stack.nl>
To: bug-followup@FreeBSD.org, Mark Andrews <Mark_Andrews@isc.org>
Cc: Marc Olzheim <marcolz@stack.nl>
Subject: Re: gnu/65869: cvs generates invalid cvs command lines
Date: Tue, 20 May 2008 12:18:28 +0200

 If I look at the versions of the code of src/contrib/cvs/src/client.c,
 it seems to have been implemented correctly from the beginning, but
 there may have been a regression somewhere after one of the imports.
 
 Anyway, I cannot reprocude this with any version have here, (4-stable,
 6-stable, nor 7-stable), so I assume this has been fixed a long time
 ago.
 
 Marc
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Tue May 20 10:28:01 UTC 2008 
State-Changed-Why:  
Marc reports this had been resolved, reflect it in the pr 

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