usr/src/cmd/perl/contrib/Sun/Solaris/Privilege/Privilege.pm
author Casper H.S. Dik <Casper.Dik@Sun.COM>
Wed, 28 Apr 2010 10:01:37 +0200
changeset 12273 63678502e95e
parent 9799 641e52717cb5
child 12388 1bc8d55b0dfd
permissions -rw-r--r--
PSARC 2009/377 In-kernel pfexec implementation. PSARC 2009/378 Basic File Privileges PSARC 2010/072 RBAC update: user attrs from profiles 4912090 pfzsh(1) should exist 4912093 pfbash(1) should exist 4912096 pftcsh(1) should exist 6440298 Expand the basic privilege set in order to restrict file access 6859862 Move pfexec into the kernel 6919171 cred_t sidesteps kmem_debug; we need to be able to detect bad hold/free when they occur 6923721 The new SYS_SMB privilege is not backward compatible 6937562 autofs doesn't remove its door when the zone shuts down 6937727 Zones stuck on deathrow; netstack_zone keeps a credential reference to the zone 6940159 Implement PSARC 2010/072

# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
#

#
# Privilege.pm provides the bootstrap for the Sun::Solaris::Privilege module.
#

require 5.8.4;
use strict;
use warnings;

package Sun::Solaris::Privilege;

our $VERSION = '1.4';

use XSLoader;
XSLoader::load(__PACKAGE__, $VERSION);

our (@EXPORT_OK, %EXPORT_TAGS);
my @constants = qw(PRIV_STR_SHORT PRIV_STR_LIT PRIV_STR_PORT PRIV_ON PRIV_OFF
	PRIV_SET PRIV_AWARE PRIV_AWARE_RESET PRIV_DEBUG PRIV_PFEXEC
	PRIV_XPOLICY NET_MAC_AWARE NET_MAC_AWARE_INHERIT __PROC_PROTECT);
my @syscalls = qw(setppriv getppriv setpflags getpflags);
my @libcalls = qw(priv_addset priv_copyset priv_delset
    priv_emptyset priv_fillset priv_intersect priv_inverse priv_ineffect
    priv_isemptyset priv_isequalset priv_isfullset priv_ismember
    priv_issubset priv_union priv_set_to_str priv_str_to_set priv_gettext);
my @variables = qw(%PRIVILEGES %PRIVSETS);

my @private = qw(priv_getsetbynum priv_getbynum);

use vars qw(%PRIVILEGES %PRIVSETS);

#
# Dynamically gather all the privilege and privilege set names; they are
# generated in Privileges.xs::BOOT.
#
push @constants, keys %PRIVILEGES, keys %PRIVSETS;

@EXPORT_OK = (@constants, @syscalls, @libcalls, @private, @variables);
%EXPORT_TAGS = (CONSTANTS => \@constants, SYSCALLS => \@syscalls,
    LIBCALLS => \@libcalls, PRIVATE => \@private, VARIABLES => \@variables,
    ALL => \@EXPORT_OK);

our @ISA = qw(Exporter);

1;
__END__