From fred@fcox.net  Thu Jun  2 00:55:52 2005
Return-Path: <fred@fcox.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 278D616A41C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2005 00:55:52 +0000 (GMT)
	(envelope-from fred@fcox.net)
Received: from sereneorchids.com (fcox.net [65.75.165.30])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5209743D54
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  2 Jun 2005 00:55:21 +0000 (GMT)
	(envelope-from fred@fcox.net)
Received: from fcox.net (localhost [127.0.0.1])
	by sereneorchids.com (8.12.10/8.12.10) with ESMTP id j520t3JT048761
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 2 Jun 2005 00:55:09 GMT
	(envelope-from fred@fcox.net)
Received: (from fred@localhost)
	by fcox.net (8.12.10/8.12.10/Submit) id j520t2VD048760;
	Thu, 2 Jun 2005 00:55:02 GMT
	(envelope-from fred)
Message-Id: <200506020055.j520t2VD048760@fcox.net>
Date: Thu, 2 Jun 2005 00:55:02 GMT
From: Fred Cox <sailorfred@yahoo.com>
Reply-To: Fred Cox <sailorfred@yahoo.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] port ftp/fmirror 0.8.4 -r <remotedir> required: does not work with / or .
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         81787
>Category:       ports
>Synopsis:       [patch] port ftp/fmirror 0.8.4 -r <remotedir> required: does not work with / or .
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    barner
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 02 01:00:12 GMT 2005
>Closed-Date:    Tue Jun 07 08:48:36 GMT 2005
>Last-Modified:  Tue Jun 07 08:48:36 GMT 2005
>Originator:     Fred Cox
>Release:        FreeBSD 5.2.1-RELEASE-p5 i386
>Organization:
Himself
>Environment:
System: FreeBSD fcox.net 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #0: Wed Apr 21 01:44:27 GMT 2004 admin@www.sereneorchids.com:/usr/obj/usr/src/sys/GENERIC i386
>Description:
An FTP server that I must mirror does not place the content into a
subdirectory such as "pub".  I can't know a priori what files and directories
are in the top level directory.  Leaving off the -r flag causes this error:
fmirror: remotedir not set

Using -r . or -r / causes output like this:

01:45:21 . @ xxx.com -> .
01:45:21 Connecting to xxx.com...
01:45:21 Connected.
01:45:23 Remote timezone: 420 minutes from GMT
01:45:23 Operation failed: 553 Permission denied.
01:45:23 Could not CWD to '..', aborting

The authors' emails bounce, and the maintainer does not respond.

>How-To-Repeat:
	Use -r . or -r / or leave -r off.
>Fix:

Here's a minimal fix that lets me use "-r /".  Another would be to no
longer require -r.

*** fmirror.c.pre       Mon Mar 21 23:45:36 2005
--- fmirror.c   Mon Mar 21 23:46:41 2005
***************
*** 1101,1107 ****
        }
      }
  dirdone:
!     if (gotodir) {
        cmd("CWD %s", "..");
        if (!success()) {
                LOG(0, failure, ("Could not CWD to '..', aborting"));
--- 1101,1107 ----
        }
      }
  dirdone:
!     if (gotodir && strcmp(gotodir, "/") != 0) {
        cmd("CWD %s", "..");
        if (!success()) {
                LOG(0, failure, ("Could not CWD to '..', aborting"));



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: barner 
State-Changed-When: Mon Jun 6 12:09:15 GMT 2005 
State-Changed-Why:  
Awaiting maintainers approval. 


Responsible-Changed-From-To: freebsd-ports-bugs->barner 
Responsible-Changed-By: barner 
Responsible-Changed-When: Mon Jun 6 12:09:15 GMT 2005 
Responsible-Changed-Why:  
I'll handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=81787 
State-Changed-From-To: feedback->closed 
State-Changed-By: barner 
State-Changed-When: Tue Jun 7 08:48:05 GMT 2005 
State-Changed-Why:  
Committed, thanks. 

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