[oe-commits] Jeremy Lainé : vsftpd: improve default configuration

GIT User account git at amethyst.openembedded.net
Wed Dec 24 06:40:50 UTC 2008


Module: openembedded.git
Branch: john_lee/openmoko-toolchain
Commit: 005aed69752adc491683c7ee49cec9e52423ded9
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=005aed69752adc491683c7ee49cec9e52423ded9

Author: Jeremy Lainé <jeremy.laine at m4x.org>
Date:   Tue Dec 23 06:52:35 2008 +0100

vsftpd: improve default configuration

* restrict anonymous user permissions
* change anonymous ftp directory to /var/lib/ftp
* reindent init script

---

 packages/vsftpd/files/init        |   40 ++++++++++++++++++------------------
 packages/vsftpd/files/vsftpd.conf |    4 +-
 packages/vsftpd/vsftpd_2.0.5.bb   |    4 +-
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/packages/vsftpd/files/init b/packages/vsftpd/files/init
index f2e40b3..d0ec010 100755
--- a/packages/vsftpd/files/init
+++ b/packages/vsftpd/files/init
@@ -3,7 +3,7 @@ DAEMON=/usr/sbin/vsftpd
 NAME=vsftpd
 DESC="FTP Server"
 ARGS=""
-FTPDIR=/var/tmp/ftp
+FTPDIR=/var/lib/ftp
 
 test -f $DAEMON || exit 0
 
@@ -12,30 +12,30 @@ set -e
 case "$1" in
     start)
         echo -n "* starting $DESC: $NAME... "
-	if ! test -d $FTPDIR; then
-		mkdir -p $FTPDIR/in
-		chown ftp $FTPDIR -R
-		chmod a-w $FTPDIR
-		chmod u+w $FTPDIR/in
-	fi
-	start-stop-daemon -S -b -x $DAEMON -- $ARGS
-	echo "done."
-	;;
+        if ! test -d $FTPDIR; then
+            mkdir -p $FTPDIR/in
+            chown ftp $FTPDIR -R
+            chmod a-w $FTPDIR
+            chmod u+w $FTPDIR/in
+        fi
+        start-stop-daemon -S -b -x $DAEMON -- $ARGS
+        echo "done."
+        ;;
     stop)
         echo -n "* stopping $DESC: $NAME... "
-	start-stop-daemon -K -x $DAEMON
-	echo "done."
-	;;
+        start-stop-daemon -K -x $DAEMON
+        echo "done."
+        ;;
     restart)
         echo "* restarting $DESC: $NAME... "
- 	$0 stop
-	$0 start
-	echo "done."
-	;;
+        $0 stop
+        $0 start
+        echo "done."
+        ;;
     *)
-	echo "Usage: $0 {start|stop|restart}"
-	exit 1
-	;;
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+        ;;
 esac
 
 exit 0
diff --git a/packages/vsftpd/files/vsftpd.conf b/packages/vsftpd/files/vsftpd.conf
index f6c5b50..08f91e0 100755
--- a/packages/vsftpd/files/vsftpd.conf
+++ b/packages/vsftpd/files/vsftpd.conf
@@ -27,11 +27,11 @@ write_enable=YES
 # Uncomment this to allow the anonymous FTP user to upload files. This only
 # has an effect if the above global write enable is activated. Also, you will
 # obviously need to create a directory writable by the FTP user.
-anon_upload_enable=YES
+#anon_upload_enable=YES
 #
 # Uncomment this if you want the anonymous FTP user to be able to create
 # new directories.
-anon_mkdir_write_enable=YES
+#anon_mkdir_write_enable=YES
 #
 # Activate directory messages - messages given to remote users when they
 # go into a certain directory.
diff --git a/packages/vsftpd/vsftpd_2.0.5.bb b/packages/vsftpd/vsftpd_2.0.5.bb
index fc10d27..0d7c7a1 100644
--- a/packages/vsftpd/vsftpd_2.0.5.bb
+++ b/packages/vsftpd/vsftpd_2.0.5.bb
@@ -1,7 +1,7 @@
 DESCRIPTION = "Secure ftp daemon"
 SECTION = "console/network"
 LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "ftp://vsftpd.beasts.org/users/cevans/vsftpd-${PV}.tar.gz \
            file://makefile.patch;patch=1 \
@@ -36,7 +36,7 @@ do_install() {
 
 pkg_postinst() {
         addgroup ftp
-        adduser --system --home /var/tmp/ftp --no-create-home --ingroup ftp --disabled-password -s /bin/false ftp
+        adduser --system --home /var/lib/ftp --no-create-home --ingroup ftp --disabled-password -s /bin/false ftp
         mkdir -p ${localstatedir}/share/empty
 }
 





More information about the Openembedded-commits mailing list