summaryrefslogtreecommitdiff
path: root/community/vsftpd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-06 00:01:33 +0000
committerroot <root@rshg054.dnsready.net>2012-03-06 00:01:33 +0000
commitb8afacf1f28ac27321feb9b92bd50dd8961b7736 (patch)
treede441882aca38091a1e438e1d8da8a9af3bd023a /community/vsftpd
parent11711de1942a141f28faef695c4c78c8357fbf23 (diff)
Tue Mar 6 00:01:33 UTC 2012
Diffstat (limited to 'community/vsftpd')
-rw-r--r--community/vsftpd/PKGBUILD41
-rw-r--r--community/vsftpd/vsftpd.d67
-rw-r--r--community/vsftpd/vsftpd.install17
-rw-r--r--community/vsftpd/vsftpd.xinetd10
4 files changed, 135 insertions, 0 deletions
diff --git a/community/vsftpd/PKGBUILD b/community/vsftpd/PKGBUILD
new file mode 100644
index 000000000..1215b4714
--- /dev/null
+++ b/community/vsftpd/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 67148 2012-03-05 00:08:24Z pschmitz $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=vsftpd
+pkgver=2.3.5
+pkgrel=1
+pkgdesc="Very Secure FTP daemon"
+arch=('i686' 'x86_64')
+url="https://security.appspot.com/vsftpd.html"
+license=('GPL2')
+depends=('openssl')
+backup=('etc/vsftpd.conf' 'etc/xinetd.d/vsftpd')
+install=vsftpd.install
+source=(https://security.appspot.com/downloads/${pkgname}-${pkgver}.tar.gz{,.asc}
+ 'vsftpd.xinetd' 'vsftpd.d')
+sha1sums=('f15b39ba6d68c953ab3c3e613e6ddc2a26493755'
+ '2ddf92782f19dafc72439a2917acb1d7e124d149'
+ 'c87b4ce56dac15223694a6e86c01ea813b877596'
+ '24f268956c24e78be0c234c6d31f41487922eafe')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # build-time config
+ sed \
+ -e 's|^#undef VSF_BUILD_SSL$|#define VSF_BUILD_SSL|' \
+ -i builddefs.h
+ make CFLAGS="${CFLAGS}"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ install -D -m755 vsftpd "${pkgdir}/usr/sbin/vsftpd"
+ install -D -m644 vsftpd.conf "${pkgdir}/etc/vsftpd.conf"
+ install -D -m644 vsftpd.8 "${pkgdir}/usr/share/man/man8/vsftpd.8"
+ install -D -m644 vsftpd.conf.5 "${pkgdir}/usr/share/man/man5/vsftpd.conf.5"
+ install -D -m644 "${srcdir}/vsftpd.xinetd" "${pkgdir}/etc/xinetd.d/vsftpd"
+ install -D -m755 "${srcdir}/vsftpd.d" "${pkgdir}/etc/rc.d/vsftpd"
+
+ install -d -m755 "${pkgdir}/usr/share/empty"
+}
diff --git a/community/vsftpd/vsftpd.d b/community/vsftpd/vsftpd.d
new file mode 100644
index 000000000..27310855c
--- /dev/null
+++ b/community/vsftpd/vsftpd.d
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+daemon_name=vsftpd
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid
+ # RUN
+ $daemon_name &
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > /var/run/$daemon_name.pid
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f /var/run/$daemon_name.pid &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
diff --git a/community/vsftpd/vsftpd.install b/community/vsftpd/vsftpd.install
new file mode 100644
index 000000000..48f134e24
--- /dev/null
+++ b/community/vsftpd/vsftpd.install
@@ -0,0 +1,17 @@
+# arg 1: the new package version
+post_install() {
+ if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
+ echo ">>> It appears that your current kernel has linux security"
+ echo ">>> capabilities built as a module. vsftpd requires this"
+ echo ">>> functionality to operate."
+ echo ">>>"
+ echo ">>> To activate the module, please load it now (modprobe capability)."
+ echo ">>> Also, you should add it to your MODULES array in rc.conf, so"
+ echo ">>> it will be activated automatically at boot-up."
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
diff --git a/community/vsftpd/vsftpd.xinetd b/community/vsftpd/vsftpd.xinetd
new file mode 100644
index 000000000..eff2eb3db
--- /dev/null
+++ b/community/vsftpd/vsftpd.xinetd
@@ -0,0 +1,10 @@
+service ftp
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/vsftpd
+ log_on_success += HOST DURATION
+ log_on_failure += HOST
+ disable = yes
+}