Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Nov 2020 19:38:59 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r553849 - in head/mail/fetchmail: . files
Message-ID:  <202011011938.0A1JcxdE039058@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Sun Nov  1 19:38:58 2020
New Revision: 553849
URL: https://svnweb.freebsd.org/changeset/ports/553849

Log:
  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)

Modified:
  head/mail/fetchmail/Makefile
  head/mail/fetchmail/files/fetchmail.in

Modified: head/mail/fetchmail/Makefile
==============================================================================
--- head/mail/fetchmail/Makefile	Sun Nov  1 19:30:02 2020	(r553848)
+++ head/mail/fetchmail/Makefile	Sun Nov  1 19:38:58 2020	(r553849)
@@ -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}

Modified: head/mail/fetchmail/files/fetchmail.in
==============================================================================
--- head/mail/fetchmail/files/fetchmail.in	Sun Nov  1 19:30:02 2020	(r553848)
+++ head/mail/fetchmail/files/fetchmail.in	Sun Nov  1 19:38:58 2020	(r553849)
@@ -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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011011938.0A1JcxdE039058>