commit: c41228519a3902dd0453d3c80af0d172c86267b1 Author: Vieri <rentorbuy <AT> yahoo <DOT> com> AuthorDate: Wed Jan 23 12:30:18 2019 +0000 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> CommitDate: Wed Jan 23 13:11:02 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4122851
net-fs/samba: pam+winbind authentication PAM winbind authentication configuration. Closes: https://bugs.gentoo.org/590374 Tested-by: Vieri <rentorbuy <AT> yahoo.com> Signed-off-by: Vieri <rentorbuy <AT> yahoo.com> Fixes: 0eef165 (net-fs/samba: pam+winbind authentication) Package-Manager: Portage-2.3.51, Repoman-2.3.11 Closes: https://github.com/gentoo/gentoo/pull/10578 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> net-fs/samba/files/4.4/system-auth-winbind.pam | 18 ++++++++++++++++++ ...-4.10.0_rc1.ebuild => samba-4.10.0_rc1-r1.ebuild} | 16 +++++++++++++++- .../{samba-4.7.12.ebuild => samba-4.7.12-r1.ebuild} | 18 ++++++++++++++++-- .../{samba-4.8.8.ebuild => samba-4.8.6-r3.ebuild} | 20 +++++++++++++++++--- .../{samba-4.8.8.ebuild => samba-4.8.8-r1.ebuild} | 18 ++++++++++++++++-- .../{samba-4.9.4.ebuild => samba-4.9.4-r1.ebuild} | 18 ++++++++++++++++-- 6 files changed, 98 insertions(+), 10 deletions(-) diff --git a/net-fs/samba/files/4.4/system-auth-winbind.pam b/net-fs/samba/files/4.4/system-auth-winbind.pam new file mode 100644 index 00000000000..8d6746b7aeb --- /dev/null +++ b/net-fs/samba/files/4.4/system-auth-winbind.pam @@ -0,0 +1,18 @@ +#%PAM-1.0 +# $Id$ + +auth required pam_env.so +auth sufficient pam_winbind.so +auth sufficient pam_unix.so likeauth nullok use_first_pass +auth required pam_deny.so + +account sufficient pam_winbind.so +account required pam_unix.so + +password required pam_cracklib.so retry=3 +password sufficient pam_unix.so nullok use_authtok md5 shadow +password required pam_deny.so + +session required pam_mkhomedir.so skel=/etc/skel/ umask=0022 +session required pam_limits.so +session required pam_unix.so diff --git a/net-fs/samba/samba-4.10.0_rc1.ebuild b/net-fs/samba/samba-4.10.0_rc1-r1.ebuild similarity index 95% rename from net-fs/samba/samba-4.10.0_rc1.ebuild rename to net-fs/samba/samba-4.10.0_rc1-r1.ebuild index 65badeb0782..58029da8000 100644 --- a/net-fs/samba/samba-4.10.0_rc1.ebuild +++ b/net-fs/samba/samba-4.10.0_rc1-r1.ebuild @@ -5,7 +5,7 @@ EAPI=6 PYTHON_COMPAT=( python3_{4,5,6,7} ) PYTHON_REQ_USE='threads(+),xml(+)' -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam MY_PV="${PV/_rc/rc}" MY_P="${PN}-${MY_PV}" @@ -272,6 +272,20 @@ multilib_src_install() { systemd_dounit "${FILESDIR}"/winbindd.service systemd_dounit "${FILESDIR}"/samba.service fi + + if use pam and use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf || die + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba + keepdir /var/run/{ctdb,samba} } multilib_src_test() { diff --git a/net-fs/samba/samba-4.7.12.ebuild b/net-fs/samba/samba-4.7.12-r1.ebuild similarity index 95% rename from net-fs/samba/samba-4.7.12.ebuild rename to net-fs/samba/samba-4.7.12-r1.ebuild index 25a31e5776a..ce0c7421f11 100644 --- a/net-fs/samba/samba-4.7.12.ebuild +++ b/net-fs/samba/samba-4.7.12-r1.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='threads(+),xml(+)' -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils pam MY_PV="${PV/_rc/rc}" MY_P="${PN}-${MY_PV}" @@ -298,6 +298,20 @@ multilib_src_install() { systemd_dounit "${FILESDIR}"/winbindd.service systemd_dounit "${FILESDIR}"/samba.service fi + + if use pam and use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf || die + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba + keepdir /var/run/{ctdb,samba} } multilib_src_test() { diff --git a/net-fs/samba/samba-4.8.8.ebuild b/net-fs/samba/samba-4.8.6-r3.ebuild similarity index 94% copy from net-fs/samba/samba-4.8.8.ebuild copy to net-fs/samba/samba-4.8.6-r3.ebuild index 1d5b5c8adae..66090c5d807 100644 --- a/net-fs/samba/samba-4.8.8.ebuild +++ b/net-fs/samba/samba-4.8.6-r3.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='threads(+),xml(+)' -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam MY_PV="${PV/_rc/rc}" MY_P="${PN}-${MY_PV}" @@ -15,7 +15,7 @@ SRC_PATH="stable" SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" [[ ${PV} = *_rc* ]] || \ -KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86" DESCRIPTION="Samba Suite Version 4" HOMEPAGE="https://www.samba.org/" @@ -267,6 +267,20 @@ multilib_src_install() { systemd_dounit "${FILESDIR}"/winbindd.service systemd_dounit "${FILESDIR}"/samba.service fi + + if use pam and use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf || die + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba + keepdir /var/run/{ctdb,samba} } multilib_src_test() { diff --git a/net-fs/samba/samba-4.8.8.ebuild b/net-fs/samba/samba-4.8.8-r1.ebuild similarity index 95% rename from net-fs/samba/samba-4.8.8.ebuild rename to net-fs/samba/samba-4.8.8-r1.ebuild index 1d5b5c8adae..6376062b6f9 100644 --- a/net-fs/samba/samba-4.8.8.ebuild +++ b/net-fs/samba/samba-4.8.8-r1.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='threads(+),xml(+)' -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam MY_PV="${PV/_rc/rc}" MY_P="${PN}-${MY_PV}" @@ -267,6 +267,20 @@ multilib_src_install() { systemd_dounit "${FILESDIR}"/winbindd.service systemd_dounit "${FILESDIR}"/samba.service fi + + if use pam and use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf || die + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba + keepdir /var/run/{ctdb,samba} } multilib_src_test() { diff --git a/net-fs/samba/samba-4.9.4.ebuild b/net-fs/samba/samba-4.9.4-r1.ebuild similarity index 95% rename from net-fs/samba/samba-4.9.4.ebuild rename to net-fs/samba/samba-4.9.4-r1.ebuild index 4a1864afed9..663fc4ceffc 100644 --- a/net-fs/samba/samba-4.9.4.ebuild +++ b/net-fs/samba/samba-4.9.4-r1.ebuild @@ -1,11 +1,11 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE='threads(+),xml(+)' -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam MY_PV="${PV/_rc/rc}" MY_P="${PN}-${MY_PV}" @@ -271,6 +271,20 @@ multilib_src_install() { systemd_dounit "${FILESDIR}"/winbindd.service systemd_dounit "${FILESDIR}"/samba.service fi + + if use pam and use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf || die + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba + keepdir /var/run/{ctdb,samba} } multilib_src_test() {