Hi misc@, I've put together a simple CPAN module that allows you to use pledge(2) in your Perl programs. Of course it will only work on -current.
Simple example:
$> perl -MUnix::Pledg|e -e '||pledge(||"stdio rpath"||,
[||"/home/$ENV{USER}/.profile"||]);||open||(||my $fd||, ||">"||,
||"/home/$ENV{USER}/.profile"||);'|
$>|Abort trap (core dumped)|
The github repo is available at:
https://github.com/rfarr/Unix-Pledge
Cheers,
Richard

