pledge and unveil

This commit is contained in:
sceox 2020-12-28 21:45:46 -08:00
parent 0d72582fd7
commit a89fa44572

View File

@ -3,12 +3,20 @@
use strict;
use warnings;
my $jobs_dir = "/var/www/jobs";
use OpenBSD::Pledge;
use OpenBSD::Unveil;
pledge( qw(unveil rpath dns inet) ) || die "Unable to pledge: $!";
unveil( "/var/www/perl5", "r" ) || die "Unable to unveil: $!";
unveil( $jobs_dir, "r" ) || die "Unable to unveil: $!";
use local::lib '/var/www/perl5';
use Net::Printer;
use URI::Query;
my $jobs_dir = "/var/www/jobs";
print "content-type:text/html; charset=utf-8\n\n";
print "<html>\n";
print "<head>\n";