getmax_sl, getmax_tl, getmin_sl, and getmin_tl Subroutines

Purpose

Retrieve maximum and minimum sensitivity label (SL) and integrity label (TL) from the initialized label encodings file.

Library

Trusted AIX® Library ( libmls.a )

Syntax

#include <mls/mls.h>
int getmax_sl (sl)
sl_t *sl;

int getmax_tl (tl)
tl_t *tl;

int getmin_sl(sl)
sl_t *sl;

int getmin_tl(tl)
sl_t *tl;

Description

The getmax_sl subroutine retrieves the maximum SL that is defined in the initialized label encodings file and copies the result to the sl parameter.

The getmax_tl subroutine retrieves the maximum TL that is defined in the initialized label encodings file and copies the result to the tl parameter.

The getmin_sl subroutine retrieves the minimum SL that is defined in the initialized label encodings file and copies the result to the sl parameter.

The getmax_tl subroutine retrieves the minimum TL that is defined in the initialized label encodings file and copies the result to the tl parameter.

Requirement: Must initialize the database before running these subroutines.

Parameters

Item Description
sl Specifies the sensitivity label to be copied to.
tl Specifies the integrity label to be copied to.

Files Access

Mode File
r /etc/security/enc/LabelEncodings

Return Values

If successful, these subroutines return a value of zero. Otherwise, they return a value of -1.

Error Codes

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

Item Description
ENIVAL The parameter specifies a value that is null.
ENOTREADY The database is not initialized.