Bug 113669 - ftpchroot(5) / ftpusers(5) doesn't do globbing
Summary: ftpchroot(5) / ftpusers(5) doesn't do globbing
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 6.2-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-14 05:10 UTC by edwin
Modified: 2018-05-20 23:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description edwin 2007-06-14 05:10:03 UTC
ftpchroot(5) and ftpusers(5) say:

    The syntax of each line is:
	    userglob[:groupglob][@host] [directive [class]]

    These elements are:
	    userglob	matched against the user name, using fnmatch(3) glob
			matching (e.g, `f*').


But that function isn't used anywhere in the src/libexec/ftpd, nor
can I find any evidence in the checkuser() funtion that it some
kind of globbing is done.

Fix: 

I'm not sure how the manpage and the sourcecode of ftpd relate at
this moment.
Comment 1 bem 2007-06-19 01:15:11 UTC
While it's true that src/libexec/ftpd does not do globbing as described 
in the man page, the man page is actually referring to 
src/contrib/likemftpd/src (src/libexec/lukemftpd). Perhaps the man page 
could be clearer that this only occurs for the lukemftpd, but it does do 
globbing if you are running that ftpd.
Comment 2 edwin 2007-06-19 01:52:57 UTC
On Mon, Jun 18, 2007 at 08:15:11PM -0400, Brian Mitchell wrote:
> While it's true that src/libexec/ftpd does not do globbing as described 
> in the man page, the man page is actually referring to 
> src/contrib/likemftpd/src (src/libexec/lukemftpd). Perhaps the man page 
> could be clearer that this only occurs for the lukemftpd, but it does do 
> globbing if you are running that ftpd.

That's an interesting intertwingle (in case that is not a proper
english word: the messy combination of two big plants growing against
the wall) of projects...

man lukeftpd gives:
FTPD(8)                 FreeBSD System Manager's Manual                FTPD(8)

NAME
     ftpd -- Internet File Transfer Protocol server
[...]
FreeBSD 6.2                     August 4, 2005                     FreeBSD 6.2


man ftpd givess:
FTPD(8)                 FreeBSD System Manager's Manual                FTPD(8)

NAME
     ftpd -- Internet File Transfer Protocol server
[...]
FreeBSD 6.2                    January 21, 2006                    FreeBSD 6.2


I'm not yet sure on how to resolve this...

Except by mentioning that ports/ftp/lukemftp is about to be axed
in favour of ports/ftp/tnftp, which might be outdated based on the
contents of the mastersite:

-r--r--r--  1 1101  netbsd  313915 Jun 25  2005 tnftp-20050625.tar.gz
-r--r--r--  1 1101  netbsd  178638 Aug 10  2004 tnftpd-20040810.tar.gz
-r--r--r--  1 1101  netbsd  187164 Dec  4  2006 tnftpd-20061204.tar.gz
-r--r--r--  1 1101  netbsd  187602 Dec 18  2006 tnftpd-20061217.tar.gz

What is wisdom these days....

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/
Comment 3 Willem Jan Withagen 2015-08-22 22:34:42 UTC
This is no longer the case in 10.2 files.

ftpusers does not exist (any longer) and now it seems to be pam_ftpusers
(Which also has no reference of userglob/fnmatch)
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:52:33 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"