RSBAC_ADF_LOG_SWITCH(2)

NAME
rsbac_adf_log_switch - switch RSBAC request logging level

SYNOPSIS
#include <rsbac/types.h>

#include <rsbac/syscalls.h>

int rsbac_adf_log_switch(enum rsbac_adf_request_t target, int value);

DESCRIPTION
rsbac_adf_log_switch is used to switch RSBAC request logging levels for request target to value value. Valid values are LL_none (no logging), LL_denied (denied requests only) and LL_full (log all requests, can be plenty of stuff). The logging is done via syslog.

Valid targets are all requests other than the pseudo request R_NONE. The data structures are defined as follows:

    enum  rsbac_adf_request_t {
                            R_ADD_TO_KERNEL,
                            R_ALTER,
                            R_APPEND_OPEN,
                            R_CHANGE_GROUP,
                            R_CHANGE_OWNER,
                            R_CHDIR,
                            R_CLONE,
                            R_CLOSE,
                            R_CREATE,
                            R_DELETE,
                            R_EXECUTE,
                            R_GET_PERMISSIONS_DATA,
                            R_GET_STATUS_DATA,
                            R_LINK_HARD,
                            R_MODIFY_ACCESS_DATA,
                            R_MODIFY_ATTRIBUTE,
                            R_MODIFY_PERMISSIONS_DATA,
                            R_MODIFY_SYSTEM_DATA,
                            R_MOUNT,
                            R_READ,
                            R_READ_ATTRIBUTE,
                            R_READ_WRITE_OPEN,
                            R_READ_OPEN,
                            R_REMOVE_FROM_KERNEL,
                            R_RENAME,
                            R_SEARCH,
                            R_SEND_SIGNAL,
                            R_SHUTDOWN,
                            R_SWITCH_LOG,
                            R_SWITCH_MODULE,
                            R_TERMINATE,
                            R_TRACE,
                            R_TRUNCATE,
                            R_UMOUNT,
                            R_WRITE,
                            R_WRITE_OPEN,
                            R_NONE
                          };
    enum    rsbac_log_level_t {LL_none, LL_denied, LL_full,
                               LL_request, LL_invalid};

RETURN VALUE
rsbac_adf_log_switch returns 0 on success and an error code otherwise.

ERRORS

EPERM
    The decision component denied module switching to this user/process.

RSBAC_EINVALIDTARGET
    The target is invalid.

RSBAC_EINVALIDVALUE
    Value is not LL_none, LL_denied or LL_full.

SEE ALSO
rsbac_switch(2).

AUTHOR
Amon Ott <ao@compuniverse.com>