labck Command

Purpose

Checks for the consistency of the label-encodings file.

Syntax

labck [ -l ] [ -f encodings_file ]

labck [ { -c | -r } encodings_file ]

Description

You can use the labck command to verify that a label-encodings file is internally consistent. When specified without any flags, the labck command verifies the consistency of the system-default, label-encodings file and no message is displayed if the file is proper.

Flags

Item Description
-l Lists the system high sensitivity label, system low sensitivity label, system high integrity label, and system low integrity label as defined in the label-encodings file.
-f encodings_file Uses the value that you specify for encodings_file instead of the system-default, label-encodings file.
-c encodings_file Copies the contents of the system-default, label-encodings file into the encodings_file that you specify. If the file already exists, the command exits with an error.
-r encodings_file Replaces the contents of the system-default, label-encodings file with the contents in the file that you specify using encodings_file. The contents are replaced only if the file name that you specify is a valid label-encodings file.

Security

Only authorized users can run the labck command.

Item Description
aix.mls.lef Required to perform the above operations on the label encodings file.

Files Accessed:

Item Description
Mode File
r /etc/security/enc/LabelEncodings

Exit Status

The labck command returns the following exit values:

Item Description
0 The command completed successfully.
>0 An error occurred.

Examples

  1. To check the consistency of the system-default, label-encodings file, enter the following command:
    labck
  2. To check the consistency of the system-default, label-encodings file and print the system the high and low labels, enter the following command:
    labck -l
  3. To check the consistency of a label-encodings file that is stored in the current directory, enter the following command:
    labck –f ./labelencodingsfile
  4. To copy the system-default, label-encodings file to a file with the name of /tmp/lef, enter the following command:
    labck –c /tmp/lef
  5. To replace the contents of system-default, label-encodings file with the contents of the /tmp/lef file, enter the following command:
    labck –r /tmp/lef

Files

Item Description
/usr/sbin/labck Contains the labck command.
/etc/security/enc/LabelEncodings System default label encodings file.