summaryrefslogtreecommitdiff
path: root/mail/fetchmail
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2020-11-01 19:38:58 +0000
committerMatthias Andree <mandree@FreeBSD.org>2020-11-01 19:38:58 +0000
commitb03fc003c744d1216b94e0aebc811c9940ffc0cb (patch)
treed9ecc4e09e8bfc584cdc8a744fa3efc11ef675af /mail/fetchmail
parent4ec963be467da751672652b8748a6e03697e6739 (diff)
downloadfreebsd-ports-b03fc003c744d1216b94e0aebc811c9940ffc0cb.zip
mail/fetchmail: Fix shell's 'Bad -c option' in rcscript.
Turns out that our fetchmail_dump_config() function needs to add one more level of quoting because it's being unquoted and word split twice, once by su's shell, and again by sh. While here, change sh to /bin/sh to make the intention clearer. Bump PORTREVISION to get the fix out onto the systems. PR: 250691 Reported by: Helmut Ritter <freebsd-ports@charlieroot.de> Approved by: chalpin@cs.wisc.edu MFH: 2020Q4 (blanket, one-line tested working fix, 4-eyes principle)
Diffstat (limited to 'mail/fetchmail')
-rw-r--r--mail/fetchmail/Makefile2
-rw-r--r--mail/fetchmail/files/fetchmail.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index 40c2e00ae532..43740f9b6a58 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -3,7 +3,7 @@
PORTNAME?= fetchmail
DISTVERSION= 6.4.12
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= mail
# The next line is inherited by the fetchmailconf slave port,
# do NOT replace fetchmail by ${PORTNAME}
diff --git a/mail/fetchmail/files/fetchmail.in b/mail/fetchmail/files/fetchmail.in
index c18ce122d982..0ddfa16727f3 100644
--- a/mail/fetchmail/files/fetchmail.in
+++ b/mail/fetchmail/files/fetchmail.in
@@ -116,7 +116,7 @@ fetchmail_awaken()
# query a value from the fetchmail config file, value specified in first argument
fetchmail_dump_config()
{
- su -m ${fetchmail_user} -c sh -c "fetchmail -f ${fetchmail_config} --configdump" | fgrep $1 | cut -d: -f2
+ su -m ${fetchmail_user} -c "/bin/sh -c 'fetchmail -f ${fetchmail_config} --configdump'" | fgrep $1 | cut -d: -f2
}
# arguments: