[oe-commits] [meta-openembedded] 02/21: proftpd: fix system account login failure

git at git.openembedded.org git at git.openembedded.org
Wed Aug 17 13:56:29 UTC 2016


joe_macdonald pushed a commit to branch master
in repository meta-openembedded.

commit 1ea6e9a5d2d50ad3184326fb1631a8b9e3f1018c
Author: Mingli Yu <Mingli.Yu at windriver.com>
AuthorDate: Fri Aug 12 15:19:56 2016 +0800

    proftpd: fix system account login failure
    
    When pam is enabled,
      1, Customize the proftpd.conf to use pam to authenticate
      2, Add proftpd pam configuration file /etc/pam.d/proftpd
    
    Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
    Signed-off-by: Joe MacDonald <joe_macdonald at mentor.com>
---
 meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb
index b6fd4b2..2332ef8 100644
--- a/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb
+++ b/meta-networking/recipes-daemons/proftpd/proftpd_1.3.5a.bb
@@ -92,6 +92,15 @@ do_install () {
     # create the pub directory
     mkdir -p ${D}/home/${FTPUSER}/pub/
     chown -R ${FTPUSER}:${FTPGROUP} ${D}/home/${FTPUSER}/pub
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
+        # install proftpd pam configuration
+        install -d ${D}${sysconfdir}/pam.d
+        install -m 644 ${S}/contrib/dist/rpm/ftp.pamd ${D}${sysconfdir}/pam.d/proftpd
+        sed -i '/ftpusers/d' ${D}${sysconfdir}/pam.d/proftpd
+        # specify the user Authentication config
+        sed -i '/^MaxInstances/a\AuthPAM                         on\nAuthPAMConfig                   proftpd' \
+            ${D}${sysconfdir}/proftpd.conf
+    fi
 
     install -d ${D}/${systemd_unitdir}/system
     install -m 644 ${WORKDIR}/proftpd.service ${D}/${systemd_unitdir}/system

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list