aboutsummaryrefslogtreecommitdiffstats
path: root/main/doas/change-PATH.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/doas/change-PATH.patch')
-rw-r--r--main/doas/change-PATH.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/doas/change-PATH.patch b/main/doas/change-PATH.patch
new file mode 100644
index 00000000000..c0fb7a51ba3
--- /dev/null
+++ b/main/doas/change-PATH.patch
@@ -0,0 +1,19 @@
+From: Jakub Jirutka <jakub@jirutka.cz>
+Date: Tue, 28 Jun 2022 22:36:16 +0200
+Subject: [PATCH] Change default PATH to the Alpine's default
+
+Use the same PATH as in openssh, sudo and our /etc/profile.
+
+--- a/doas.c
++++ b/doas.c
+@@ -238,8 +238,8 @@
+ int
+ main(int argc, char **argv)
+ {
+- const char *safepath = "/bin:/sbin:/usr/bin:/usr/sbin:"
+- "/usr/local/bin:/usr/local/sbin";
++ const char *safepath = "/usr/local/sbin:/usr/local/bin:"
++ "/usr/sbin:/usr/bin:/sbin:/bin";
+ const char *confpath = NULL;
+ char *shargv[] = { NULL, NULL };
+ char *sh;