From 52f3e97ee46c0cdd3511ddaa3882e764fe14c62f Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Sun, 22 Dec 2024 00:07:48 -0800 Subject: [PATCH] openbsd.fsck: unveil /nix/store too --- .../bsd/openbsd/pkgs/fsck/fsck-path.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch b/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch index a49ac7ceb04c..2eedb4fc6c04 100644 --- a/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch +++ b/pkgs/os-specific/bsd/openbsd/pkgs/fsck/fsck-path.patch @@ -1,8 +1,17 @@ diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c -index 19e730a484f..176d614d986 100644 +index 19e730a484f..cb548971abd 100644 --- a/sbin/fsck/fsck.c +++ b/sbin/fsck/fsck.c -@@ -308,18 +308,8 @@ checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, +@@ -115,6 +115,8 @@ main(int argc, char *argv[]) + err(1, "unveil %s", _PATH_FSTAB); + if (unveil("/sbin", "x") == -1) + err(1, "unveil /sbin"); ++ if (unveil("/nix/store", "rx") == -1) ++ err(1, "unveil /nix/store"); + if (pledge("stdio rpath wpath disklabel proc exec", NULL) == -1) + err(1, "pledge"); + +@@ -308,18 +310,8 @@ checkfs(const char *vfstype, const char *spec, const char *mntpt, void *auxarg, _exit(0); /* Go find an executable. */