Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2003 19:06:05 +0300
From:      Yar Tikhiy <yar@FreeBSD.org>
To:        Ceri Davies <setantae@submonkey.net>, Julian Mayer <julianmayer@mac.com>, knu@FreeBSD.org, ports@FreeBSD.org, hackers@FreeBSD.org
Subject:   Re: FreeBSD Port: portupgrade-20021216
Message-ID:  <20030123160605.GA2473@comp.chem.msu.su>
In-Reply-To: <20030123134749.GA377@straylight.oblivion.bg>
References:  <F123A396-2E66-11D7-9D30-00039303B9CC@mac.com> <20030123081224.GA471@straylight.oblivion.bg> <20030123101216.GA2856@submonkey.net> <20030123134749.GA377@straylight.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 23, 2003 at 03:47:49PM +0200, Peter Pentchev wrote:
> On Thu, Jan 23, 2003 at 10:12:16AM +0000, Ceri Davies wrote:
> > On Thu, Jan 23, 2003 at 10:12:24AM +0200, Peter Pentchev wrote:
> > > On Thu, Jan 23, 2003 at 01:09:29AM +0100, Julian Mayer wrote:
> > > > hello
> > > > there is a bug in portupgrade-20021216: when you change the FTP port in 
> > > > /etc/services to run the FTP demon on another port, portupgrade is 
> > > > unable to download ports/packages via ftp
> > > > is there a workaround?
> > > 
> > > Errr.. this is not a bug in portupgrade, but the way most (all?) FTP
> > > clients work.  If you change the port for the 'ftp' service, *any*
> > > program that asks about the 'ftp' service will use the new port,
> > > including all FTP clients that try to make outgoing connections.
> > 
> > In that case, it sounds like a bug in our stock ftpd.
> > 
> > DESCRIPTION
> >      Ftpd is the Internet File Transfer Protocol server process.  The server
> >      uses the TCP protocol and listens at the port specified in the ``ftp''
> >      service specification; see services(5).
> > 
> > If this breaks outgoing ftp connections, then that's quite serious.
> > 
> > > The appropriate way to "fix" that problem is to NOT change the port for
> > > the 'ftp' service, but merely specify a different port on which to run
> > > the FTP server.
> > 
> > RTF ftpd(8) manual - there isn't any other (documented) way to do it.
> > 
> > If I'm not missing something obvious, then I'll file a PR for this later.
> 
> Yes, it would seem that the stock ftpd does not provide a way to specify
> a different port/service to use in daemon mode.  In inetd mode,
> everything is fine and dandy.
> 
> Attached is a patch to the libexec/ftpd source, which adds a new -P
> option taking an argument of either a numeric port number or a service
> name as described in the getaddrinfo(3) manual page.  What do people
> think about adding this functionality?

As for me, I think that
a) editing standard lines in /etc/services is a rather bad idea
   since the file lists _standard_ service endpoints; OTOH, adding
   a site-specific service endpoint to the file is all right,
b) the port option to ftpd(8) would be nice.  However, there seems
   to be a hard-coded value for not only the FTP control port, but
   the FTP default data port as well.  I'd like to fix both issues
   at once since RFC 959 specifies explicitly that the default data
   port should be 1 less than the control port.  I hope I'll introduce
   the port option to our stock ftpd(8) in a couple of days.  Thanks
   for the patch.

-- 
Yar

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030123160605.GA2473>