You can add new compartment rules, delete unneeded rules, and modify existing rules. You can also change the names of existing compartments.

To modify your compartment configuration, follow these steps:

Changing Compartment Rules

1.(Optional) Make temporary backup copies of the configuration files you plan to modify. Either put these files outside the /etc/cmpt directory or omit the .rules suffix. Doing this lets you easily revert to your starting point if an editing problem occurs.

2.Examine your current compartment rules by the following command:

#getrules

3.Create or modify compartment rules. See “Compartment Rules and Syntax” for instructions on completing this step and for a complete description of compartment rules syntax.

4.(Optional) Preview your compartment rules by entering the following command:

#setrules -p

The -poption parses the configured rules list and reports any discrepancies in syntax and semantics. HP recommends that you follow this step before enabling compartment rules on your system.

5.(Optional) Make backup copies of the compartment configuration files.

6.Run the setrules command to load the configured rules:

# setrules

Changing Compartment Names

You can change the names of compartments.

However, changing the name of a compartment can affect applications that are already configured with the existing compartment names. If you change the name of a compartment, you must reconfigure any applications configured in that compartment as well.

CAUTION: Do not change the name of the INIT compartment or otherwise modify the compartment definition. If you modify the INIT compartment definition, the compartments feature will not work properly.

NOTE: If you rename a compartment, you have essentially created a new compartment and removed the compartment with the old name. You must change all references to refer to the new compartment.

Compartment Components

The compartments feature comprises a set of configuration files and commands you use to configure and administer compartments. Manpages are included to assist you in using the compartments features. These components are listed in the following sections:

Compartment Configuration Files

Table 5-1 “Compartment Configuration Files” briefly describes the files you use with compartment components.

Compartment Components 61

Page 61
Image 61
HP UX 11i Role-based Access Control (RBAC) Software manual Compartment Components, Changing Compartment Rules