https://github.com/afresh1/openbsd-unveil
An interface to the OpenBSD unveil(2) syscall.
https://github.com/afresh1/openbsd-unveil
openbsd perl perl5 unveil
Last synced: 7 months ago
JSON representation
An interface to the OpenBSD unveil(2) syscall.
- Host: GitHub
- URL: https://github.com/afresh1/openbsd-unveil
- Owner: afresh1
- Created: 2019-07-05T00:16:08.000Z (over 6 years ago)
- Default Branch: blead
- Last Pushed: 2023-07-06T01:14:07.000Z (over 2 years ago)
- Last Synced: 2025-07-17T00:30:22.915Z (8 months ago)
- Topics: openbsd, perl, perl5, unveil
- Language: Perl
- Homepage:
- Size: 5.86 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
OpenBSD::Unveil - Perl interface to OpenBSD unveil(2)
SYNOPSIS
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;
DESCRIPTION
This module provides a perl interface to OpenBSD's unveil(2) syscall(2).
EXPORT
Exports "unveil" by default.
FUNCTIONS
unveil
Perl interface to unveil(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.
SEE ALSO
unveil(2)
AUTHOR
Andrew Hewus Fresh,
LICENSE AND COPYRIGHT
Copyright (C) 2019 by Andrew Hewus Fresh
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.