maxlen_sl, maxlen_cl, and maxlen_tl Subroutines

Purpose

Determine the maximum size of the sensitivity label (SL), the clearance label (CL), and the integrity label (TL).

Library

Trusted AIX® Library ( libmls.a )

Syntax

#include <mls/mls.h>

int maxlen_sl (void)

int maxlen_cl (void)

int maxlen_tl (void)

Description

The maxlen_sl subroutine retrieves the maximum possible length of a sensitivity label (SL) that is defined in the current label encodings file.

The maxlen_cl subroutine retrieves the maximum possible length of a clearance label (CL) that is defined in the current label encodings file.

The maxlen_tl subroutine retrieves the maximum possible length of a integrity label (TL) that is defined in the current label encodings file.

For a label encoding file, the maximum length of a SL, a CL, or a TL is calculated and is constant, unless the labels configuration is modified.

Requirement: Must initialize the database before running these subroutines.

Files Access

Mode File
r /etc/security/enc/LabelEncodings

Return Values

If successful, these subroutines return the maximum length of NULL terminated label. Otherwise, they return a value of -1.

Error Codes

If these subroutines fail, they set one of the following error codes:

Item Description
ENOTREADY The database is not initialized.