RSBAC_PM_CHANGE_CURRENT_TASK(2)

NAME
rsbac_pm_change_current_task - change current RSBAC PM task for calling process

SYNOPSIS
#include <rsbac/pm_types.h>

#include <rsbac/syscalls.h>

int rsbac_pm_change_current_task(rsbac_pm_task_id_t task);

DESCRIPTION
rsbac_pm_change_current_task changes the current task to task for the calling process. The new task must exist and be authorized (see PM model description). The task id is defined as follows:

    typedef u_int rsbac_pm_task_id_t;

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

ERRORS

EPERM
    The decision component denied attribute read for this user/process.

RSBAC_EINVALIDVALUE
    Value is NULL.

RSBAC_ENOTINITIALIZED
    The RSBAC system is not initialized, so no attributes are available.

RSBAC_EREADFAILED
    The RSBAC system ran into a read error while getting attributes.

RSBAC_EWRITEFAILED
    The RSBAC system ran into a write error while setting attributes.

SEE ALSO
rsbac_pm(2),rsbac_pm_create_file(2).

AUTHOR
Amon Ott <ao@compuniverse.com>