Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/examples/ftpd improve examples:



details:   https://anonhg.NetBSD.org/src/rev/1fe4e397e22f
branches:  trunk
changeset: 480322:1fe4e397e22f
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sun Jan 09 13:19:19 2000 +0000

description:
improve examples:
- put local anon users into a separate class `localguest'
- use `localguest' to demonstrate the template features
- provide a better description of how the conversion commands work.

diffstat:

 share/examples/ftpd/ftpd.conf |  28 ++++++++++++++++++++++------
 share/examples/ftpd/ftpusers  |  21 ++++++++++++---------
 2 files changed, 34 insertions(+), 15 deletions(-)

diffs (100 lines):

diff -r f317a397fb4e -r 1fe4e397e22f share/examples/ftpd/ftpd.conf
--- a/share/examples/ftpd/ftpd.conf     Sun Jan 09 11:26:01 2000 +0000
+++ b/share/examples/ftpd/ftpd.conf     Sun Jan 09 13:19:19 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: ftpd.conf,v 1.3 2000/01/08 13:17:17 lukem Exp $
+#      $NetBSD: ftpd.conf,v 1.4 2000/01/09 13:19:19 lukem Exp $
 #
 # example /etc/ftpd.conf
 
@@ -6,6 +6,11 @@
 #
 checkportcmd   all
 
+# Use `guest' as a template for `localguest'; any following `guest' entries
+# will be used for `localguest' too.
+#
+template       localguest      guest
+
 # For anonymous connections, when a directory is entered show the contents
 # of `.message' if it exists, and notify about any files that start
 # with `README'.
@@ -22,14 +27,25 @@
 rateget                slowmo  5k
 rateput                slowmo  5k
 
-# Limit the number of simultaneous `foo' class connections to 50,
-# and display /etc/ftptoomany when this limit is reached
+# Limit the number of simultaneous `guest' class connections to 50,
+# and display /etc/ftptoomany when this limit is reached.
+# As `localguest' uses the `guest' settings via the template above, override
+# this specifically for `localguest' entries to unlimited.
 #
-limit          foo     50      ftptoomany
+limit          guest           50      ftptoomany
+limit          localguest      -1
 
 # Support automatic conversions.
-# (For anonymous connections, ~ftp/usr/bin should be a symlink to ~ftp/bin,
-#  and gzip and tar should exist in the latter directory.)
+# The first entry supports compression of files, and there's no suppression
+# character. `%s' is replaced by the filename.
+# The next two entries support tar-ing and tar+gzip of files and directories,
+# unless `.notar' exists in the current directory.
+# The `--' in the command strings should prevent a filename with a leading
+# `-' being interpreted as an argument to gzip/tar.
+# For anonymous connections, ~ftp/usr/bin should be a symlink to ~ftp/bin,
+# and gzip and tar should exist in the latter directory as statically
+# linked executables, to avoid the effort of setting up shared libraries
+# correctly under ~ftp.
 #
 conversion     all     .gz     f       .       /usr/bin/gzip -c -- %s
 conversion     all     .tar    df      .notar  /usr/bin/tar -cf - -- %s
diff -r f317a397fb4e -r 1fe4e397e22f share/examples/ftpd/ftpusers
--- a/share/examples/ftpd/ftpusers      Sun Jan 09 11:26:01 2000 +0000
+++ b/share/examples/ftpd/ftpusers      Sun Jan 09 13:19:19 2000 +0000
@@ -1,32 +1,35 @@
-#      $NetBSD: ftpusers,v 1.1 2000/01/08 13:31:00 lukem Exp $
+#      $NetBSD: ftpusers,v 1.2 2000/01/09 13:19:19 lukem Exp $
 #
 # example /etc/ftpusers
 #
 
 # prevent the following from logging in:
 #      - users `root' and `toor'
-#      - group `noftp'
-#      - connections from 127.0.0.0/8 (i.e, localhost)
+#      - members of the group `noftp'
+#      - connections from 10.0.0.0/8
 #      - connections from *.spammer.com
 #
 root                   deny
 toor                   deny
 *:noftp                        deny
-*@127.0.0.0/8          deny
+*@10.0.0.0/8           deny
 *@*.spammer.com                deny
 
-# anonymous ftp connections from *.netbsd.org go into class `localanon'
+# anonymous ftp connections from *.netbsd.org and 204.152.186.0/24 go into
+# class `localguest'
 #
-ftp@*.netbsd.org       allow   localanon
+ftp@*.netbsd.org       allow   localguest
+ftp@204.152.186.0/24   allow   localguest
 
 # permit anonymous ftp connections from elsewhere (both entries are required,
-# for backwards compatibility)
+# for backwards compatibility, although `ftp' is the user checked in other
+# rules)
 #
 ftp                    allow
 anonymous              allow
 
-# users who are members of a group name which ends with `src' connecting
-# from any host in the netbsd.org domain become class `source'
+# users who are members of a group name which ends with `src', connecting
+# from any host in the *.netbsd.org domain become class `source'
 #
 *:*src@*.netbsd.org    allow   source
 



Home | Main Index | Thread Index | Old Index