summaryrefslogtreecommitdiffstats
path: root/testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch
diff options
context:
space:
mode:
authorIsaac Dunham <ibid.ag@gmail.com>2015-01-27 21:35:30 -0800
committerNatanael Copa <ncopa@alpinelinux.org>2015-01-30 10:14:12 +0000
commit61ff788630422f3a99da03034c34e0a5d0c24910 (patch)
treea3993005aa5d1f0b868a3c272e4cec3c3b38ea03 /testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch
parenta1bb1663fd7682effa65665509b72eb834eb3516 (diff)
downloadaports-61ff788630422f3a99da03034c34e0a5d0c24910.tar.bz2
aports-61ff788630422f3a99da03034c34e0a5d0c24910.tar.xz
testing/heirloom-mailx: new aport
heirloom-mailx is a clone of System V "mailx", based on Berkeley Mail 8.1. It has been enhanced to provide all the command line options required by POSIX, as well as several other features: * support for MIME, S/MIME, and attachments * support for SMTP(S), POP3(S), and IMAP(S) * support for maildir-format email archives ... and much more. This is updated from CVS to get current OpenSSL compat. NSS could be used instead of OpenSSL. Some security fixes from Florian Weimer are included - see http://seclists.org/oss-sec/2014/q4/1066 krb5 is used for IMAP authentication over GSS; our libgss doesn't work (and might not be OK to link with openssl?) and using libgssglue will probably require some patching of the makefile.
Diffstat (limited to 'testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch')
-rw-r--r--testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch109
1 files changed, 109 insertions, 0 deletions
diff --git a/testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch b/testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch
new file mode 100644
index 000000000..05fe00f2c
--- /dev/null
+++ b/testing/heirloom-mailx/0003-fio_c-Unconditionally-require-wordexp-support.patch
@@ -0,0 +1,109 @@
+>From 2bae8ecf04ec2ba6bb9f0af5b80485dd0edb427d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer () redhat com>
+Date: Mon, 17 Nov 2014 12:48:25 +0100
+Subject: [PATCH 3/4] fio.c: Unconditionally require wordexp support
+
+---
+ fio.c | 67 +++++--------------------------------------------------------------
+ 1 file changed, 5 insertions(+), 62 deletions(-)
+
+diff --git a/fio.c b/fio.c
+index 65e8f10..1529236 100644
+--- a/fio.c
++++ b/fio.c
+@@ -43,12 +43,15 @@ static char sccsid[] = "@(#)fio.c 2.76 (gritter) 9/16/09";
+ #endif /* not lint */
+
+ #include "rcv.h"
++
++#ifndef HAVE_WORDEXP
++#error wordexp support is required
++#endif
++
+ #include <sys/stat.h>
+ #include <sys/file.h>
+ #include <sys/wait.h>
+-#ifdef HAVE_WORDEXP
+ #include <wordexp.h>
+-#endif /* HAVE_WORDEXP */
+ #include <unistd.h>
+
+ #if defined (USE_NSS)
+@@ -481,7 +484,6 @@ next:
+ static char *
+ globname(char *name)
+ {
+-#ifdef HAVE_WORDEXP
+ wordexp_t we;
+ char *cp;
+ sigset_t nset;
+@@ -527,65 +529,6 @@ globname(char *name)
+ }
+ wordfree(&we);
+ return cp;
+-#else /* !HAVE_WORDEXP */
+- char xname[PATHSIZE];
+- char cmdbuf[PATHSIZE]; /* also used for file names */
+- int pid, l;
+- char *cp, *shell;
+- int pivec[2];
+- extern int wait_status;
+- struct stat sbuf;
+-
+- if (pipe(pivec) < 0) {
+- perror("pipe");
+- return name;
+- }
+- snprintf(cmdbuf, sizeof cmdbuf, "echo %s", name);
+- if ((shell = value("SHELL")) == NULL)
+- shell = SHELL;
+- pid = start_command(shell, 0, -1, pivec[1], "-c", cmdbuf, NULL);
+- if (pid < 0) {
+- close(pivec[0]);
+- close(pivec[1]);
+- return NULL;
+- }
+- close(pivec[1]);
+-again:
+- l = read(pivec[0], xname, sizeof xname);
+- if (l < 0) {
+- if (errno == EINTR)
+- goto again;
+- perror("read");
+- close(pivec[0]);
+- return NULL;
+- }
+- close(pivec[0]);
+- if (wait_child(pid) < 0 && WTERMSIG(wait_status) != SIGPIPE) {
+- fprintf(stderr, catgets(catd, CATSET, 81,
+- "\"%s\": Expansion failed.\n"), name);
+- return NULL;
+- }
+- if (l == 0) {
+- fprintf(stderr, catgets(catd, CATSET, 82,
+- "\"%s\": No match.\n"), name);
+- return NULL;
+- }
+- if (l == sizeof xname) {
+- fprintf(stderr, catgets(catd, CATSET, 83,
+- "\"%s\": Expansion buffer overflow.\n"), name);
+- return NULL;
+- }
+- xname[l] = 0;
+- for (cp = &xname[l-1]; *cp == '\n' && cp > xname; cp--)
+- ;
+- cp[1] = '\0';
+- if (strchr(xname, ' ') && stat(xname, &sbuf) < 0) {
+- fprintf(stderr, catgets(catd, CATSET, 84,
+- "\"%s\": Ambiguous.\n"), name);
+- return NULL;
+- }
+- return savestr(xname);
+-#endif /* !HAVE_WORDEXP */
+ }
+
+ /*
+--
+1.9.3
+
+