diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2013-03-01 23:08:42 +0000 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2013-03-01 23:08:42 +0000 |
commit | ef2284e468719b26acc01d8ab09a11bd5bf1d92d (patch) | |
tree | ddbf72231e8a77b73c427d36ae2427eddb3ba216 /mail-mta | |
parent | Version bump to 0.3.1 wrt bug 456724 (diff) | |
download | gentoo-2-ef2284e468719b26acc01d8ab09a11bd5bf1d92d.tar.gz gentoo-2-ef2284e468719b26acc01d8ab09a11bd5bf1d92d.tar.bz2 gentoo-2-ef2284e468719b26acc01d8ab09a11bd5bf1d92d.zip |
PAM support merged upstream.
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key A5DE03AE)
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/opensmtpd/ChangeLog | 6 | ||||
-rw-r--r-- | mail-mta/opensmtpd/files/pam.patch | 85 | ||||
-rw-r--r-- | mail-mta/opensmtpd/opensmtpd-9999.ebuild | 3 |
3 files changed, 6 insertions, 88 deletions
diff --git a/mail-mta/opensmtpd/ChangeLog b/mail-mta/opensmtpd/ChangeLog index a4c5f1d882fb..8d93ab86d8ab 100644 --- a/mail-mta/opensmtpd/ChangeLog +++ b/mail-mta/opensmtpd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for mail-mta/opensmtpd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/ChangeLog,v 1.3 2013/02/28 21:42:43 zx2c4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/ChangeLog,v 1.4 2013/03/01 23:08:42 zx2c4 Exp $ + + 01 Mar 2013; Jason A. Donenfeld <zx2c4@gentoo.org> -files/pam.patch, + opensmtpd-9999.ebuild: + PAM support merged upstream. 28 Feb 2013; Jason A. Donenfeld <zx2c4@gentoo.org> files/smtpd.initd, opensmtpd-9999.ebuild: diff --git a/mail-mta/opensmtpd/files/pam.patch b/mail-mta/opensmtpd/files/pam.patch deleted file mode 100644 index bb2a4e1d6f43..000000000000 --- a/mail-mta/opensmtpd/files/pam.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff -ru opensmtpd-5.2.xp1/smtpd/smtpd.c opensmtpd-5.2.xp1-pam/smtpd/smtpd.c ---- opensmtpd-5.2.xp1/smtpd/smtpd.c 2013-02-21 20:13:32.000000000 +0100 -+++ opensmtpd-5.2.xp1-pam/smtpd/smtpd.c 2013-02-28 06:02:51.034730193 +0100 -@@ -34,6 +34,15 @@ - #ifdef BSD_AUTH - #include <bsd_auth.h> - #endif -+ -+#ifdef USE_PAM -+#if defined(HAVE_SECURITY_PAM_APPL_H) -+#include <security/pam_appl.h> -+#elif defined (HAVE_PAM_PAM_APPL_H) -+#include <pam/pam_appl.h> -+#endif -+#endif -+ - #ifdef HAVE_CRYPT_H - #include <crypt.h> /* needed for crypt() */ - #endif -@@ -1639,6 +1648,53 @@ - } - #endif - -+#ifdef USE_PAM -+int -+pam_conv_password(int num_msg, const struct pam_message **msg, struct pam_response **respp, const char *password) -+{ -+ struct pam_response *response; -+ if (num_msg != 1) -+ return PAM_CONV_ERR; -+ response = malloc(sizeof(struct pam_response)); -+ if (!response) -+ return PAM_BUF_ERR; -+ memset(response, 0, sizeof(struct pam_response)); -+ response->resp = strdup(password); -+ if (!response->resp) -+ return PAM_BUF_ERR; -+ *respp = response; -+ return PAM_SUCCESS; -+} -+int -+parent_auth_pam(const char *username, const char *password) -+{ -+ int rc; -+ pam_handle_t *pamh = NULL; -+ struct pam_conv conv = { pam_conv_password, password }; -+ -+ if ((rc = pam_start("smtpd", username, &conv, &pamh)) != PAM_SUCCESS) -+ goto end; -+ if ((rc = pam_authenticate(pamh, 0)) != PAM_SUCCESS) -+ goto end; -+ if ((rc = pam_acct_mgmt(pamh, 0)) != PAM_SUCCESS) -+ goto end; -+end: -+ pam_end(pamh, rc); -+ -+ switch (rc) { -+ case PAM_SUCCESS: -+ return LKA_OK; -+ case PAM_SYSTEM_ERR: -+ case PAM_ABORT: -+ case PAM_AUTHINFO_UNAVAIL: -+ return LKA_TEMPFAIL; -+ default: -+ return LKA_PERMFAIL; -+ -+ } -+} -+#endif -+ - int - parent_auth_pwd(const char *username, const char *password) - { -@@ -1664,8 +1720,10 @@ - int - parent_auth_user(const char *username, const char *password) - { --#ifdef BSD_AUTH -+#if defined(BSD_AUTH) - return (parent_auth_bsd(username, password)); -+#elif defined(USE_PAM) -+ return (parent_auth_pam(username, password)); - #else - return (parent_auth_pwd(username, password)); - #endif diff --git a/mail-mta/opensmtpd/opensmtpd-9999.ebuild b/mail-mta/opensmtpd/opensmtpd-9999.ebuild index af164d9dbd3e..3837df6c5e12 100644 --- a/mail-mta/opensmtpd/opensmtpd-9999.ebuild +++ b/mail-mta/opensmtpd/opensmtpd-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/opensmtpd-9999.ebuild,v 1.2 2013/02/28 21:42:43 zx2c4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/opensmtpd-9999.ebuild,v 1.3 2013/03/01 23:08:42 zx2c4 Exp $ EAPI=5 @@ -40,7 +40,6 @@ RDEPEND="${DEPEND}" S=${WORKDIR}/${P}.xp1 src_prepare() { - epatch "${FILESDIR}"/pam.patch epatch "${FILESDIR}"/build-warnings.patch eautoreconf } |