RSBAC_PM_CREATE_FILE(2)

NAME
rsbac_pm_create_file - create a file with given mode and RSBAC PM class

SYNOPSIS
#include <rsbac/pm_types.h>

#include <rsbac/syscalls.h>

int rsbac_pm_create_file(char * filename, int mode, rsbac_pm_object_class_id_t class);

DESCRIPTION
rsbac_pm_create_file creates file filename with given mode and PM class class. The class id is defined as follows:

    typedef u_int rsbac_pm_object_class_id_t;

RETURN VALUE
rsbac_pm_create_file returns 0 on success and an error code otherwise. Only RSBAC errors are listed below.

ERRORS

EPERM
    The user/process is not allowed to create this file class, e.g. wrong current task, access type not necessary etc.

RSBAC_EINVALIDPOINTER
    filename is a NULL pointer.

RSBAC_EINVALIDVALUE
    Class is a reserved class id (RSBAC_PM_IPC_OBJECT_CLASS_ID or RSBAC_PM_IPC_OBJECT_CLASS_ID), mode is not for a regular file or class does not exist.

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_change_current_task(2).

AUTHOR
Amon Ott <ao@compuniverse.com>