From owner-svn-ports-all@freebsd.org Sun Nov 1 19:38:59 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A279F458186; Sun, 1 Nov 2020 19:38:59 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CPRDz3qntz4VlT; Sun, 1 Nov 2020 19:38:59 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6279A1D34F; Sun, 1 Nov 2020 19:38:59 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0A1JcxMT039059; Sun, 1 Nov 2020 19:38:59 GMT (envelope-from mandree@FreeBSD.org) Received: (from mandree@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0A1JcxdE039058; Sun, 1 Nov 2020 19:38:59 GMT (envelope-from mandree@FreeBSD.org) Message-Id: <202011011938.0A1JcxdE039058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mandree set sender to mandree@FreeBSD.org using -f From: Matthias Andree Date: Sun, 1 Nov 2020 19:38:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r553849 - in head/mail/fetchmail: . files X-SVN-Group: ports-head X-SVN-Commit-Author: mandree X-SVN-Commit-Paths: in head/mail/fetchmail: . files X-SVN-Commit-Revision: 553849 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2020 19:38:59 -0000 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 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: