diff options
author | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-09-05 20:29:40 +0000 |
---|---|---|
committer | Tobias Scherbaum <dertobi123@gentoo.org> | 2008-09-05 20:29:40 +0000 |
commit | ef4a57231602d000ce2ff3c68d7cc8a5be6fb7f7 (patch) | |
tree | 9fca36890d824c5289f3d610ae40d68b7e571632 /mail-mta/ssmtp | |
parent | Drop app-admin/eselect-compiler dependency to make Mr_Bones_ happy. (diff) | |
download | historical-ef4a57231602d000ce2ff3c68d7cc8a5be6fb7f7.tar.gz historical-ef4a57231602d000ce2ff3c68d7cc8a5be6fb7f7.tar.bz2 historical-ef4a57231602d000ce2ff3c68d7cc8a5be6fb7f7.zip |
Allow to specify the last used system user id via +maxsysuid, #231866, patch by Trevor Bowen
Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.25-gentoo-r7 x86_64
Diffstat (limited to 'mail-mta/ssmtp')
-rw-r--r-- | mail-mta/ssmtp/ChangeLog | 10 | ||||
-rw-r--r-- | mail-mta/ssmtp/Manifest | 17 | ||||
-rw-r--r-- | mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid-conf.patch | 17 | ||||
-rw-r--r-- | mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid.patch | 37 | ||||
-rw-r--r-- | mail-mta/ssmtp/metadata.xml | 1 | ||||
-rw-r--r-- | mail-mta/ssmtp/ssmtp-2.62-r2.ebuild | 100 |
6 files changed, 169 insertions, 13 deletions
diff --git a/mail-mta/ssmtp/ChangeLog b/mail-mta/ssmtp/ChangeLog index 63b97a3ed46f..4bbbba8e7293 100644 --- a/mail-mta/ssmtp/ChangeLog +++ b/mail-mta/ssmtp/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for mail-mta/ssmtp # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ChangeLog,v 1.55 2008/08/23 02:02:28 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ChangeLog,v 1.56 2008/09/05 20:29:40 dertobi123 Exp $ + +*ssmtp-2.62-r2 (05 Sep 2008) + + 05 Sep 2008; Tobias Scherbaum <dertobi123@gentoo.org> + +files/ssmtp-2.62-maxsysuid.patch, +files/ssmtp-2.62-maxsysuid-conf.patch, + metadata.xml, +ssmtp-2.62-r2.ebuild: + Allow to specify the last used system user id via +maxsysuid, #231866, patch + by Trevor Bowen 23 Aug 2008; Doug Goldstein <cardoe@gentoo.org> metadata.xml: add GLEP 56 USE flag desc from use.local.desc diff --git a/mail-mta/ssmtp/Manifest b/mail-mta/ssmtp/Manifest index d1bba7633c4c..6fa013d1d2f6 100644 --- a/mail-mta/ssmtp/Manifest +++ b/mail-mta/ssmtp/Manifest @@ -1,19 +1,12 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX mailer.conf 349 RMD160 1cad356faa6ee30e7bed9d70754487cac8f088e5 SHA1 4ab7aeef9fcaa021cff2845ffdac1ccb65dddfa4 SHA256 7b04fc27f8ca41b586ae68cbeffb509c2408afcc592462b617fba78b5d7aa88a AUX ssmtp-2.61-bug127592.patch 385 RMD160 61f877e742bbf23e13056884bccae5a22a17fe75 SHA1 27a4aafc3cbffd11c6427e5ac02c3484396091ef SHA256 256a783b5e73b9914cb49854b367ce9f5781d8664cd640e6b0b9d0b5f6948edc +AUX ssmtp-2.62-maxsysuid-conf.patch 667 RMD160 9a515e40aedc8eb8784cc7bb9b75b55536877f42 SHA1 af175c8fd039fcd7a125b2c3f3eba80bd69006dd SHA256 634d8e1e66d9a1c13aa4b75de37194899d12ed069b7cd651c3f49e361745b99e +AUX ssmtp-2.62-maxsysuid.patch 1185 RMD160 a6a4a1dc23a74170b52e84a1e34149258e08b7b6 SHA1 9da033da95e9ac04046969d60914cd64f1405e47 SHA256 49201b47eb88e860d0a07777aa895127c2415bc170faacdefc376c221a595961 AUX ssmtp-2.62-strndup.patch 682 RMD160 d56434a83ec6bb49cafb67846e0082551d1a3be3 SHA1 9b8328c8ea1410683dd13cc770582658e33d716e SHA256 2ce7b4526db527656bfb9cde41f940e5da23b9fb2089a6b5b9bd4bae6dfa07ab DIST ssmtp_2.61.orig.tar.gz 53341 RMD160 da76ee6dd86fc663e6fd69fcb2fb5f550f716de7 SHA1 bc4b6c20bf8c2c9e66b359e3c24545a2615a1988 SHA256 2151ad18cb73f9a254f796dde2b48be7318b45410b59fedbb258db5a41044fb5 DIST ssmtp_2.62.orig.tar.gz 57127 RMD160 1c16b2d50224f4d29813a34f87a3480e66892b36 SHA1 5c15aafb252f6cb11e4b93140a1457b6cb0d0fb8 SHA256 e2a0a5379cd0bbb0b4b0304abeba7a8f60aa85275982c5d7930c319e7f284ed1 EBUILD ssmtp-2.61-r2.ebuild 3427 RMD160 a675e5b8374d158cea313535386fb4d4e82169b6 SHA1 d833114b89c59bd48c44bef8e192f1f6b2759519 SHA256 1e00a67f270d423f140dac1a49c6e02af4acce82130825f854c6632bbec2348b EBUILD ssmtp-2.62-r1.ebuild 2545 RMD160 61bc51358190a50b83432bcbd4a58b5f7c97dba7 SHA1 ab49992c51bd87e9ddb437e7b62384ff9a9f0235 SHA256 46b8dd178cdc45f7c9d616f22ca1f388879ac9085609908795687045494f6088 -MISC ChangeLog 12300 RMD160 1c941c269c8c69e88d2551a4c5f6348bd6008f26 SHA1 a87f50a6dfe25e036881e494738484829465bf20 SHA256 92dd3ac2d2337bfe18330354be9d623cce665df97508d0e0186291775af9faf6 -MISC metadata.xml 232 RMD160 f879ef35f30d416dfccf68851199fbdea8ea9814 SHA1 a4e8a8c8e0489abd9260a23e70b1a43ca43d5fd2 SHA256 865bddc7c14c8fa2b48a80031d9164f588fca08941480be3aa1a83f29c56fdb5 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) - -iEYEARECAAYFAkivb7kACgkQoeSe8B0zEfyDuACfTHeQd8utfR/tH1BYpCyDvRdN -SvEAnj1GECqZWmmsmOsbpize+M+lZVO6 -=aEbb ------END PGP SIGNATURE----- +EBUILD ssmtp-2.62-r2.ebuild 2729 RMD160 86a98d9ac43f82211714a08a742dbf27b19dbbce SHA1 dc991b073343392410d93c38d98e0d3043f58b13 SHA256 14fabb84c6070fc8b37c0e8d80f23f3b0790a2a65c316c59a359ebef5916f112 +MISC ChangeLog 12604 RMD160 98b03347f35877897ad5fc9c3525c13d7c7ddb77 SHA1 bc111a1ab475606cb2a2c4724d2cf33bc8cf19b5 SHA256 090b55cf3f2a93e92e6b916fc529256951fbe1d79a498e44c3eec66a58e8018b +MISC metadata.xml 291 RMD160 2e697d312e59fe9a8a198f5d79f0b20c29abb633 SHA1 b6498cb6d5b33475440898598dfc05f3a7c554a7 SHA256 547e579723c831c40d6184225f181e11e949cf8310a3433d6ece7ee61fc23887 diff --git a/mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid-conf.patch b/mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid-conf.patch new file mode 100644 index 000000000000..8e51c5e3c3e4 --- /dev/null +++ b/mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid-conf.patch @@ -0,0 +1,17 @@ +--- ssmtp.orig.conf 2004-07-23 00:58:48.000000000 -0500 ++++ ssmtp.conf 2008-07-14 14:11:34.000000000 -0500 +@@ -2,10 +2,13 @@ + # /etc/ssmtp.conf -- a config file for sSMTP sendmail. + # + +-# The person who gets all mail for userids < 1000 ++# The person who gets all mail for userids < MinUserId + # Make this empty to disable rewriting. + root=postmaster + ++# All mail delivered to userid >= MinUserId goes to user, not root. ++#MinUserId=1000 ++ + # The place where the mail goes. The actual machine name is required + # no MX records are consulted. Commonly mailhosts are named mail.domain.com + # The example will fit if you are in domain.com and your mailhub is so named. diff --git a/mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid.patch b/mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid.patch new file mode 100644 index 000000000000..fef53c4116b5 --- /dev/null +++ b/mail-mta/ssmtp/files/ssmtp-2.62-maxsysuid.patch @@ -0,0 +1,37 @@ +--- ssmtp.orig.c 2004-07-23 00:58:48.000000000 -0500 ++++ ssmtp.c 2008-07-14 16:03:08.000000000 -0500 +@@ -76,6 +76,7 @@ int log_level = 1; + #else + int log_level = 0; + #endif ++int minuserid = MAXSYSUID+1; + int port = 25; + #ifdef INET6 + int p_family = PF_UNSPEC; /* Protocol family used in SMTP connection */ +@@ -641,7 +642,7 @@ char *rcpt_remap(char *str) + { + struct passwd *pw; + if((root==NULL) || strlen(root)==0 || strchr(str, '@') || +- ((pw = getpwnam(str)) == NULL) || (pw->pw_uid > MAXSYSUID)) { ++ ((pw = getpwnam(str)) == NULL) || (pw->pw_uid >= minuserid)) { + return(append_domain(str)); /* It's not a local systems-level user */ + } + else { +@@ -814,6 +815,17 @@ bool_t read_config() + log_event(LOG_INFO, "Set Root=\"%s\"\n", root); + } + } ++ else if(strcasecmp(p, "MinUserId") == 0) { ++ if((r = strdup(q)) == (char *)NULL) { ++ die("parse_config() -- strdup() failed"); ++ } ++ ++ minuserid = atoi(r); ++ ++ if(log_level > 0) { ++ log_event(LOG_INFO, "Set MinUserId=\"%d\"\n", minuserid); ++ } ++ } + else if(strcasecmp(p, "MailHub") == 0) { + if((mailhost = strdup(q)) == (char *)NULL) { + die("parse_config() -- strdup() failed"); diff --git a/mail-mta/ssmtp/metadata.xml b/mail-mta/ssmtp/metadata.xml index 5b418a381d1e..1cd964960caa 100644 --- a/mail-mta/ssmtp/metadata.xml +++ b/mail-mta/ssmtp/metadata.xml @@ -4,5 +4,6 @@ <herd>net-mail</herd> <use> <flag name='md5sum'>Enables MD5 summing for ssmtp</flag> + <flag name='maxsysuid'>Allow to define a MinUserId</flag> </use> </pkgmetadata> diff --git a/mail-mta/ssmtp/ssmtp-2.62-r2.ebuild b/mail-mta/ssmtp/ssmtp-2.62-r2.ebuild new file mode 100644 index 000000000000..2a6edbc2c17c --- /dev/null +++ b/mail-mta/ssmtp/ssmtp-2.62-r2.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/ssmtp/ssmtp-2.62-r2.ebuild,v 1.1 2008/09/05 20:29:40 dertobi123 Exp $ + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="Extremely simple MTA to get mail off the system to a Mailhub" +HOMEPAGE="ftp://ftp.debian.org/debian/pool/main/s/ssmtp/" +SRC_URI="mirror://debian/pool/main/s/ssmtp/${P/-/_}.orig.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="ssl ipv6 md5sum" + +DEPEND="ssl? ( dev-libs/openssl )" +RDEPEND="${DEPEND} + !net-mail/mailwrapper + !virtual/mta" +PROVIDE="virtual/mta" + +S="${WORKDIR}/${PN}" + +pkg_setup() { + enewgroup ssmtp +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Allow to specify the last used system user id, bug #231866 + if use maxsysuid; then + epatch "${FILESDIR}"/${P}-maxsysuid.patch + epatch "${FILESDIR}"/${P}-maxsysuid-conf.patch + fi + + epatch "${FILESDIR}/${P}-strndup.patch" + eautoreconf + + # Respect LDFLAGS (bug #152197) + sed -i -e 's:$(CC) -o:$(CC) @LDFLAGS@ -o:' Makefile.in +} + +src_compile() { + tc-export CC LD + + econf \ + --sysconfdir=/etc/ssmtp \ + $(use_enable ssl) \ + $(use_enable ipv6 inet6) \ + $(use_enable md5sum md5auth) \ + || die + make clean || die + make etcdir=/etc || die +} + +src_install() { + dodir /usr/bin /usr/sbin /usr/lib + dosbin ssmtp || die + fperms 755 /usr/sbin/ssmtp + + doman ssmtp.8 + dodoc INSTALL README TLS CHANGELOG_OLD + newdoc ssmtp.lsm DESC + + insinto /etc/ssmtp + doins ssmtp.conf revaliases + + local conffile="${D}etc/ssmtp/ssmtp.conf" + + mv "${conffile}" "${conffile}.orig" + + # Sorry about the weird indentation, I couldn't figure out a cleverer way + # to do this without having horribly >80 char lines. + sed -e "s:^hostname=:\n# Gentoo bug #47562\\ +# Commenting the following line will force ssmtp to figure\\ +# out the hostname itself.\n\\ +# hostname=:" \ + "${conffile}.orig" > "${conffile}" \ + || die "sed failed" + + rm "${conffile}.orig" || die "Failed to remove temporary created copy of ssmtp.conf" + + # Set restrictive perms on ssmtp.conf as per #187841 + # Protect the ssmtp configfile from being readable by regular users as it + # may contain login/password data to auth against a the mailhub used, add + # users to the ssmtp group to enable them to use ssmtp. + fowners root:ssmtp /etc/ssmtp/ssmtp.conf + fperms 640 /etc/ssmtp/ssmtp.conf + + fowners root:ssmtp /usr/sbin/ssmtp + fperms 750 /usr/sbin/ssmtp + + dosym /usr/sbin/ssmtp /usr/lib/sendmail + dosym /usr/sbin/ssmtp /usr/bin/sendmail + dosym /usr/sbin/ssmtp /usr/sbin/sendmail + dosym /usr/sbin/ssmtp /usr/bin/mailq + dosym /usr/sbin/ssmtp /usr/bin/newaliases +} |