compartments.4 (2010 09)
c
compartments(4) compartments(4)
NAME
compartments - HP-UX compartments files
DESCRIPTION
HP-UX compartments are defined by creating one or more ASCII files in the
/etc/cmpt directory. Only
file names ending with
.rules are parsed for compartment definitions. Collectively, these files define
compartments and compartment access rules for local system objects. System objects that have compart-
ment access controls defined include file system objects, inter-process communication objects, and net-
work objects.
The compartment specifications are pre-processed with
cpp before parsing. See cpp (1). You can use
cpp
directives such as #include, #define, #ifdef
, and C/C++ style comments to organize and document
the rules files.
CONFIGURATION RULES SYNTAX
A compartment consists of a name and a set of rules. Compartments use four kinds of configuration
rules: file system rules, inter-process communication (IPC) rules, network rules, and miscellaneous rules.
Rules can be either subject-centric or object-centric. Subject-centric rules control access by processes
(subjects) in a compartment to resources (objects) in other compartments. Object-centric rules control
access to resources (objects) in a compartment by processes (subjects) in other compartments.
Compartment definitions use the following format:
[
sealed][discover] compartment new_compartment_name
{rules }
where the values are defined as follows:
sealed Indicates that any process in this compartment can not change its compartment
as a side-effect of the exec() call, even if the binary being executed has
extended security attributes indicating that the process starts in a different com-
partment. See exec(2). For security purposes, the minimum retained and
minimum permitted privileges of the binary are also ignored (and treated as
though both sets are empty sets).
discover Indicates that for all the processes in this compartment the required mandatory
access rules would be generated at run time so that the process operations would
succeed. This is more of a development tool that enables developers to identify
all the required mandatory access rules for the given application by running it in
a compartment marked as discover.
compartment Designates that this is a compartment definition.
new_compartment_name
Specifies the name to be applied to the compartment being defined. The name is
case sensitive, except for the
init compartment, which is case insensitive. It
can contain only alpha numeric characters, underscore and hyphen [a-zA-Z]
[
a-zA-Z0-9_-]* but not any other special or space characters. The total length
of the compartment name cannot exceed 256 characters.
{} Encloses the new rules.
rules Set of rules defining the compartment. Each rule appears on a line by itself.
Note that the compartment specification may be extended to include new keywords in the future. It is
strongly recommended that compartment names begin with an uppercase character to avoid any future
syntax errors (for example, compartment
Web instead of web).
File System Rules
File system rules govern access to the files and directories of the file system. All file system rules are
subject-centric.
File system rules use one of these two formats:
permission [none | all] file_object
permission [nsearch][, read][, write][, create][, unlink] file_object
If the HP-UX ContainmentExt product (version B.11.31.02 or later) is installed on the system, the file sys-
tem rules using the following format are also supported:
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1