Home | History | Annotate | Download | only in Privilege
      1 # CDDL HEADER START
      2 #
      3 # The contents of this file are subject to the terms of the
      4 # Common Development and Distribution License (the "License").
      5 # You may not use this file except in compliance with the License.
      6 #
      7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      8 # or http://www.opensolaris.org/os/licensing.
      9 # See the License for the specific language governing permissions
     10 # and limitations under the License.
     11 #
     12 # When distributing Covered Code, include this CDDL HEADER in each
     13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     14 # If applicable, add the following below this CDDL HEADER, with the
     15 # fields enclosed by brackets "[]" replaced with your own identifying
     16 # information: Portions Copyright [yyyy] [name of copyright owner]
     17 #
     18 # CDDL HEADER END
     19 #
     20 
     21 #
     22 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 
     26 #
     27 # Privilege.pm provides the bootstrap for the Sun::Solaris::Privilege module.
     28 #
     29 
     30 require 5.8.4;
     31 use strict;
     32 use warnings;
     33 
     34 package Sun::Solaris::Privilege;
     35 
     36 our $VERSION = '1.3';
     37 
     38 use XSLoader;
     39 XSLoader::load(__PACKAGE__, $VERSION);
     40 
     41 our (@EXPORT_OK, %EXPORT_TAGS);
     42 my @constants = qw(PRIV_STR_SHORT PRIV_STR_LIT PRIV_STR_PORT PRIV_ON PRIV_OFF
     43 	PRIV_SET PRIV_AWARE PRIV_AWARE_RESET PRIV_DEBUG);
     44 my @syscalls = qw(setppriv getppriv setpflags getpflags);
     45 my @libcalls = qw(priv_addset priv_copyset priv_delset
     46     priv_emptyset priv_fillset priv_intersect priv_inverse priv_ineffect
     47     priv_isemptyset priv_isequalset priv_isfullset priv_ismember
     48     priv_issubset priv_union priv_set_to_str priv_str_to_set priv_gettext);
     49 my @variables = qw(%PRIVILEGES %PRIVSETS);
     50 
     51 my @private = qw(priv_getsetbynum priv_getbynum);
     52 
     53 use vars qw(%PRIVILEGES %PRIVSETS);
     54 
     55 #
     56 # Dynamically gather all the privilege and privilege set names; they are
     57 # generated in Privileges.xs::BOOT.
     58 #
     59 push @constants, keys %PRIVILEGES, keys %PRIVSETS;
     60 
     61 @EXPORT_OK = (@constants, @syscalls, @libcalls, @private, @variables);
     62 %EXPORT_TAGS = (CONSTANTS => \@constants, SYSCALLS => \@syscalls,
     63     LIBCALLS => \@libcalls, PRIVATE => \@private, VARIABLES => \@variables,
     64     ALL => \@EXPORT_OK);
     65 
     66 our @ISA = qw(Exporter);
     67 
     68 1;
     69 __END__
     70