1 # 2 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 3 # 4 5 # 6 # Privilege.pm provides the bootstrap for the Sun::Solaris::Privilege module. 7 # 8 9 require 5.0010; 10 use strict; 11 use warnings; 12 13 package Sun::Solaris::Privilege; 14 15 our $VERSION = '1.4'; 16 17 use XSLoader; 18 XSLoader::load(__PACKAGE__, $VERSION); 19 20 our (@EXPORT_OK, %EXPORT_TAGS); 21 my @constants = qw(PRIV_STR_SHORT PRIV_STR_LIT PRIV_STR_PORT PRIV_ON PRIV_OFF 22 PRIV_SET PRIV_AWARE PRIV_AWARE_RESET PRIV_DEBUG PRIV_PFEXEC 23 PRIV_XPOLICY NET_MAC_AWARE NET_MAC_AWARE_INHERIT __PROC_PROTECT); 24 my @syscalls = qw(setppriv getppriv setpflags getpflags); 25 my @libcalls = qw(priv_addset priv_copyset priv_delset 26 priv_emptyset priv_fillset priv_intersect priv_inverse priv_ineffect 27 priv_isemptyset priv_isequalset priv_isfullset priv_ismember 28 priv_issubset priv_union priv_set_to_str priv_str_to_set priv_gettext); 29 my @variables = qw(%PRIVILEGES %PRIVSETS); 30 31 my @private = qw(priv_getsetbynum priv_getbynum); 32 33 use vars qw(%PRIVILEGES %PRIVSETS); 34 35 # 36 # Dynamically gather all the privilege and privilege set names; they are 37 # generated in Privileges.xs::BOOT. 38 # 39 push @constants, keys %PRIVILEGES, keys %PRIVSETS; 40 41 @EXPORT_OK = (@constants, @syscalls, @libcalls, @private, @variables); 42 %EXPORT_TAGS = (CONSTANTS => \@constants, SYSCALLS => \@syscalls, 43 LIBCALLS => \@libcalls, PRIVATE => \@private, VARIABLES => \@variables, 44 ALL => \@EXPORT_OK); 45 46 our @ISA = qw(Exporter); 47 48 1; 49 __END__