Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Aug 2020 17:16:31 +0000 (UTC)
From:      Dan Langille <dvl@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r543980 - in head/security/acme.sh: . files
Message-ID:  <202008021716.072HGVbU028102@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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@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



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