Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afresh1/OpenBSD-Pledge
This is a perl interface to OpenBSD's pledge system call.
https://github.com/afresh1/OpenBSD-Pledge
Last synced: 3 months ago
JSON representation
This is a perl interface to OpenBSD's pledge system call.
- Host: GitHub
- URL: https://github.com/afresh1/OpenBSD-Pledge
- Owner: afresh1
- Created: 2015-11-19T21:27:31.000Z (almost 9 years ago)
- Default Branch: blead
- Last Pushed: 2021-06-09T23:16:55.000Z (over 3 years ago)
- Last Synced: 2024-02-13T03:28:46.856Z (9 months ago)
- Language: Perl
- Size: 69.3 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
- awesome-pledge - OpenBSD-Pledge - bin/cvsweb/src/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/) Perl (Libraries)
README
NAME
OpenBSD::Pledge - Perl interface to OpenBSD pledge(2)SYNOPSIS
use OpenBSD::Pledge;my $file = "/usr/share/dict/words";
pledge( qw( rpath ) ) || die "Unable to pledge: $!";
open my $fh, '<', $file or die "Unable to open $file: $!";pledge() || die "Unable to pledge again: $!";
print grep { /pledge/i } readline($fh);
close $fh;DESCRIPTION
This module provides a perl interface to OpenBSD's pledge(2) syscall(2).Once you promise that your program will only use certain syscalls the
kernel will kill the program if it attempts to call any other
interfaces.EXPORT
Exports "pledge" by default.FUNCTIONS
pledge
Perl interface to pledge(2).pledge(@promises)
The "stdio" promise is always implied, as perl(1) itself is useless
without it.Returns true on success, returns false and sets $! on failure
BUGS AND LIMITATIONS
Perl is particularly fond of "stdio" so that promise is always added by
"pledge".SEE ALSO
pledge(2)
AUTHOR
Andrew Hewus Fresh,LICENSE AND COPYRIGHT
Copyright (C) 2015,2021 by Andrew Hewus FreshPermission 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.