RSBAC_MAC_SET_CURR_SECLEVEL(2)

NAME
rsbac_get_curr_seclevel, rsbac_set_curr_seclevel - get and set RSBAC MAC current security level for this process

SYNOPSIS
#include <rsbac/types.h>

#include <rsbac/syscalls.h>

enum rsbac_security_level_t rsbac_get_curr_seclevel();

int rsbac_set_curr_seclevel(enum rsbac_security_level_t level);

DESCRIPTION
rsbac_get_curr_seclevel gets the current security level for the calling process. rsbac_set_curr_seclevel sets the current security level for the calling process to value.

Valid levels are SL_unclassified, SL_confidential, SL_secret, SL_top_secret. The data structures are defined as follows:

    enum  rsbac_security_level_t {
               SL_unclassified, SL_confidential, SL_secret,
               SL_top_secret, SL_rsbac_internal
          };

RETURN VALUE
rsbac_get_curr_seclevel returns the current security level on success and an error code otherwise.

rsbac_set_curr_seclevel returns 0 on success and an error code otherwise.

ERRORS

EPERM
    Setting this current security level would violate MAC security properties.

RSBAC_EINVALIDVALUE
    Value is not valid.

RSBAC_EREADFAILED
    The RSBAC system ran into an error while getting an attribute.

RSBAC_EWRITEFAILED
    The RSBAC system ran into an error while setting the attribute.

SEE ALSO
rsbac_mac_get_max_seclevel (2)

AUTHOR
Amon Ott <ao@compuniverse.com>