From dhw@whistle.com  Fri May 15 13:05:43 1998
Received: from shrimp.whistle.com (s205m74.whistle.com [207.76.205.74])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA24671
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 15 May 1998 13:05:42 -0700 (PDT)
          (envelope-from dhw@whistle.com)
Received: (from dhw@localhost)
	by shrimp.whistle.com (8.8.8/8.8.7) id NAA00469;
	Fri, 15 May 1998 13:05:11 -0700 (PDT)
	(envelope-from dhw)
Message-Id: <199805152005.NAA00469@shrimp.whistle.com>
Date: Fri, 15 May 1998 13:05:11 -0700 (PDT)
From: David Wolfskill <dhw@whistle.com>
Reply-To: dhw@whistle.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: ftpd: man page at variance with code (e.g., -a flag)
X-Send-Pr-Version: 3.2

>Number:         6647
>Category:       docs
>Synopsis:       ftpd: man page at variance with code (e.g., -a flag)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 15 13:10:00 PDT 1998
>Closed-Date:    Thu Jul 9 02:25:37 PDT 1998
>Last-Modified:  Thu Jul  9 02:27:51 PDT 1998
>Originator:     David Wolfskill
>Release:        FreeBSD 2.2.6-RELEASE i386
>Organization:
Whistle Communications
>Environment:

	Vanilla FreeBSD 2.2.6, at least.

>Description:

	Man page for ftpd documents a "-a" flag (no argument required:

SYNOPSIS
       ftpd [ -d ] [ -l ] [ -ttimeout ] [ -Tmaxtimeout ] [ -a ]
       [ -A ] [ -L ] [ -i ] [ -I ] [ -o ] [ -O ]
...

       If the -a option is specified, the use of the ftpaccess(5)
       configuration file is enabled.

...
       The code, however, differs (see below for a demonstration):

        bind_address.s_addr = htonl(INADDR_ANY);
        while ((ch = getopt(argc, argv, "AdlDSURt:T:u:va:p:")) != -1) {
                switch (ch) {
...
                case 'a':
                        if (!inet_aton(optarg, &bind_address))
                                errx(1, "invalid address for -a");
                        break;
...

>How-To-Repeat:

pau-amma[7]% /usr/libexec/ftpd -a
ftpd: option requires an argument -- a
ftpd: unknown flag -a ignored
pau-amma[8]% 

>Fix:
	
Make appropriate changes to cause the code and the man page to be
self-consistent.  In the mean time, avoiding the -a flag seems prudent.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Tue May 19 03:02:23 PDT 1998 
State-Changed-Why:  
Documentation issue 


Responsible-Changed-From-To: freebsd-bugs->doc 
Responsible-Changed-By: phk 
Responsible-Changed-When: Tue May 19 03:02:23 PDT 1998 
Responsible-Changed-Why:  
.. 
Responsible-Changed-From-To: doc->freebsd-doc 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sat May 23 20:01:03 PDT 1998 
Responsible-Changed-Why:  
doc -> freebsd-doc 
State-Changed-From-To: suspended->closed 
State-Changed-By: jkoshy 
State-Changed-When: Thu Jul 9 02:25:37 PDT 1998 
State-Changed-Why:  
In -current and in -stable, the "-a" option now specifies an interface 
address that FTPD will bind to when listening. 
(see rev 1.22 of "src/libexec/ftpd.c"). 
>Unformatted:
