RSBAC_REMOVE_TARGET(2)

NAME
rsbac_remove_target - remove all RSBAC attribute value for target

SYNOPSIS
#include <rsbac/types.h>

#include <rsbac/syscalls.h>

int rsbac_remove_target(enum rsbac_target_t target, union rsbac_target_id_t * tid);

DESCRIPTION
rsbac_remove_target requests from the kernel to remove all attribute values of target with target id tid. Valid targets are IPC, SCD, USER, PROCESS. The data structures are defined as follows:

    typedef uid_t rsbac_uid_t; /* Same as user in Linux */
    typedef pid_t rsbac_pid_t; /* Same as pid in Linux  */
    enum    rsbac_ipc_type_t {I_sem, I_msg, I_shm, I_sock,
                              I_sockid, I_none};
    enum    rsbac_scd_type_t {ST_time_strucs, ST_clock, ST_host_id,
                              ST_net_id, ST_ioports, ST_rlimit,
                              ST_swap, ST_syslog, ST_rsbac};
    union   rsbac_ipc_id_t
      {
        u_long id_nr;
      };
    struct rsbac_ipc_t
        {
          enum  rsbac_ipc_type_t     type;
          union rsbac_ipc_id_t       id;
        };
    enum   rsbac_target_t {T_FILE, T_DIR, T_DEV, T_IPC, T_SCD,
                           T_USER, T_PROCESS, T_NONE};
    union  rsbac_target_id_t
           {
              struct rsbac_ipc_t       ipc;
              enum rsbac_scd_type_t    scd;
              rsbac_uid_t              user;
              rsbac_pid_t              process;
              int                      dummy;
           };

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

ERRORS

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

RSBAC_EINVALIDTARGET
    The target is invalid, e.g. FILE, DEV or DIR.

RSBAC_EINVALIDVALUE
    Value is NULL.

RSBAC_EINVALIDATTR
    The attribute is invalid for this target.

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

RSBAC_ENOMEM
    The RSBAC system has not enough memory to save attributes to disk.

RSBAC_EWRITEFAILED
    The RSBAC system ran into a write error while saving attributes to disk.

SEE ALSO
rsbac_get_attr(2),rsbac_get_attr_n(2),rsbac_set_attr(2),rsbac_set_attr_n(2),rsbac_remove_target_n(2).

AUTHOR
Amon Ott <ao@compuniverse.com>