Skip to content

Commit

Permalink
add a workaround unveil(2) bug, which hide /usr/bin and /usr/sbin (du…
Browse files Browse the repository at this point in the history
…e to unveil() calls before)
  • Loading branch information
semarie committed Dec 7, 2021
1 parent 06d5044 commit 56db5ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sysclean.pl
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ sub init
unveil('/', 'r');
unveil('/usr/bin/locate', 'rx');
unveil('/usr/sbin/rcctl', 'rx');

# XXX workaround for unveil(2) bug
unveil('/usr/bin', 'r');
unveil('/usr/sbin', 'r');

pledge('rpath proc exec') || $self->err(1, "pledge");
$self->add_expected_base;
Expand Down

0 comments on commit 56db5ef

Please sign in to comment.