6.5. Changing a user’s clearance level within the defined security range in MLS
As a user in Multi-Level Security (MLS), you can change your current clearance level within the range the administrator assigned to you. You can never exceed the upper limit of your range or reduce your level below the lower limit of your range. This allows you, for example, to modify lower-sensitivity files without increasing their sensitivity level to your highest clearance level.
For example, as a user assigned to range s1-s3:
-
You can switch to levels
s1,s2, ands3. -
You can switch to ranges
s1-s2, ands2-s3. -
You cannot switch to ranges
s0-s3ors1-s4.
Switching to a different level opens a new shell with the different clearance. This means you cannot return to your original clearance level in the same way as decreasing it. However, you can always return to the previous shell by entering exit.
Prerequisites
-
The SELinux policy is set to
mls. -
SELinux mode is set to
enforcing. - You can log in as a user assigned to a range of MLS clearance levels.
Procedure
Log in as the user from a secure terminal.
Secure terminals are defined in the
/etc/selinux/mls/contexts/securetty_typesfile. By default, the console is a secure terminal, but SSH is not.Check the current user’s security context:
$ id -Z user_u:user_r:user_t:s0-s2In this example, the user is assigned to the
user_uSELinux user,user_rrole,user_ttype, and the MLS security ranges0-s2.Check the current user’s security context:
$ id -Z user_u:user_r:user_t:s1-s2Switch to a different security clearance range within the user’s clearance range:
$ newrole -l s1You can switch to any range whose maximum is lower or equal to your assigned range. Entering a single-level range changes the lower limit of the assigned range. For example, entering
newrole -l s1as a user with as0-s2range is equivalent to enteringnewrole -l s1-s2.
Verification
Display the current user’s security context:
$ id -Z user_u:user_r:user_t:s1-s2Return to the previous shell with the original range by terminating the current shell:
$ exit