[mailx] Exit with error code when TMPDIR is set to an invalid path while sending email

pschiffe pschiffe at fedoraproject.org
Mon Jul 22 14:16:36 UTC 2013


commit 89c021fe904ca4b6c2a8f7150a0015fc82695cb6
Author: Peter Schiffer <pschiffe at redhat.com>
Date:   Mon Jul 22 16:09:41 2013 +0200

    Exit with error code when TMPDIR is set to an invalid path while sending email

 mailx-12.5-collect.patch |   13 +++++++++++++
 mailx.spec               |    4 ++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/mailx-12.5-collect.patch b/mailx-12.5-collect.patch
new file mode 100644
index 0000000..b84d2e8
--- /dev/null
+++ b/mailx-12.5-collect.patch
@@ -0,0 +1,13 @@
+--- mailx-12.4.orig/collect.c	2012-09-12 16:07:53.653103796 -0400
++++ mailx-12.4/collect.c	2012-09-12 21:27:05.092259236 -0400
+@@ -905,7 +905,9 @@ err:
+ 	if (collf != NULL) {
+ 		Fclose(collf);
+ 		collf = NULL;
+-	}
++	} else {
++        exit(1);
++    }
+ out:
+ 	if (collf != NULL) {
+ 		if ((cp = value("MAILX_TAIL")) != NULL) {
diff --git a/mailx.spec b/mailx.spec
index 7fd9f3f..0f89191 100644
--- a/mailx.spec
+++ b/mailx.spec
@@ -19,6 +19,8 @@ Patch1: mailx-12.3-pager.patch
 Patch2: mailx-12.5-lzw.patch
 # resolves: #805410
 Patch3: mailx-12.5-fname-null.patch
+# resolves: #857120
+Patch4: mailx-12.5-collect.patch
 
 %if %{use_nss}
 BuildRequires: nss-devel, pkgconfig, krb5-devel
@@ -55,6 +57,7 @@ as well as "nail" (the initial name of this project).
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 sed -i 's,/etc/nail.rc,%{mailrc},g' mailx.1
 
 
@@ -133,6 +136,7 @@ popd
 * Mon Jul 22 2013 Peter Schiffer <pschiffe at redhat.com> - 12.5-9
 - related: #912785
   used -D_FILE_OFFSET_BITS=64 flag at the compile time
+- return error code when TMPDIR is set to an invalid path while sending email
 
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 12.5-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild


More information about the scm-commits mailing list