aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-01-22 18:49:42 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-01-22 18:49:42 +0200
commit538751381d5996fb134570f4967a283b94dbddcb (patch)
tree24f5d6563db6dd1ca417d2fdfe7b7a06addbc640
parentc428d4bcc1040a59a089436197ec57e9f0ea2ae7 (diff)
downloadaports-538751381d5996fb134570f4967a283b94dbddcb.tar.bz2
aports-538751381d5996fb134570f4967a283b94dbddcb.tar.xz
main/busybox: sendmail: do not require use of -f
-rw-r--r--main/busybox/0001-sendmail-automatically-determine-sender-if-not-speci.patch57
-rw-r--r--main/busybox/APKBUILD6
2 files changed, 62 insertions, 1 deletions
diff --git a/main/busybox/0001-sendmail-automatically-determine-sender-if-not-speci.patch b/main/busybox/0001-sendmail-automatically-determine-sender-if-not-speci.patch
new file mode 100644
index 0000000000..8b6df8ad96
--- /dev/null
+++ b/main/busybox/0001-sendmail-automatically-determine-sender-if-not-speci.patch
@@ -0,0 +1,57 @@
+From a2a978538c82999dc7d4018827e0f96188a135de Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Wed, 22 Jan 2014 00:41:49 +0200
+Subject: [PATCH] sendmail: automatically determine sender if not specified
+
+Make the -f option optional. If not given, construct the sender
+address from the username and fully qualified hostname.
+
+This is required to interoperate with the cron applet.
+---
+ mailutils/sendmail.c | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
+index b5aa1d1..b99c42f 100644
+--- a/mailutils/sendmail.c
++++ b/mailutils/sendmail.c
+@@ -199,8 +199,8 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
+ G.fp0 = xfdopen_for_read(3);
+
+ // parse options
+- // -v is a counter, -f is required. -H and -S are mutually exclusive, -a is a list
+- opt_complementary = "vv:f:w+:H--S:S--H:a::";
++ // -v is a counter, -H and -S are mutually exclusive, -a is a list
++ opt_complementary = "vv:w+:H--S:S--H:a::";
+ // N.B. since -H and -S are mutually exclusive they do not interfere in opt_connect
+ // -a is for ssmtp (http://downloads.openwrt.org/people/nico/man/man8/ssmtp.8.html) compatibility,
+ // it is still under development.
+@@ -279,7 +279,6 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
+ // we should start with modern EHLO
+ if (250 != smtp_checkp("EHLO %s", host, -1))
+ smtp_checkp("HELO %s", host, 250);
+- free(host);
+
+ // perform authentication
+ if (opts & OPT_a) {
+@@ -305,12 +304,11 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
+ // file descriptor (e.g. 4), or again from a secured file.
+
+ // got no sender address? -> use system username as a resort
+- // N.B. we marked -f as required option!
+- //if (!G.user) {
+- // // N.B. IMHO getenv("USER") can be way easily spoofed!
+- // G.user = xuid2uname(getuid());
+- // opt_from = xasprintf("%s@%s", G.user, domain);
+- //}
++ if (!G.user) G.user = xuid2uname(getuid());
++ if (!opt_from)
++ opt_from = xasprintf("%s@%s", G.user, xgethostbyname(host)->h_name);
++ free(host);
++
+ smtp_checkp("MAIL FROM:<%s>", opt_from, 250);
+
+ // process message
+--
+1.8.3.1
+
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index 7087e8b789..cf5562b841 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.22.1
-pkgrel=1
+pkgrel=2
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -25,6 +25,7 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
0001-ifupdown-support-link-address-family.patch
+ 0001-sendmail-automatically-determine-sender-if-not-speci.patch
busyboxconfig
glibc.patch"
@@ -115,6 +116,7 @@ bc381f9ceb3824141c968f5bc4353943 busybox-1.22.1-date.patch
04eeda8c49d4688e6dec02451f8b6aae 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
e1c183cbe1ca18a0fa0d9597314076c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
b15c67be5ccb3e523f540d8e218d5c85 0001-ifupdown-support-link-address-family.patch
+75662f95668ecb349760d88ac547d1e2 0001-sendmail-automatically-determine-sender-if-not-speci.patch
59ead78a0bb2f01afff4147a37c8bd3b busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
sha256sums="ae0b029d0a9e4dd71a077a790840e496dd838998e4571b87b60fed7462b6678b busybox-1.22.1.tar.bz2
@@ -129,6 +131,7 @@ a31ce8bcb8b81b20e80ffa407600a530d085806c6471f4e4249fcb3a491b79ef busybox-uname-
2e9d56335ca39e944b9abd9ecc91d0e47a3fe3434f8b7ec3f526bc8fa0895ada 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
53563c6dc4db13004d0b37f7bf1748e861b5a5c4244c1d34f102c23b689420c5 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
9a41b920dd7ee4746866f9dd4ae42899198cd9b10bfa433f2f5ead8083957da2 0001-ifupdown-support-link-address-family.patch
+801c463ec51b60106a6879c913e198db31a4c3d587409c0072e3d105949ab0fc 0001-sendmail-automatically-determine-sender-if-not-speci.patch
8f7cd9baf35ed96ab8d2a7528c6e56dc88407c21676f8d50ec3946390fd53aee busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
sha512sums="3e99fe373d638f714c3a61e1b02493d85ca532f472df038f7557db518ded38347072882ed568852941be7aac46fc34007257b4287375335ff5a09b60b295ce80 busybox-1.22.1.tar.bz2
@@ -143,5 +146,6 @@ eb7cce973bfd53ce3350713437b9e2751becfb8dfb10b14f27c4f812297c403b90f80dc2906179d4
f2ed7bf994766a20ceecb28bea8c66307b6b66cdd7099408b1f29a529786ce07e55824b21256321708663e00d6fe9428480b0d3e121b67d6ebd8a8a87b1486d1 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
b1a1cc2ada657a3d3364c8c96853575d73784e769cd8768c170c27a3e59abd2beace75dff6d5047c4391725e961d93149f9c3f45ed75fb1c582bf18b818282c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
2dcda497ba3b7c0a7dc9d85e08efa71e51c57e84967fa1a5f06d48f29c9ee9f14a1931c1c2854e9632a5db785c8e72df10bdfb0735a9ecad7a8d390fff74abd1 0001-ifupdown-support-link-address-family.patch
+a41a73f3d8996097cb6ba726bd7b7b4a5fe1dc7c6810269b3e523442383c3432bf7b7d5581d7fd629f1f3cd3c72528c726dffc23b47e1c21dd8d61dec381690c 0001-sendmail-automatically-determine-sender-if-not-speci.patch
a7f7d6c5ee710a71313d79490707e1337c7c97c1fbf8a3c5cfa6fd82950ebb0376bfcfd444b65faa32d837e2bac00c67b101555b582a18fabb5ce7f7be7729e7 busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"