OpenBSD::Unveil(3p) Perl Programmers Reference Guide OpenBSD::Unveil(3p)

OpenBSD::Unveil(3p) Perl Programmers Reference Guide OpenBSD::Unveil(3p) #

OpenBSD::Unveil(3p) Perl Programmers Reference Guide OpenBSD::Unveil(3p)

NNAAMMEE #

 OpenBSD::Unveil - Perl interface to OpenBSD unveil(2)

SSYYNNOOPPSSIISS #

   use OpenBSD::Unveil;

   my $file = "/usr/share/dict/words";
   unveil( $file, "r" ) || die "Unable to unveil: $!";
   unveil() || die "Unable to lock unveil: $!";
   open my $fh, '<', $file or die "Unable to open $file: $!";

   print grep { /unveil/i } readline($fh);
   close $fh;

DDEESSCCRRIIPPTTIIOONN #

 This module provides a perl interface to OpenBSD's uunnvveeiill(2) ssyyssccaallll(2).

EEXXPPOORRTT #

 Exports "unveil" by default.

FFUUNNCCTTIIOONNSS #

uunnvveeiill Perl interface to uunnvveeiill(2).

         unveil($paths, $permissions)
         unveil() # to lock

 Returns true on success, returns false and sets $! on failure.  Throws an
 exception on incorrect number of parameters.

SSEEEE AALLSSOO #

 uunnvveeiill(2)

 <http://man.openbsd.org/unveil.2>

AAUUTTHHOORR #

 Andrew Fresh, <afresh1@OpenBSD.org>

LLIICCEENNSSEE AANNDD CCOOPPYYRRIIGGHHTT #

 Copyright (C) 2019 by Andrew Fresh <afresh1@OpenBSD.org>

 Permission to use, copy, modify, and distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
 copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES #

WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF #

MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR #

ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES #

WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN #

ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF #

OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #

perl v5.36.3 2019-07-09 OpenBSD::Unveil(3p)