summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/perl/cpan/OpenBSD-Pledge/Pledge.xs18
-rw-r--r--gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm18
-rw-r--r--gnu/usr.bin/perl/cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t17
3 files changed, 8 insertions, 45 deletions
diff --git a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/Pledge.xs b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/Pledge.xs
index c2bec57a86b..0d719dcb20c 100644
--- a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/Pledge.xs
+++ b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/Pledge.xs
@@ -1,7 +1,7 @@
-/* $OpenBSD: Pledge.xs,v 1.2 2017/09/09 14:53:57 afresh1 Exp $ */
+/* $OpenBSD: Pledge.xs,v 1.3 2021/06/09 23:21:34 afresh1 Exp $ */
/*
- * Copyright (c) 2015 Andrew Fresh <afresh1@openbsd.org>
+ * Copyright (c) 2015,2021 Andrew Hewus 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
@@ -21,22 +21,8 @@
#include "perl.h"
#include "XSUB.h"
-#define PLEDGENAMES
-#include <sys/pledge.h>
-
MODULE = OpenBSD::Pledge PACKAGE = OpenBSD::Pledge
-AV *
-pledgenames()
- INIT:
- int i;
- CODE:
- for (i = 0; pledgenames[i].bits != 0; i++)
- XPUSHs( sv_2mortal(
- newSVpv(pledgenames[i].name, strlen(pledgenames[i].name))
- ) );
- XSRETURN(i);
-
int
_pledge(const char * promises)
CODE:
diff --git a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm
index 6512423c12e..5b564b2a4fc 100644
--- a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm
+++ b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/lib/OpenBSD/Pledge.pm
@@ -1,4 +1,4 @@
-# $OpenBSD: Pledge.pm,v 1.5 2019/12/30 02:15:17 afresh1 Exp $ #
+# $OpenBSD: Pledge.pm,v 1.6 2021/06/09 23:21:34 afresh1 Exp $ #
package OpenBSD::Pledge;
use 5.020002;
@@ -6,11 +6,9 @@ use strict;
use warnings;
use parent 'Exporter';
-our %EXPORT_TAGS = ( 'all' => [qw( pledge pledgenames )] );
-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-our @EXPORT = qw( pledge ); ## no critic 'export'
+our @EXPORT = qw( pledge ); ## no critic 'export'
-our $VERSION = '0.02';
+our $VERSION = '0.03';
require XSLoader;
XSLoader::load( 'OpenBSD::Pledge', $VERSION );
@@ -60,8 +58,6 @@ interfaces.
Exports L</pledge> by default.
-C<:all> will also export L</pledgenames>
-
=head1 FUNCTIONS
=head2 pledge
@@ -75,10 +71,6 @@ as L<perl(1)> itself is useless without it.
Returns true on success, returns false and sets $! on failure
-=head2 pledgenames
-
-Returns a list of the possible promises you can pass to L</pledge>.
-
=head1 BUGS AND LIMITATIONS
Perl is particularly fond of C<stdio> so that promise is always added by
@@ -92,11 +84,11 @@ L<http://man.openbsd.org/pledge.2>
=head1 AUTHOR
-Andrew Fresh, E<lt>afresh1@OpenBSD.orgE<gt>
+Andrew Hewus Fresh, E<lt>afresh1@OpenBSD.orgE<gt>
=head1 LICENSE AND COPYRIGHT
-Copyright (C) 2015 by Andrew Fresh E<lt>afresh1@OpenBSD.orgE<gt>
+Copyright (C) 2015,2021 by Andrew Hewus Fresh E<lt>afresh1@OpenBSD.orgE<gt>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t
index b63f9109851..d7c6ce5042a 100644
--- a/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t
+++ b/gnu/usr.bin/perl/cpan/OpenBSD-Pledge/t/OpenBSD-Pledge.t
@@ -1,4 +1,4 @@
-# $OpenBSD: OpenBSD-Pledge.t,v 1.3 2017/09/09 14:53:57 afresh1 Exp $ #
+# $OpenBSD: OpenBSD-Pledge.t,v 1.4 2021/06/09 23:21:34 afresh1 Exp $ #
## no critic 'version'
## no critic 'package'
# Before 'make install' is performed this script should be runnable with
@@ -22,21 +22,6 @@ BEGIN { use_ok('OpenBSD::Pledge') }
## no critic 'private'
## no critic 'punctuation'
#########################
-# PLEDGENAMES
-#########################
-
-# Here we just test that we get a small subset of names back
-# because there is no point in failing if someone adds new names.
-
-my %names = map { $_ => 1 } OpenBSD::Pledge::pledgenames();
-ok $names{$_}, "$_ pledge name exists" for qw(
- stdio
- rpath
- wpath
- cpath
-);
-
-#########################
# _PLEDGE
#########################