From owner-freebsd-hackers Thu Jan 23 8: 6:30 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3451C37B405; Thu, 23 Jan 2003 08:06:28 -0800 (PST) Received: from comp.chem.msu.su (comp-ext.chem.msu.su [158.250.32.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3A5943EB2; Thu, 23 Jan 2003 08:06:22 -0800 (PST) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.3/8.12.3) with ESMTP id h0NG69sA004077; Thu, 23 Jan 2003 19:06:13 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.3/8.12.3/Submit) id h0NG66tR004076; Thu, 23 Jan 2003 19:06:06 +0300 (MSK) (envelope-from yar) Date: Thu, 23 Jan 2003 19:06:05 +0300 From: Yar Tikhiy To: Ceri Davies , Julian Mayer , knu@FreeBSD.org, ports@FreeBSD.org, hackers@FreeBSD.org Subject: Re: FreeBSD Port: portupgrade-20021216 Message-ID: <20030123160605.GA2473@comp.chem.msu.su> References: <20030123081224.GA471@straylight.oblivion.bg> <20030123101216.GA2856@submonkey.net> <20030123134749.GA377@straylight.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030123134749.GA377@straylight.oblivion.bg> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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-hackers" in the body of the message