mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-05 14:59:55 +00:00
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@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user