From owner-freebsd-bugs Sat Jun 22 15:20:42 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B206737B403 for ; Sat, 22 Jun 2002 15:20:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5MMK2x55429; Sat, 22 Jun 2002 15:20:02 -0700 (PDT) (envelope-from gnats) Received: from smtp.noos.fr (verlaine.noos.net [212.198.2.73]) by hub.freebsd.org (Postfix) with ESMTP id E23F937B400 for ; Sat, 22 Jun 2002 15:12:40 -0700 (PDT) Received: (qmail 22760580 invoked by uid 0); 22 Jun 2002 22:12:37 -0000 Received: from unknown (HELO gits.gits.dyndns.org) ([212.198.229.153]) (envelope-sender ) by 212.198.2.73 (qmail-ldap-1.03) with SMTP for ; 22 Jun 2002 22:12:37 -0000 Received: from gits.gits.dyndns.org (bq3key8gqm6g4o9i@localhost [127.0.0.1]) by gits.gits.dyndns.org (8.12.3/8.12.3) with ESMTP id g5MMCXAN006881; Sun, 23 Jun 2002 00:12:37 +0200 (CEST) (envelope-from root@gits.dyndns.org) Received: (from root@localhost) by gits.gits.dyndns.org (8.12.3/8.12.3/Submit) id g5MMCVip006880; Sun, 23 Jun 2002 00:12:31 +0200 (CEST) (envelope-from root) Message-Id: <200206222212.g5MMCVip006880@gits.gits.dyndns.org> Date: Sun, 23 Jun 2002 00:12:31 +0200 (CEST) From: Cyrille Lefevre Reply-To: Cyrille Lefevre To: FreeBSD-gnats-submit@FreeBSD.org Cc: obrien@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/39676: lukemftpd manual pages fix + examples Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 39676 >Category: bin >Synopsis: lukemftpd manual pages fix + examples >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jun 22 15:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Cyrille Lefevre >Release: FreeBSD 4.6-RC i386 >Organization: ACME >Environment: System: FreeBSD gits 4.6-RC FreeBSD 4.6-RC #11: Sun Jun 9 19:48:37 CEST 2002 root@gits:/disk2/freebsd/src/sys/compile/CUSTOM i386 >Description: lukemftpd configuration files contents are differents from the native one but are named as the native ones. src/etc/mtree/BSD.usr.dist share/exemples/lukemftpd added. src/libexec/lukemftpd/Makefile ftpusers.5 changed to lukemftpusers.5 lukemftpchroot.5 linked to lukemftpusers.5 CLEANFILES updated as well. src/contrib/lukemftpd/src/ftpd.8 src/contrib/lukemftpd/src/ftpd.conf.5 src/contrib/lukemftpd/src/ftpusers.5 src/contrib/lukemftpd/src/pathnames.h ftpd -> lukemftpd ftpd.conf -> lukemftpd.conf except for /etc/ftpd.conf ftpchroot -> lukemftpchroot ftpusers -> lukemftpusers ftpwelcome -> lukemftpwelcome examples/ftpd -> examples/lukemftpd since almost everything is renamed to lukemXXX, how to also rename ftpd.conf as well ? much better would be to put them all in /etc/lukemftpd ? >How-To-Repeat: n/a >Fix: take care, this patch set is divided in two parts. the first one is a cvs diff while the other patch is a shell archive (shar). -=-=-=-=-=-=-=-=-=-=- this is a cvs diff -=-=-=-=-=-=-=-=-=-=- Index: src/etc/mtree/BSD.usr.dist =================================================================== RCS file: /home/ncvs/src/etc/mtree/BSD.usr.dist,v retrieving revision 1.188.2.37 diff -u -r1.188.2.37 BSD.usr.dist --- /usr/src/etc/mtree/BSD.usr.dist 27 May 2002 12:14:06 -0000 1.188.2.37 +++ /usr/src/etc/mtree/BSD.usr.dist 22 Jun 2002 21:42:12 -0000 @@ -347,6 +347,8 @@ .. libvgl .. + lukemftpd + .. mdoc .. meteor Index: src/libexec/lukemftpd/Makefile =================================================================== RCS file: /home/ncvs/src/libexec/lukemftpd/Makefile,v retrieving revision 1.5.2.1 diff -u -r1.5.2.1 Makefile --- Makefile 20 Jun 2002 21:13:33 -0000 1.5.2.1 +++ Makefile 22 Jun 2002 21:47:56 -0000 @@ -7,7 +7,8 @@ .PATH: ${LUKEMFTPD}/src PROG= lukemftpd -MAN= lukemftpd.8 ftpd.conf.5 ftpusers.5 +MAN= lukemftpd.8 ftpd.conf.5 lukemftpusers.5 +MLINKS= lukemftpusers.5 lukemftpchroot.5 SRCS= cmds.c conf.c ftpd.c ftpcmd.y popen.c WFORMAT= 0 @@ -44,6 +45,9 @@ lukemftpd.8: ftpd.8 ln -sf ${.ALLSRC} ${.TARGET} -CLEANFILES+= lukemftpd.8 +lukemftpusers.5: ftpusers.5 + ln -sf ${.ALLSRC} ${.TARGET} + +CLEANFILES+= lukemftpd.8 lukemftpusers.5 .include Index: src/contrib/lukemftpd/src/ftpd.8 =================================================================== RCS file: /home/ncvs/src/contrib/lukemftpd/src/ftpd.8,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftpd.8 --- ftpd.8 14 Mar 2002 19:25:31 -0000 1.1.1.2 +++ ftpd.8 22 Jun 2002 22:02:14 -0000 @@ -68,10 +68,10 @@ .\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94 .\" .Dd October 13, 2001 -.Dt FTPD 8 +.Dt LUKEMFTPD 8 .Os .Sh NAME -.Nm ftpd +.Nm lukemftpd .Nd Internet File Transfer Protocol server .Sh SYNOPSIS @@ -104,7 +104,7 @@ into for anonymous logins. Default is the home directory for the ftp user. This can also be specified with the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 .Sy chroot directive. .It Fl c Ar confdir @@ -113,12 +113,12 @@ to .Ar confdir . This changes the directory for the following files: -.Pa /etc/ftpchroot , -.Pa /etc/ftpusers , -.Pa /etc/ftpwelcome , +.Pa /etc/lukemftpchroot , +.Pa /etc/lukemftpusers , +.Pa /etc/lukemftpwelcome , .Pa /etc/motd , and the file specified by the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 .Sy limit directive. .It Fl C Ar user @@ -126,7 +126,7 @@ .Ar user would be granted access under the restrictions given in -.Xr ftpusers 5 +.Xr lukemftpusers 5 and exit without attempting a connection. .Nm exits with an exit code of 0 if access would be granted, or 1 otherwise. @@ -269,7 +269,7 @@ .Nm displays it and exits. If the file -.Pa /etc/ftpwelcome +.Pa /etc/lukemftpwelcome exists, .Nm prints it before issuing the @@ -281,7 +281,7 @@ .Nm prints it after a successful login. This may be changed with the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 directive .Sy motd . .Pp @@ -420,7 +420,7 @@ S/Key is a Trademark of Bellcore. .It The login name must be allowed based on the information in -.Xr ftpusers 5 . +.Xr lukemftpusers 5 . .It The user must have a standard shell returned by .Xr getusershell 3 . @@ -433,11 +433,11 @@ .Pa /etc/shells . .It If directed by the file -.Xr ftpchroot 5 +.Xr lukemftpchroot 5 the session's root directory will be changed by .Xr chroot 2 to the directory specified in the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 .Sy chroot directive (if set), or to the home directory of the user. @@ -463,7 +463,7 @@ The server performs a .Xr chroot 2 to the directory specified in the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 .Sy chroot directive (if set), the @@ -476,7 +476,7 @@ The server then performs a .Xr chdir 2 to the directory specified in the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 .Sy homedir directive (if set), otherwise to .Pa / . @@ -484,7 +484,7 @@ If other restrictions are required (such as disabling of certain commands and the setting of a specific umask), then appropriate entries in -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 are required. .Pp If the first character of the password supplied by an anonymous user @@ -498,7 +498,7 @@ When .Nm displays various files back to the client (such as -.Pa /etc/ftpwelcome +.Pa /etc/lukemftpwelcome and .Pa /etc/motd ) , various escape strings are replaced with information pertinent @@ -622,7 +622,7 @@ they should be 370. .Pp The following -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 directives should be used: .Dl "modify guest off" .Dl "umask guest 0707" @@ -650,7 +650,7 @@ commands won't be returned to the user. (This is the traditional behaviour.) Note that the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 directive .Sy upload can be used to prevent users uploading here. @@ -673,15 +673,15 @@ .Pa /sbin/ftplogin as login shell. .Sh FILES -.Bl -tag -width /etc/ftpwelcome -compact -.It Pa /etc/ftpchroot +.Bl -tag -width /etc/lukemftpwelcome -compact +.It Pa /etc/lukemftpchroot List of normal users whose root directory should be changed via .Xr chroot 2 . .It Pa /etc/ftpd.conf Configure file conversions and other settings. -.It Pa /etc/ftpusers +.It Pa /etc/lukemftpusers List of unwelcome/restricted users. -.It Pa /etc/ftpwelcome +.It Pa /etc/lukemftpwelcome Welcome notice before login. .It Pa /etc/motd Welcome notice after login. @@ -698,13 +698,13 @@ Login history database. .El .Sh SEE ALSO -.Xr ftp 1 , +.Xr lukemftp 1 , .Xr skey 1 , .Xr who 1 , .Xr getusershell 3 , -.Xr ftpchroot 5 , -.Xr ftpd.conf 5 , -.Xr ftpusers 5 , +.Xr lukemftpchroot 5 , +.Xr lukemftpd.conf 5 , +.Xr lukemftpusers 5 , .Xr syslogd 8 .Sh STANDARDS .Nm @@ -727,7 +727,7 @@ .Bx 4.2 . .Pp Various features such as the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 functionality, .Cm RFC 2389 , and @@ -772,7 +772,7 @@ With the .Dq checkportcmd feature of the -.Xr ftpd.conf 5 , +.Xr lukemftpd.conf 5 , .Sy PORT commands with different host addresses, or TCP ports lower than .Dv IPPORT_RESERVED @@ -828,7 +828,7 @@ That directory is only necessary if you want to display the error messages of conversion commands to the user. Note that if uploads are disabled with the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 directive .Sy upload , then this directory cannot be abused by the user in this way, so it Index: src/contrib/lukemftpd/src/ftpd.conf.5 =================================================================== RCS file: /home/ncvs/src/contrib/lukemftpd/src/ftpd.conf.5,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftpd.conf.5 --- ftpd.conf.5 14 Mar 2002 19:25:32 -0000 1.1.1.2 +++ ftpd.conf.5 22 Jun 2002 21:38:23 -0000 @@ -35,18 +35,18 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd December 5, 2001 -.Dt FTPD.CONF 5 +.Dt LUKEMFTPD.CONF 5 .Os .Sh NAME -.Nm ftpd.conf +.Nm lukemftpd.conf .Nd -.Xr ftpd 8 +.Xr lukemftpd 8 configuration file .Sh DESCRIPTION The .Nm file specifies various configuration options for -.Xr ftpd 8 +.Xr lukemftpd 8 that apply once a user has authenticated their connection. .Pp .Nm @@ -74,7 +74,7 @@ Each authenticated user is a member of a .Em class , which is determined by -.Xr ftpusers 5 . +.Xr lukemftpusers 5 . .Em class is used to determine which .Nm @@ -102,7 +102,7 @@ .It Sy CHROOT .Xr chroot 2 ed users (as per -.Xr ftpchroot 5 ) . +.Xr lukemftpchroot 5 ) . A .Xr chroot 2 is performed after login. @@ -111,7 +111,7 @@ .El .Pp The -.Xr ftpd 8 +.Xr lukemftpd 8 .Sy STAT command will return the class settings for the current user as defined by .Nm "" , @@ -261,7 +261,7 @@ conversions with the same suffix. .It Sy denyquick Ar class Op Sy off Enforce -.Xr ftpusers 5 +.Xr lukemftpusers 5 rules after the .Sy USER command is received, rather than after the @@ -300,7 +300,7 @@ Escape sequences are supported; refer to .Sx Display file escape sequences in -.Xr ftpd 8 +.Xr lukemftpd 8 for more information. .It Sy homedir Ar class Op Sy pathformat If @@ -406,7 +406,7 @@ Escape sequences are supported; refer to .Sx Display file escape sequences in -.Xr ftpd 8 +.Xr lukemftpd 8 for more information. If .Ar file @@ -609,18 +609,18 @@ umask guest 0707 .Ed .Sh FILES -.Bl -tag -width /usr/share/examples/ftpd/ftpd.conf -compact +.Bl -tag -width /usr/share/examples/lukemftpd/ftpd.conf -compact .It Pa /etc/ftpd.conf This file. -.It Pa /usr/share/examples/ftpd/ftpd.conf +.It Pa /usr/share/examples/lukemftpd/ftpd.conf A sample .Nm file. .El .Sh SEE ALSO -.Xr ftpchroot 5 , -.Xr ftpusers 5 , -.Xr ftpd 8 +.Xr lukemftpchroot 5 , +.Xr lukemftpusers 5 , +.Xr lukemftpd 8 .Sh HISTORY The .Nm Index: src/contrib/lukemftpd/src/ftpusers.5 =================================================================== RCS file: /home/ncvs/src/contrib/lukemftpd/src/ftpusers.5,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftpusers.5 --- ftpusers.5 14 Mar 2002 19:25:32 -0000 1.1.1.2 +++ ftpusers.5 22 Jun 2002 21:38:00 -0000 @@ -35,19 +35,19 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd July 17, 2000 -.Dt FTPUSERS 5 +.Dt LUKEMFTPUSERS 5 .Os .Sh NAME -.Nm ftpusers , -.Nm ftpchroot +.Nm lukemftpusers , +.Nm lukemftpchroot .Nd -.Xr ftpd 8 +.Xr lukemftpd 8 access control file .Sh DESCRIPTION The .Nm file provides user access control for -.Xr ftpd 8 +.Xr lukemftpd 8 by defining which users may login. .Pp If the @@ -107,7 +107,7 @@ is not given, the user is denied access. .It Sy class defines the class to use in -.Xr ftpd.conf 5 . +.Xr lukemftpd.conf 5 . .El .Pp If @@ -116,7 +116,7 @@ .Bl -tag -width "chroot" -offset indent .It Sy chroot If there is a match in -.Sx /etc/ftpchroot +.Sx /etc/lukemftpchroot for the user. .It Sy guest If the user name is @@ -132,7 +132,7 @@ This syntax is backward-compatible with the old syntax. .Pp If a user requests a guest login, the -.Xr ftpd 8 +.Xr lukemftpd 8 server checks to see that both .Dq anonymous @@ -143,23 +143,23 @@ and .Dq "ftp allow" to -.Pa /etc/ftpusers +.Pa /etc/lukemftpusers in order to allow guest logins. -.Ss /etc/ftpchroot +.Ss /etc/lukemftpchroot The file -.Pa /etc/ftpchroot +.Pa /etc/lukemftpchroot is used to determine which users will have their session's root directory changed (using .Xr chroot 2 ) , either to the directory specified in the -.Xr ftpd.conf 5 +.Xr lukemftpd.conf 5 .Sy chroot directive (if set), or to the home directory of the user. If the file does not exist, the root directory change is not performed. .Pp The syntax is similar to -.Nm "" , +.Nm lukemftpusers , except that the .Sy class argument is ignored. @@ -167,14 +167,14 @@ No further comparisons are attempted after the first successful match. This syntax is backward-compatible with the old syntax. .Sh FILES -.Bl -tag -width /usr/share/examples/ftpd/ftpusers -compact -.It Pa /etc/ftpchroot +.Bl -tag -width /usr/share/examples/lukemftpd/lukemftpusers -compact +.It Pa /etc/lukemftpchroot List of normal users who should have their ftp session's root directory changed by using .Xr chroot 2 . -.It Pa /etc/ftpusers +.It Pa /etc/lukemftpusers This file. -.It Pa /usr/share/examples/ftpd/ftpusers +.It Pa /usr/share/examples/lukemftpd/lukemftpusers A sample .Nm file. @@ -182,5 +182,5 @@ .Sh SEE ALSO .Xr fnmatch 3 , .Xr inet_net_pton 3 , -.Xr ftpd.conf 5 , -.Xr ftpd 8 +.Xr lukemftpd.conf 5 , +.Xr lukemftpd 8 Index: src/contrib/lukemftpd/src/pathnames.h =================================================================== RCS file: /home/ncvs/src/contrib/lukemftpd/src/pathnames.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 pathnames.h --- pathnames.h 19 Jul 2001 16:25:08 -0000 1.1.1.1 +++ pathnames.h 22 Jun 2002 21:39:34 -0000 @@ -39,12 +39,12 @@ #define _DEFAULT_CONFDIR "/etc" #endif -#define _PATH_FTPCHROOT "ftpchroot" +#define _PATH_FTPCHROOT "lukemftpchroot" #define _PATH_FTPDCONF "ftpd.conf" #define _PATH_FTPLOGINMESG "motd" #undef _PATH_FTPUSERS -#define _PATH_FTPUSERS "ftpusers" -#define _PATH_FTPWELCOME "ftpwelcome" +#define _PATH_FTPUSERS "lukemftpusers" +#define _PATH_FTPWELCOME "lukemftpwelcome" #define _PATH_CLASSPIDS "/var/run/ftpd.pids-" -=-=-=-=-=-=-=-=-=-=- this is a shell archive -=-=-=-=-=-=-=-=-=-=- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # lukemftpd/Makefile # lukemftpd/ftpd.conf # lukemftpd/lukemftpusers # echo x - lukemftpd/Makefile sed 's/^X//' >lukemftpd/Makefile << 'END-of-lukemftpd/Makefile' X# $FreeBSD$ X XNOOBJ= noobj X X# ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/src/share/examples/ftpd XFILES= ftpd.conf lukemftpusers X XFILESDIR= ${SHAREDIR}/examples/lukemftpd X X.include END-of-lukemftpd/Makefile echo x - lukemftpd/ftpd.conf sed 's/^X//' >lukemftpd/ftpd.conf << 'END-of-lukemftpd/ftpd.conf' X# $FreeBSD$ X# X# example /etc/ftpd.conf X X# Check PORT command for validity; prevents denial of service attempt. X# Xcheckportcmd all X X# Use `guest' as a template for `localguest'; any following `guest' entries X# will be used for `localguest' too. X# Xtemplate localguest guest X X# For anonymous connections, when a directory is entered show the contents X# of `.message' if it exists, and notify about any files that start X# with `README'. X# Xdisplay guest .message Xnotify guest README* X X# Prevent uploads & modification commands for anonymous connections X# Xupload guest off X X# Limit transfers for users in `slowmo' class to 5 KB/s X# Xrateget slowmo 5k Xrateput slowmo 5k X X# Limit the number of simultaneous `guest' class connections to 50, X# and display /etc/ftptoomany when this limit is reached. X# As `localguest' uses the `guest' settings via the template above, override X# this specifically for `localguest' entries to unlimited. X# Xlimit guest 50 ftptoomany Xlimit localguest -1 X X# Support automatic conversions. X# The first entry supports compression of files, and there's no suppression X# character. `%s' is replaced by the filename. X# The next two entries support tar-ing and tar+gzip of files and directories, X# unless `.notar' exists in the current directory. X# The `--' in the command strings should prevent a filename with a leading X# `-' being interpreted as an argument to gzip/tar. X# For anonymous connections, ~ftp/usr/bin should be a symlink to ~ftp/bin, X# and gzip and tar should exist in the latter directory as statically X# linked executables, to avoid the effort of setting up shared libraries X# correctly under ~ftp. X# Xconversion all .gz f . /usr/bin/gzip -c -- %s Xconversion all .tar df .notar /usr/bin/tar -cf X - -- %s Xconversion all .tar.gz df .notar /usr/bin/tar X-zcf - -- %s END-of-lukemftpd/ftpd.conf echo x - lukemftpd/lukemftpusers sed 's/^X//' >lukemftpd/lukemftpusers << 'END-of-lukemftpd/lukemftpusers' X# $FreeBSD$ X# X# example /etc/lukemftpusers X# X X# prevent the following from logging in: X# - users `root' and `toor' X# - members of the group `noftp' X# - connections from 10.0.0.0/8 X# - connections from *.spammer.com X# Xroot deny Xtoor deny X*:noftp deny X*@10.0.0.0/8 deny X*@*.spammer.com deny X X# anonymous ftp connections from *.netbsd.org and 204.152.186.0/24 go into X# class `localguest' X# Xftp@*.netbsd.org allow localguest Xftp@204.152.186.0/24 allow localguest X X# permit anonymous ftp connections from elsewhere (both entries are required, X# for backwards compatibility, although `ftp' is the user checked in other X# rules) X# Xftp allow Xanonymous allow X X# users who are members of a group name which ends with `src', connecting X# from any host in the *.netbsd.org domain become class `source' X# X*:*src@*.netbsd.org allow source X X# prevent all other users X# X* deny END-of-lukemftpd/lukemftpusers exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message