Files
macports-ports/sysutils/doas/files/vidoas-fix-path.diff
Nicholas HurleyandRenee Otten 2d11556daf doas: fix path in vidoas
By default (and securely), vidoas explicitly sets the PATH to only include
the bare minimum standard bin directories (under /, /usr, and /usr/local).
However, since macports installs in /opt/local, when vidoas gets to the stage
of validating the new configuration (using `doas -C`), it fails because doas
is not on the PATH. This adds a patch to update the PATH in vidoas so it can
succeed when installed via macports.
2026-05-24 22:13:20 -04:00

22 lines
471 B
Diff

--- vidoas.orig
+++ vidoas
@@ -15,17 +15,17 @@
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# Edit a temporary copy of the doas.conf file and check it for syntax
# errors before installing it as the actual doas.conf file.
set -eu
-PATH=/bin:/usr/bin:/usr/local/bin
+PATH=/bin:/usr/bin:/usr/local/bin:@PREFIX@/bin
export PATH
PROG="${0##*/}"
umask 022
DOAS_CONF=@DOAS_CONF@
doas_conf_mode="0600"