fix unveil to work with the wal/shm stuff

This commit is contained in:
Aaron Bieber 2022-09-29 07:27:43 -06:00
parent 3d61714a0a
commit 33063f893f
No known key found for this signature in database

View File

@ -6,6 +6,7 @@
use warnings;
use strict;
use Time::HiRes qw( time );
use File::Basename;
use feature 'switch';
@ -20,9 +21,8 @@ if ( $^O eq "openbsd" ) {
require OpenBSD::Unveil;
OpenBSD::Unveil::unveil( "/", "" ) or die;
OpenBSD::Unveil::unveil( "./$dbFile", "r" ) or die;
OpenBSD::Unveil::unveil( "./$(dbFile}-shm", "rwc" ) or die;
OpenBSD::Unveil::unveil( "./$(dbFile}-wal", "rwc" ) or die;
OpenBSD::Unveil::unveil( $0, "r" ) or die;
OpenBSD::Unveil::unveil( dirname($0), "rwc" ) or die;
OpenBSD::Unveil::unveil( "/usr/local", "r" ) or die;
OpenBSD::Pledge::pledge(qw( stdio dns inet rpath proc flock wpath cpath ))