mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
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>
This commit is contained in:
parent
4e070924d2
commit
2dd855bc86
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=543980
@ -2,7 +2,7 @@
|
||||
|
||||
PORTNAME= acme.sh
|
||||
PORTVERSION= 2.8.6
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= security
|
||||
|
||||
MAINTAINER= dvl@FreeBSD.org
|
||||
|
19
security/acme.sh/files/patch-acme.sh
Normal file
19
security/acme.sh/files/patch-acme.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user