Re: Unix::Pledge perl module
On Thu, Nov 19, 2015 at 10:30 PM, Andrew Fresh wrote: > On Thu, Nov 19, 2015 at 04:19:19PM -0500, Richard Farr wrote: >> 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. > > Way cool! I too have been working on this a bit. Sorry that I got > distracted from actually putting it someplace public. > > https://github.com/afresh1/OpenBSD-Pledge > > One benefit of mine is that OpenBSD-Pledge.t is a bit further fleshed > out. I do need to do a fair amount of work on the docs still, but I > will be looking for OKs to import it into base before long. Very nice! Pledges for pkg_* tools anyone? ;) ciao, David
Re: Unix::Pledge perl module
On Thu, Nov 19, 2015 at 04:19:19PM -0500, Richard Farr wrote: > 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. Way cool! I too have been working on this a bit. Sorry that I got distracted from actually putting it someplace public. https://github.com/afresh1/OpenBSD-Pledge One benefit of mine is that OpenBSD-Pledge.t is a bit further fleshed out. I do need to do a fair amount of work on the docs still, but I will be looking for OKs to import it into base before long. I think there is definitely room in the ecosystem for more than one tool, especially if other operating systems adopt pledge. l8rZ, -- andrew - http://afresh1.com I wish life had an UNDO function.
Unix::Pledge perl module
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