svn commit: r543980 - in head/security/acme.sh: . files

Dan Langille dvl at FreeBSD.org
Sun Aug 2 17:16:31 UTC 2020


Author: dvl
Date: Sun Aug  2 17:16:30 2020
New Revision: 543980
URL: https://svnweb.freebsd.org/changeset/ports/543980

Log:
  Enable acme.sh to recognize sane sudo commands besides /bin/su and /bin/bash
  
  PR:		248434
  Submitted by:	John W. O'Brien <john at saltant.com>

Added:
  head/security/acme.sh/files/patch-acme.sh   (contents, props changed)
Modified:
  head/security/acme.sh/Makefile

Modified: head/security/acme.sh/Makefile
==============================================================================
--- head/security/acme.sh/Makefile	Sun Aug  2 16:59:02 2020	(r543979)
+++ head/security/acme.sh/Makefile	Sun Aug  2 17:16:30 2020	(r543980)
@@ -2,7 +2,7 @@
 
 PORTNAME=	acme.sh
 PORTVERSION=	2.8.6
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 
 MAINTAINER=	dvl at FreeBSD.org

Added: head/security/acme.sh/files/patch-acme.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/acme.sh/files/patch-acme.sh	Sun Aug  2 17:16:30 2020	(r543980)
@@ -0,0 +1,19 @@
+Fix sudo issue
+https://github.com/acmesh-official/acme.sh/pull/2574
+
+--- acme.sh.orig	2020-08-02 05:02:04 UTC
++++ acme.sh
+@@ -6415,10 +6415,10 @@ _checkSudo() {
+       #it's root using sudo, no matter it's using sudo or not, just fine
+       return 0
+     fi
+-    if [ "$SUDO_COMMAND" = "/bin/su" ] || [ "$SUDO_COMMAND" = "/bin/bash" ]; then
++    if [ -n "$SUDO_COMMAND" ]; then
+       #it's a normal user doing "sudo su", or `sudo -i` or `sudo -s`
+-      #fine
+-      return 0
++      _endswith "$SUDO_COMMAND" /bin/su || grep "^$SUDO_COMMAND\$" /etc/shells >/dev/null 2>&1
++      return $?
+     fi
+     #otherwise
+     return 1


More information about the svn-ports-head mailing list