Rev 55: Start implementing muddleftpd test server. Config tests passing. in file:///net/bigmamac/Volumes/home/vila/.bazaar/plugins/local_test_server/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Feb 23 10:24:18 GMT 2009


At file:///net/bigmamac/Volumes/home/vila/.bazaar/plugins/local_test_server/

------------------------------------------------------------
revno: 55
revision-id: v.ladeuil+lp at free.fr-20090223102417-v7kc6gbd9fab2tu4
parent: v.ladeuil+lp at free.fr-20090220155748-d5jf940jr9iis842
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: local_test_server
timestamp: Mon 2009-02-23 11:24:17 +0100
message:
  Start implementing muddleftpd test server. Config tests passing.
  
  * tests/test_utils.py:
  (full_scenarios): Define muddleftpd.
  
  * configs/muddleftpd.conf: 
  New file, based on default Hardy one.
  
  * config.py:
  (Muddleftpd): New class.
-------------- next part --------------
=== modified file 'config.py'
--- a/config.py	2009-02-20 15:57:48 +0000
+++ b/config.py	2009-02-23 10:24:17 +0000
@@ -193,3 +193,9 @@
     def __init__(self, _base_dir=None):
         super(Proftpd, self).__init__('proftpd', _base_dir=_base_dir)
 
+
+class Muddleftpd(Config):
+
+    def __init__(self, _base_dir=None):
+        super(Muddleftpd, self).__init__('muddleftpd', _base_dir=_base_dir)
+

=== added file 'configs/muddleftpd.conf'
--- a/configs/muddleftpd.conf	1970-01-01 00:00:00 +0000
+++ b/configs/muddleftpd.conf	2009-02-23 10:24:17 +0000
@@ -0,0 +1,82 @@
+#
+# Based on /etc/muddleftpd/muddleftpd.conf /etc/muddleftpd in Ubuntu Hardy
+#
+[section] main
+
+# set some reasonable defaults
+
+ftpport %(port)s
+maxusers 100
+timeout 300
+logfile %(log_file)s
+pidfile %(pid_file)s
+scratchfile %(var_lock_dir)s/muddleftpd.scratch
+
+# log everything except debugging logs
+logstrength 63
+
+# uncomment this to print a message on login
+# logindump /etc/muddleftpd/logindump
+
+# allow any host to connect
+ipacl A:*
+
+# be sure to change this to your own email address and hostname; they
+# are used for cookies in the logindump/cddump files
+email %(user)s@%(host)s
+hostname %(host)s
+
+# be sure to use this option; it makes multi-line messages be printed
+# correctly
+altlongreplies 1
+
+# look for the following [section]s below to define the various groups
+# (in this case, only one) that users can log in as.
+group anonymous
+
+# --------------------------------------------------------------------
+# please note that anonymous access is *not* set up automatically; if
+# you want to use this default configuration you must run `adduser
+# ftp` to create a place to serve files.
+
+[section] anonymous
+
+    # any host or username will match this group
+    ipacl A:*
+    nameacl A:*
+
+    # tell the server to use chroot to the anonymous rootdir
+    chroot 1
+
+    # tell the server to use the ftp user as the anonymous rootdir
+    # and uid/gid
+    authparams ftp
+
+    # tell the server to use the anonymous authenticator, and
+    # accept any password.
+    authmethod anonymous
+
+    # disallow any changes to file permissions or upload umask
+    chmoding 0
+
+    # print out this file when the user logs in. It is not relative
+    # to anonymous's rootdir
+    welcome /home/ftp/welcome.msg
+
+    # display this file when a user changes into a new directory
+    cddump .message
+
+    # display this file when too many users are logged on
+    busydump /etc/muddleftpd/busydump
+
+    # set the umask files are uploaded with
+    umask 077
+
+    # give anonymous user read/list access everywhere and add/list
+    # access to the incoming folder. The / on the end of the directive
+    # tells muddleftpd to apply ACL to a directory rather than a file.
+    # (chdir, list, read)
+    access /:CLR
+    # uncomment the following line to allow uploads to /incoming
+    # (chdir, list, read, add, mkdir)
+    # access /incoming/:CLRAM

=== modified file 'tests/test_utils.py'
--- a/tests/test_utils.py	2009-02-20 15:57:48 +0000
+++ b/tests/test_utils.py	2009-02-23 10:24:17 +0000
@@ -167,6 +167,13 @@
                 _server_feature_class=test_server.ProftpdFeature,
                     _test_server_class=test_server.Proftpd,
                 )),
+        ('muddleftpd', dict(
+                _server_name='muddleftpd',
+                _config_class=config.Muddleftpd,
+#                _server_class=server.Muddleftpd,
+#                _server_feature_class=test_server.MuddleftpdFeature,
+#                    _test_server_class=test_server.Muddleftpd,
+                )),
         ]
     return scenarios
 



More information about the bazaar-commits mailing list