From 895742d91cd2fd358a9132e628a7b0c4762cdfe4 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Mon, 11 Mar 2019 14:57:09 +0100 Subject: [PATCH] pure-ftpd: enable PAM, use default config file --- pure-ftpd/.footprint | 6 +++--- pure-ftpd/.signature | 10 +++++----- pure-ftpd/Pkgfile | 13 +++++++------ pure-ftpd/pure-ftpd.conf | 12 ------------ pure-ftpd/pure-ftpd.pam | 14 ++++++++++++++ pure-ftpd/{pure-ftpd => pure-ftpd.rc} | 0 6 files changed, 29 insertions(+), 26 deletions(-) delete mode 100644 pure-ftpd/pure-ftpd.conf create mode 100644 pure-ftpd/pure-ftpd.pam rename pure-ftpd/{pure-ftpd => pure-ftpd.rc} (100%) diff --git a/pure-ftpd/.footprint b/pure-ftpd/.footprint index b087b3bed..b0e23ef0a 100644 --- a/pure-ftpd/.footprint +++ b/pure-ftpd/.footprint @@ -1,4 +1,7 @@ drwxr-xr-x root/root etc/ +-rw-r--r-- root/root etc/ftpusers +drwxr-xr-x root/root etc/pam.d/ +-rw-r--r-- root/root etc/pam.d/pure-ftpd -rw-r--r-- root/root etc/pure-ftpd.conf drwxr-xr-x root/root etc/rc.d/ -rwxr-xr-x root/root etc/rc.d/pure-ftpd @@ -29,6 +32,3 @@ drwxr-xr-x root/root usr/share/man/man8/ -rw-r--r-- root/root usr/share/man/man8/pure-quotacheck.8.gz -rw-r--r-- root/root usr/share/man/man8/pure-statsdecode.8.gz -rw-r--r-- root/root usr/share/man/man8/pure-uploadscript.8.gz -drwxr-xr-x root/root var/ -drwxr-xr-x root/root var/log/ --rw-r--r-- root/root var/log/pure-ftpd.log (EMPTY) diff --git a/pure-ftpd/.signature b/pure-ftpd/.signature index bf16a2474..686562bd7 100644 --- a/pure-ftpd/.signature +++ b/pure-ftpd/.signature @@ -1,7 +1,7 @@ untrusted comment: verify with /etc/ports/opt.pub -RWSE3ohX2g5d/dzS6rZ22ufmXJ1Ho6bmL6lzHsDB5XlCmCXidvAAZfJ8uzR/RztxLifrCiiepU8PJI+cNDu+kXfKVHumrkWksAg= -SHA256 (Pkgfile) = 9d1e36214e15c6235f90ed562b11b03bff09114cb2e37e16ca030359e0ba3d6a -SHA256 (.footprint) = 3f104cd552f809906695df83fb8f562098f22e3798594fde9042265aafa9d8d5 +RWSE3ohX2g5d/QTJSwY/JBraSNZMlfOAlSmfD09bOiUCcI248QbEyVcig6fhAEfdFIutRhM/czYEPAN9Vt8c05eLQVH0mn0o0ww= +SHA256 (Pkgfile) = 950a0667ff8b491a566a4a7a27b5fb069bb637d0e3b18ea1b59a66134e56f7c1 +SHA256 (.footprint) = ab82cc988b2f744cb49ed192c334a933487ae53969039c7bc59336f70d245896 SHA256 (pure-ftpd-1.0.47.tar.bz2) = cb1b695e779a06e42d62d7a1a428d2f605d621dfd5afe4e192b5f9fc4e343692 -SHA256 (pure-ftpd) = 3d6bb818cc8a314c64373072807b1f33afa2e6bd53e7ce82884d85c2ce22627e -SHA256 (pure-ftpd.conf) = b5f236f499ee93101ee1d5ac1569aaf9aa93118773d6b498382ad190f844f710 +SHA256 (pure-ftpd.rc) = 3d6bb818cc8a314c64373072807b1f33afa2e6bd53e7ce82884d85c2ce22627e +SHA256 (pure-ftpd.pam) = 02a3df52f4def696786cc89a6fe492fd8f1bb2e0c34833abf5659b91c929255b diff --git a/pure-ftpd/Pkgfile b/pure-ftpd/Pkgfile index 41f649e71..19d668ebe 100644 --- a/pure-ftpd/Pkgfile +++ b/pure-ftpd/Pkgfile @@ -7,7 +7,7 @@ name=pure-ftpd version=1.0.47 release=1 source=(http://download.pureftpd.org/$name/releases/$name-$version.tar.bz2 \ - pure-ftpd pure-ftpd.conf) + pure-ftpd.rc pure-ftpd.pam) build () { cd $name-$version @@ -16,15 +16,16 @@ build () { --with-certfile=/etc/ssl/certs/pure-ftpd.pem \ --with-everything \ --with-tls \ - --without-pam + --with-pam make make DESTDIR=$PKG install - install -d $PKG/{var/log,etc/{rc.d,ssl/certs}} - touch $PKG/var/log/pure-ftpd.log + install -d $PKG/etc/ssl/certs touch $PKG/etc/ssl/certs/pure-ftpd.pem chmod 0600 $PKG/etc/ssl/certs/pure-ftpd.pem - install -m 755 $SRC/pure-ftpd $PKG/etc/rc.d - install -m 644 $SRC/pure-ftpd.conf $PKG/etc + install -D -m 755 $SRC/pure-ftpd.rc $PKG/etc/rc.d/pure-ftpd + install -D -m 644 $SRC/pure-ftpd.pam $PKG/etc/pam.d/pure-ftpd + install -m 644 pam/ftpusers $PKG/etc/ + install -m 644 pure-ftpd.conf $PKG/etc/ } diff --git a/pure-ftpd/pure-ftpd.conf b/pure-ftpd/pure-ftpd.conf deleted file mode 100644 index 3bcdc3b2a..000000000 --- a/pure-ftpd/pure-ftpd.conf +++ /dev/null @@ -1,12 +0,0 @@ -# -# /etc/pure-ftpd.conf -# - -daemonize yes -chrooteveryone yes -anonymousonly no -anonymouscantupload yes -altlog clf:/var/log/pure-ftpd.log -tls 1 - -# End of file diff --git a/pure-ftpd/pure-ftpd.pam b/pure-ftpd/pure-ftpd.pam new file mode 100644 index 000000000..8cb7a58c8 --- /dev/null +++ b/pure-ftpd/pure-ftpd.pam @@ -0,0 +1,14 @@ +# +# /etc/pam.d/pure-ftpd - pure-ftpd service module configuration +# + +auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed +auth required pam_shells.so +auth required pam_nologin.so + +account include common-account + +password include common-password + +session include common-session + diff --git a/pure-ftpd/pure-ftpd b/pure-ftpd/pure-ftpd.rc similarity index 100% rename from pure-ftpd/pure-ftpd rename to pure-ftpd/pure-ftpd.rc