summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-ftp/pure-ftpd/files/digest-pure-ftpd-0.99.1a1
-rw-r--r--net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.8_beta-r2 (renamed from net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.8_beta-r1)0
-rw-r--r--net-ftp/pure-ftpd/files/pftpd.inetd6
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftp_xml_python.py41
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpd.conf_d24
-rw-r--r--net-ftp/pure-ftpd/files/pure-ftpwho_html.py213
-rw-r--r--net-ftp/pure-ftpd/files/welcome.msg8
-rw-r--r--net-ftp/pure-ftpd/pure-ftpd-0.99.1a.ebuild69
-rw-r--r--net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r2.ebuild (renamed from net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r1.ebuild)6
9 files changed, 25 insertions, 343 deletions
diff --git a/net-ftp/pure-ftpd/files/digest-pure-ftpd-0.99.1a b/net-ftp/pure-ftpd/files/digest-pure-ftpd-0.99.1a
deleted file mode 100644
index cf3f8d8c257c..000000000000
--- a/net-ftp/pure-ftpd/files/digest-pure-ftpd-0.99.1a
+++ /dev/null
@@ -1 +0,0 @@
-MD5 62b6657fe63c1bff86e3db3316df6a85 pure-ftpd-0.99.1a.tar.gz 290591
diff --git a/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.8_beta-r1 b/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.8_beta-r2
index fe8e6fbf5bca..fe8e6fbf5bca 100644
--- a/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.8_beta-r1
+++ b/net-ftp/pure-ftpd/files/digest-pure-ftpd-1.0.8_beta-r2
diff --git a/net-ftp/pure-ftpd/files/pftpd.inetd b/net-ftp/pure-ftpd/files/pftpd.inetd
deleted file mode 100644
index 67e6e2efd86a..000000000000
--- a/net-ftp/pure-ftpd/files/pftpd.inetd
+++ /dev/null
@@ -1,6 +0,0 @@
-# ----------------
-# Pure-FTPd Server
-# ----------------
-ftp stream tcp nowait root /usr/sbin/pure-ftpd pure-ftpd -4 -B -b -N -w -W -O stats:/var/log/pureftpd.log
-
-
diff --git a/net-ftp/pure-ftpd/files/pure-ftp_xml_python.py b/net-ftp/pure-ftpd/files/pure-ftp_xml_python.py
deleted file mode 100644
index 8c7ff809f214..000000000000
--- a/net-ftp/pure-ftpd/files/pure-ftp_xml_python.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /usr/bin/python2
-#Script by j@falooley.org (Jason Lunz) in the contrib section of pure-ftp
-
- import os
- from xml.sax import handler, make_parser
-
- class ftpwho_handler(handler.ContentHandler):
- def __init__(self):
- handler.ContentHandler.__init__(self)
- self.clear()
-
- def startElement(self, name, attrs):
- if name != 'client': return
- d = {}
- for (k, v) in attrs.items():
- d[k] = v
- self.clients.append(d)
-
- def clear(self):
- self.clients = []
-
- parser = make_parser()
- fh = ftpwho_handler()
- parser.setContentHandler(fh)
-
- def numberize(dicts):
- for c in dicts:
- for k in ('pid', 'time', 'localport', 'percentage', 'bandwidth'):
- if c.has_key(k):
- c[k] = int(c[k])
- for k in ('current_size', 'resume', 'total_size'):
- if c.has_key(k):
- c[k] = long(c[k])
- return dicts
-
- def clients():
- fh.clear()
- parser.parse(os.popen('pure-ftpwho -x'))
- return numberize(fh.clients)
-
-
diff --git a/net-ftp/pure-ftpd/files/pure-ftpd.conf_d b/net-ftp/pure-ftpd/files/pure-ftpd.conf_d
index 51630ecf8311..3d37c265f5a5 100644
--- a/net-ftp/pure-ftpd/files/pure-ftpd.conf_d
+++ b/net-ftp/pure-ftpd/files/pure-ftpd.conf_d
@@ -23,7 +23,27 @@ DISK_FULL="-k 90%"
## Authentication (others are 'pam', ...)##
AUTH="-l unix"
-
## Misc. Others ##
-MISC_OTHER="-A -x"
+MISC_OTHER="-A -x -j -R"
+
+#
+# Use these inside $MISC_OTHER
+# More can be found on "http://pureftpd.sourceforge.net/README"
+#
+# -A [ chroot() everyone, but root ]
+# -e [ Only allow anonymous users ]
+# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]
+# -i [ Disallow upload for anonymous users, whatever directory perms are ]
+# -j [ If the home directory of a user doesn't exist, auto-create it ]
+# -M [ Allow anonymous users to create directories. ]
+# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]
+# -x [ Authenticated users can read/write files beginning with a dot ('.')
+# Anonymous users can't, for security reasons ]
+# -X [ Users can't write/read files and directories starting with a dot ('.') ]
+
+
+
+
+
+
diff --git a/net-ftp/pure-ftpd/files/pure-ftpwho_html.py b/net-ftp/pure-ftpd/files/pure-ftpwho_html.py
deleted file mode 100644
index 6e425da17b91..000000000000
--- a/net-ftp/pure-ftpd/files/pure-ftpwho_html.py
+++ /dev/null
@@ -1,213 +0,0 @@
-#! /usr/bin/python2
-# vim: sw=4
-#Script by j@falooley.org (Jason Lunz) in the contrib section of pure-ftp
-
- import getopt
- import pure_ftpwho
- import sys
- from string import capitalize, lower
-
- def range_idx(list, first = 1, cmp_func = cmp):
- for i in range(first+1, len(list)):
- if cmp_func(list[first], list[i]):
- return i
- return len(list)
-
- def dcmp(a, b, key):
- if a.has_key(key):
- if b.has_key(key):
- return cmp(a[key], b[key])
- else:
- return 1
- else:
- if b.has_key(key):
- return -1
- else:
- return 0
-
- def multisort(dicts, keys):
- if not keys:
- return dicts
- dicts.sort(lambda x, y, key=keys[0]: dcmp(x, y, key))
- ret = []
- first = last = 0
- while last < len(dicts):
- last = range_idx(dicts, first, lambda x, y, k=keys[0]: dcmp(x, y, k))
- add = multisort(dicts[first:last], keys[1:])
- if(add):
- ret.extend(add)
- first = last
- return ret
-
- def col_heading(key):
- headings = {'pid' : 'PID'}
- if headings.has_key(key):
- return headings[key]
- else:
- return capitalize(lower(key))
-
- def size_abbrev(num, order=-1):
- abbr = ['b', 'K', 'M', 'G', 'T']
- if order == -1:
- q = 1
- for i in range(len(abbr)):
- p = pow(1024, i+1)
- if num < p:
- return (float(num)/q, abbr[i], i)
- q = p
- else:
- return (float(num)/pow(1024, order), abbr[order], order)
-
- def celltext(dict, type):
- sizes = ['current_size', 'total_size', 'percentage', 'bandwidth']
- align = ''
- ret = ''
- if type == 'stats':
- align = ' align="right"'
- if filter(lambda k, d=dict: d.has_key(k), sizes):
- bw, abbr, order = size_abbrev(dict['bandwidth'])
- if order == 0:
- format = '%d'
- else:
- format = '%.1f'
- sf = format + '/' + format
- sf += '&nbsp;%s&nbsp;(%d%%&nbsp;-&nbsp;' + format
- sf += '&nbsp;%s/s)'
- ret = sf % (size_abbrev(dict['current_size'], order)[0],
- size_abbrev(dict['total_size'], order)[0],
- abbr, dict['percentage'], bw, abbr)
- elif not dict.has_key(type):
- ret = '&nbsp;'
- elif type in sizes:
- ret = size_abbrev(dict[type])
- elif type == 'time':
- align = ' align="right"'
- str = ''
- minutes, seconds = divmod(dict[type], 60)
- hours, minutes = divmod(minutes, 60)
- days, hours = divmod(hours, 24)
- if(days):
- str += '%dd' % days
- if(hours):
- str += '%02d:' % hours
- ret = str + '%02d:%02d' % (minutes, seconds)
- else:
- ret = dict[type]
- return '<td%s>%s</td>' % (align, ret)
-
- def html(dicts, order, headings, stream, totals):
- sorted = multisort(dicts, order)
- stream.write('''<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
- <html>
- <title>Pure-FTPd server status</title>
- <body bgcolor="#ffffff" text="#000000">
- ''')
- if(totals):
- stream.write('<table cellspacing="4" border="2" cellpadding="4">')
- stream.write('<tr><th>Account</th><th>Total Bandwidth</th></tr>')
- for k in totals.keys():
- stream.write('<tr><td>%s</td>' % k)
- stream.write('<td>%d&nbsp;%s/s</td></tr>\n' % size_abbrev(totals[k])[:2])
- stream.write('</table><BR>\n')
- stream.write('<div align="center">')
- stream.write('<table width="100%" cellspacing="4" border="2" cellpadding="4">')
- for k in headings:
- stream.write('<th>%s</th>' % col_heading(k))
- stream.write('\n')
- for d in sorted:
- stream.write('<tr valign="middle">\n')
- for k in headings:
- stream.write('%s' % celltext(d, k))
- stream.write('\n</tr>\n')
- stream.write('</table></div></body></html>\n')
-
- def arg_expand(list, opts):
- optmap = {
- 'A':'account',
- 'B':'bandwidth',
- 'C':'current_size',
- 'F':'file',
- 'H':'host',
- 'L':'localhost',
- 'O':'localport',
- 'P':'percentage',
- 'D':'pid',
- 'R':'resume',
- 'S':'state',
- 'T':'time',
- 'X':'stats',
- 'Z':'total_size' }
- for l in opts:
- if optmap.has_key(l):
- list.append(optmap[l])
- else:
- print 'unrecognized column %s' % l
- sys.exit(1)
-
- def usage():
- print '''usage: html_ftpwho.py [options]
- -c <orderstr> columns to output (default "AXTSHF")
- -o <orderstr> sort order (default "SABT")
- -t show totals per account
-
- <orderstr> is a string of letters, each representing a client attribute:
- A - account
- B - bandwidth
- C - current_size
- F - file
- H - host
- L - localhost
- O - localport
- P - percentage
- D - pid
- R - resume
- S - state
- T - time
- X - stats
- Z - total_size
- '''
- sys.exit(1)
-
- try:
- optlist, args = getopt.getopt(sys.argv[1:], 'hc:o:t')
- except getopt.error, msg:
- print msg
- usage()
-
- ord_arg = ''
- col_arg = ''
- show_totals = 0
- for opt in optlist:
- if '-c' == opt[0]:
- col_arg += opt[1]
- elif '-h' == opt[0]:
- usage()
- elif '-o' == opt[0]:
- ord_arg += opt[1]
- elif '-t' == opt[0]:
- show_totals = 1
- else:
- print 'unrecognized option "%s"' % opt[0]
- usage()
-
- if not ord_arg:
- ord_arg = 'SABT'
- if not col_arg:
- col_arg = 'AXTSHF'
- order = []
- columns = []
- arg_expand(order, ord_arg)
- arg_expand(columns, col_arg)
-
- cl = pure_ftpwho.clients()
- totals = {}
- if show_totals:
- for c in cl:
- if c.has_key('bandwidth'):
- try:
- totals[c['account']] += c['bandwidth']
- except KeyError:
- totals[c['account']] = c['bandwidth']
-
- html(cl, order, columns, sys.stdout, totals)
-
diff --git a/net-ftp/pure-ftpd/files/welcome.msg b/net-ftp/pure-ftpd/files/welcome.msg
deleted file mode 100644
index 54950920aa96..000000000000
--- a/net-ftp/pure-ftpd/files/welcome.msg
+++ /dev/null
@@ -1,8 +0,0 @@
-Hello %R, there are %N (max %M) users logged in at the moment.
-Local time is: %T
-
-If you have any questions concerning this ftp archive or would
-like to announce your uploads, please send a mail to the ftp-admin
-of this server: %E
-
-All transfers are logged. If you don't like this, disconnect now.
diff --git a/net-ftp/pure-ftpd/pure-ftpd-0.99.1a.ebuild b/net-ftp/pure-ftpd/pure-ftpd-0.99.1a.ebuild
deleted file mode 100644
index 214f9e5bd597..000000000000
--- a/net-ftp/pure-ftpd/pure-ftpd-0.99.1a.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# Author Parag Mehta <pm@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-0.99.1a.ebuild,v 1.1 2001/08/21 09:20:57 pm Exp $
-
-A=pure-ftpd-0.99.1a.tar.gz
-S=${WORKDIR}/${P}
-DESCRIPTION="A Fast Production Quality FTP Server - Bug fixes backported from 0.99 . No new feature. Use this version on production servers."
-SRC_URI="http://prdownloads.sourceforge.net/pureftpd/${A}"
-HOMEPAGE="http://pureftpd.sourceforge.net"
-
-DEPEND=">=sys-libs/glibc-2.1.3
- >=sys-libs/pam-0.75"
-
-src_compile() {
-
- cd ${S}
- try ./configure --prefix=/usr --with-throttling --with-virtualhosts \
- --with-ratios --with-largefile --with-cookie --with-welcomemsg \
- --with-altlog --with-ftpwho --with-uploadscript --infodir=/usr/share/info \
- --mandir=/usr/share/man --with-pam
- try make
-
-}
-
-src_install () {
-
- cd ${S}
- try make DESTDIR=${D} install
- dodoc COPYING ChangeLog README README.Configuration-File
- dodoc README.Contrib README.LDAP README.Netfilter
- dodir /etc/pure-ftpd
- dodir /etc/pam.d
- dodir /home/ftp
- dodir /home/ftp/pub
- dodir /home/ftp/incoming
- cp $S/pam/pure-ftpd ${D}/etc/pam.d/
- cp $S/configuration-file/*.pl ${D}/usr/sbin/
- cp $S/configuration-file/*.py ${D}/usr/sbin/
- cp $S/configuration-file/pure-ftpd.conf ${D}/etc/pure-ftpd/pure-ftpd.conf
- cp ${FILESDIR}/ftpusers ${D}/etc
- cp ${FILESDIR}/pure-ftpwho_html.py ${D}/usr/sbin/
- cp ${FILESDIR}/pure-ftp_xml_python.py ${D}/usr/sbin/
- cp ${FILESDIR}/welcome.msg ${D}/home/ftp/
- echo -e "\033[1;42m\033[1;33m Please do no forget to run, the following syntax : \033[0m"
- echo -e "\033[1;42m\033[1;33m ebuild pure-ftpd-0.99-r1.ebuild config \033[0m"
- echo -e "\033[1;42m\033[1;33m This will add the necessary post install config to your system. \033[0m"
- dosym /dev/null /etc/pure-ftpd/127.0.0.1
- fowners ftp.bin /home/ftp
- fowners ftp.bin /home/ftp/incoming
- fowners root.root /home/ftp/pub
- fperms 757 /home/ftp/incoming
- fperms 700 /etc/pure-ftpd
- fperms 600 /etc/ftpusers
- fperms 644 /home/ftp/welcome.msg
-}
-
-pkg_config() {
- echo "This config script will add pftpd lines to your /etc/xinetd.conf."
- echo "Press control-C to abort now OR hit Enter to continue."
- echo
- read
- cat ${FILESDIR}/pftpd.inetd >> ${ROOT}/etc/inetd.conf
- /etc/rc.d/init.d/svc-xinetd restart
- echo "Modifications applied."
-}
-
-
-
diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r1.ebuild b/net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r2.ebuild
index d129545a8126..e61e1669ade7 100644
--- a/net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r1.ebuild
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Bart Verwilst <verwilst@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r1.ebuild,v 1.1 2002/01/20 20:46:41 verwilst Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/pure-ftpd-1.0.8_beta-r2.ebuild,v 1.1 2002/01/31 17:47:12 verwilst Exp $
S="${WORKDIR}/pure-ftpd-1.0.8"
SRC_URI="http://prdownloads.sourceforge.net/pureftpd/pure-ftpd-1.0.8-beta.tar.gz"
@@ -22,9 +22,9 @@ src_compile() {
use ldap && myconf="${myconf} --with-ldap"
./configure --prefix=/usr --with-altlog --with-puredb \
--with-extauth --with-throttling --with-ratios \
- --with-quotas --with-welcomemsg --with-cookie \
+ --with-quotas --with-cookie \
--with-uploadscript --with-virtualhosts \
- --with-virtualchroot --with-diraliases \
+ --with-virtualchroot --with-diraliases --with-ftpwho \
--host=${CHOST} ${myconf} || die
emake || die