about summary refs log tree commit diff
path: root/pkgs/tools/security/doas
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2021-08-12 14:25:43 +0200
committerErik Arvstedt <erik.arvstedt@gmail.com>2021-08-12 14:40:22 +0200
commit781ab443c2170a80621920ea40bfc773553630fc (patch)
treee591a965b3ce87ac9d20e36b02d335e486a7ecd1 /pkgs/tools/security/doas
parent7d75a19c60e8e74b6b312f5bf64ea8cffe402cd0 (diff)
nixos/doas: fix recursive calls to doas
Previously, for processes launched by doas the unwrapped doas binary preceded the
setuid-wrapped doas binary in PATH.

This caused error `doas: not installed setuid` when running doas from
processes launched by doas.

doas seems to short-circuit the PATH lookup when called like
`doas -u myuser doas -u myuser ...` so the error doesn't appear in this case.
Diffstat (limited to 'pkgs/tools/security/doas')
-rw-r--r--pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch b/pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
index d1a1997ba1f6f..a22781269d8bf 100644
--- a/pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
+++ b/pkgs/tools/security/doas/0001-add-NixOS-specific-dirs-to-safe-PATH.patch
@@ -15,7 +15,7 @@ index e253905..2fdb20f 100644
  main(int argc, char **argv)
  {
  	const char *safepath = "/bin:/sbin:/usr/bin:/usr/sbin:"
-+	    "/run/current-system/sw/bin:/run/current-system/sw/sbin:/run/wrappers/bin:"
++	    "/run/wrappers/bin:/run/current-system/sw/bin:/run/current-system/sw/sbin:"
  	    "/usr/local/bin:/usr/local/sbin";
  	const char *confpath = NULL;
  	char *shargv[] = { NULL, NULL };