Blame SOURCES/mailx-12.5-outof-Introduce-expandaddr-flag.patch

9770e7
From 9984ae5cb0ea0d61df1612b06952a61323c083d9 Mon Sep 17 00:00:00 2001
9770e7
From: Florian Weimer <fweimer@redhat.com>
9770e7
Date: Mon, 17 Nov 2014 11:13:38 +0100
9770e7
Subject: [PATCH 1/4] outof: Introduce expandaddr flag
9770e7
9770e7
Document that address expansion is disabled unless the expandaddr
9770e7
binary option is set.
9770e7
9770e7
This has been assigned CVE-2014-7844 for BSD mailx, but it is not
9770e7
a vulnerability in Heirloom mailx because this feature was documented.
9770e7
---
9770e7
 mailx.1 | 14 ++++++++++++++
9770e7
 names.c |  3 +++
9770e7
 2 files changed, 17 insertions(+)
9770e7
9770e7
diff --git a/mailx.1 b/mailx.1
9770e7
index 70a7859..22a171b 100644
9770e7
--- a/mailx.1
9770e7
+++ b/mailx.1
9770e7
@@ -656,6 +656,14 @@ but any reply returned to the machine
9770e7
 will have the system wide alias expanded
9770e7
 as all mail goes through sendmail.
9770e7
 .SS "Recipient address specifications"
9770e7
+If the
9770e7
+.I expandaddr
9770e7
+option is not set (the default), recipient addresses must be names of
9770e7
+local mailboxes or Internet mail addresses.
9770e7
+.PP
9770e7
+If the
9770e7
+.I expandaddr
9770e7
+option is set, the following rules apply:
9770e7
 When an address is used to name a recipient
9770e7
 (in any of To, Cc, or Bcc),
9770e7
 names of local mail folders
9770e7
@@ -2391,6 +2399,12 @@ and exits immediately.
9770e7
 If this option is set,
9770e7
 \fImailx\fR starts even with an empty mailbox.
9770e7
 .TP
9770e7
+.B expandaddr
9770e7
+Causes
9770e7
+.I mailx
9770e7
+to expand message recipient addresses, as explained in the section,
9770e7
+Recipient address specifications.
9770e7
+.TP
9770e7
 .B flipr
9770e7
 Exchanges the
9770e7
 .I Respond
9770e7
diff --git a/names.c b/names.c
9770e7
index 66e976b..c69560f 100644
9770e7
--- a/names.c
9770e7
+++ b/names.c
9770e7
@@ -268,6 +268,9 @@ outof(struct name *names, FILE *fo, struct header *hp)
9770e7
 	FILE *fout, *fin;
9770e7
 	int ispipe;
9770e7
 
9770e7
+	if (value("expandaddr") == NULL)
9770e7
+		return names;
9770e7
+
9770e7
 	top = names;
9770e7
 	np = names;
9770e7
 	time(&now;;
9770e7
-- 
9770e7
1.9.3
9770e7