pm_main.c File Reference

#include <linux/string.h>
#include <rsbac/types.h>
#include <rsbac/aci.h>
#include <rsbac/adf_main.h>
#include <rsbac/error.h>
#include <rsbac/debug.h>
#include <rsbac/helpers.h>
#include <rsbac/getname.h>
#include <rsbac/pm.h>

Go to the source code of this file.

Functions

static rsbac_pm_purpose_id_t get_ipc_purpose (struct rsbac_ipc_t ipc_id)
static enum rsbac_adf_req_ret_t tp_check (rsbac_pid_t caller_pid)
static enum rsbac_adf_req_ret_t na_and_pp_or_cs (rsbac_pid_t caller_pid, struct rsbac_fs_file_t file, rsbac_pm_accesses_t acc)
static enum rsbac_adf_req_ret_t na_and_pp_ipc (rsbac_pm_task_id_t task, rsbac_pid_t caller_pid, rsbac_pm_accesses_t acc, struct rsbac_ipc_t ipc_id)
static enum rsbac_adf_req_ret_t na_ipc (rsbac_pm_task_id_t task, rsbac_pid_t caller_pid, rsbac_pm_accesses_t acc)
static enum rsbac_adf_req_ret_t na_dev (rsbac_pid_t caller_pid, rsbac_pm_accesses_t acc, struct rsbac_dev_t dev)
static int adjust_in_out_pp (rsbac_pid_t caller_pid, enum rsbac_target_t target, struct rsbac_fs_file_t file, rsbac_pm_accesses_t acc)
static int adjust_in_out_pp_ipc (rsbac_pid_t caller_pid, struct rsbac_ipc_t ipc, rsbac_pm_accesses_t acc)
enum rsbac_adf_req_ret_t rsbac_adf_request_pm (enum rsbac_adf_request_t request, rsbac_pid_t caller_pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t attr, union rsbac_attribute_value_t attr_val, rsbac_uid_t owner)
int rsbac_adf_set_attr_pm (enum rsbac_adf_request_t request, rsbac_pid_t caller_pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_target_t new_target, union rsbac_target_id_t new_tid, enum rsbac_attribute_t attr, union rsbac_attribute_value_t attr_val, rsbac_uid_t owner)


Function Documentation

static int adjust_in_out_pp rsbac_pid_t  caller_pid,
enum rsbac_target_t  target,
struct rsbac_fs_file_t  file,
rsbac_pm_accesses_t  acc
[static]
 

Definition at line 595 of file pm_main.c.

References A_pm_object_class, A_pm_object_type, FALSE, PM, rsbac_attribute_value_t::pm_object_class, rsbac_attribute_value_t::pm_object_type, PO_personal_data, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_EREADFAILED, RSBAC_EWRITEFAILED, rsbac_get_attr, RSBAC_PM_A_READ, RSBAC_PM_A_WRITE_TO_FILE, rsbac_pm_get_data(), rsbac_pm_pp_intersec(), and rsbac_pm_pp_union().

Referenced by rsbac_adf_set_attr_pm().

static int adjust_in_out_pp_ipc rsbac_pid_t  caller_pid,
struct rsbac_ipc_t  ipc,
rsbac_pm_accesses_t  acc
[static]
 

Definition at line 703 of file pm_main.c.

References get_ipc_purpose(), RSBAC_EWRITEFAILED, RSBAC_PM_A_READ, RSBAC_PM_A_WRITE_TO_FILE, rsbac_pm_add_to_set(), rsbac_pm_clear_set(), rsbac_pm_create_set(), and rsbac_pm_set_exist().

Referenced by rsbac_adf_set_attr_pm().

static rsbac_pm_purpose_id_t get_ipc_purpose struct rsbac_ipc_t  ipc_id  )  [static]
 

Definition at line 31 of file pm_main.c.

References A_pm_ipc_purpose, FALSE, rsbac_target_id_t::ipc, PM, rsbac_attribute_value_t::pm_ipc_purpose, rsbac_get_attr, and T_IPC.

Referenced by adjust_in_out_pp_ipc(), and rsbac_adf_request_pm().

static enum rsbac_adf_req_ret_t na_and_pp_ipc rsbac_pm_task_id_t  task,
rsbac_pid_t  caller_pid,
rsbac_pm_accesses_t  acc,
struct rsbac_ipc_t  ipc_id
[static]
 

Definition at line 294 of file pm_main.c.

References A_pm_ipc_purpose, A_pm_tp, FALSE, GRANTED, rsbac_target_id_t::ipc, NOT_GRANTED, PM, rsbac_attribute_value_t::pm_ipc_purpose, rsbac_attribute_value_t::pm_tp, rsbac_target_id_t::process, RSBAC_EINVALIDTARGET, rsbac_get_attr, RSBAC_PM_A_READ, RSBAC_PM_A_WRITE_TO_FILE, RSBAC_PM_A_WRITING, rsbac_pm_get_data(), RSBAC_PM_IPC_OBJECT_CLASS_ID, rsbac_pm_pp_only(), rsbac_pm_set_member(), T_IPC, and T_PROCESS.

Referenced by rsbac_adf_request_pm().

static enum rsbac_adf_req_ret_t na_and_pp_or_cs rsbac_pid_t  caller_pid,
struct rsbac_fs_file_t  file,
rsbac_pm_accesses_t  acc
[static]
 

Definition at line 82 of file pm_main.c.

References A_pm_current_task, A_pm_object_class, A_pm_tp, FALSE, GRANTED, NOT_GRANTED, PM, rsbac_attribute_value_t::pm_current_task, rsbac_attribute_value_t::pm_object_class, rsbac_attribute_value_t::pm_tp, rsbac_target_id_t::process, RSBAC_EINVALIDTARGET, rsbac_get_attr, RSBAC_PM_A_READ, RSBAC_PM_A_WRITE_TO_FILE, rsbac_pm_exists(), rsbac_pm_get_data(), rsbac_pm_pp_subset(), rsbac_pm_pp_superset(), rsbac_pm_set_member(), T_FILE, and T_PROCESS.

Referenced by rsbac_adf_request_pm().

static enum rsbac_adf_req_ret_t na_dev rsbac_pid_t  caller_pid,
rsbac_pm_accesses_t  acc,
struct rsbac_dev_t  dev
[static]
 

Definition at line 504 of file pm_main.c.

References A_pm_current_task, A_pm_object_class, A_pm_tp, FALSE, GRANTED, NOT_GRANTED, PM, rsbac_attribute_value_t::pm_current_task, rsbac_attribute_value_t::pm_object_class, rsbac_attribute_value_t::pm_tp, rsbac_target_id_t::process, RSBAC_EINVALIDTARGET, rsbac_get_attr, rsbac_pm_get_data(), T_DEV, and T_PROCESS.

Referenced by rsbac_adf_request_pm().

static enum rsbac_adf_req_ret_t na_ipc rsbac_pm_task_id_t  task,
rsbac_pid_t  caller_pid,
rsbac_pm_accesses_t  acc
[static]
 

Definition at line 449 of file pm_main.c.

References A_pm_tp, FALSE, GRANTED, NOT_GRANTED, PM, rsbac_attribute_value_t::pm_tp, rsbac_target_id_t::process, RSBAC_EINVALIDTARGET, rsbac_get_attr, rsbac_pm_get_data(), RSBAC_PM_IPC_OBJECT_CLASS_ID, and T_PROCESS.

Referenced by rsbac_adf_request_pm().

enum rsbac_adf_req_ret_t rsbac_adf_request_pm enum rsbac_adf_request_t  request,
rsbac_pid_t  caller_pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_attribute_t  attr,
union rsbac_attribute_value_t  attr_val,
rsbac_uid_t  owner
 

Definition at line 786 of file pm_main.c.

References A_audit_uid, A_auid_exempt, A_auth_learn, A_auth_may_set_cap, A_auth_may_setuid, A_fake_root_uid, A_log_array_high, A_log_array_low, A_log_program_based, A_log_user_based, A_none, A_pm_current_task, A_pm_ipc_purpose, A_pm_object_class, A_pm_object_type, A_pm_process_type, A_pm_program_type, A_pm_role, A_pm_task_set, A_pm_tp, A_pseudo, A_symlink_add_uid, AUTH, DO_NOT_CARE, FALSE, FREEZE, get_ipc_purpose(), GRANTED, rsbac_target_id_t::ipc, na_and_pp_ipc(), na_and_pp_or_cs(), na_dev(), na_ipc(), NOT_GRANTED, rsbac_attribute_value_t::owner, PM, rsbac_attribute_value_t::pm_current_task, rsbac_attribute_value_t::pm_ipc_purpose, rsbac_attribute_value_t::pm_object_type, rsbac_attribute_value_t::pm_process_type, rsbac_attribute_value_t::pm_role, rsbac_attribute_value_t::pm_task_set, rsbac_attribute_value_t::pm_tp, PO_non_personal_data, PO_none, PO_personal_data, PO_TP, PP_none, PP_TP, PR_data_protection_officer, PR_security_officer, PR_system_admin, PR_tp_manager, PR_user, rsbac_target_id_t::process, R_ADD_TO_KERNEL, R_ALTER, R_APPEND_OPEN, R_CHANGE_GROUP, R_CHANGE_OWNER, R_CLONE, R_CREATE, R_DELETE, R_EXECUTE, 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_OPEN, R_READ_WRITE_OPEN, R_REMOVE_FROM_KERNEL, R_RENAME, R_SEND_SIGNAL, R_SHUTDOWN, R_SWITCH_LOG, R_SWITCH_MODULE, R_TERMINATE, R_TRACE, R_TRUNCATE, R_UMOUNT, R_WRITE, R_WRITE_OPEN, RSBAC_EINVALIDTARGET, rsbac_get_attr, RSBAC_PM_A_APPEND, RSBAC_PM_A_CREATE, RSBAC_PM_A_DELETE, RSBAC_PM_A_READ, RSBAC_PM_A_WRITE, rsbac_pm_get_data(), rsbac_pm_remove_set(), rsbac_pm_set_member(), rsbac_target_id_t::scd, SOFTMODE, ST_rlimit, ST_rsbac_remote_log, ST_rsbaclog, T_DEV, T_DIR, T_FIFO, T_FILE, T_IPC, T_NONE, T_PROCESS, T_SCD, T_SYMLINK, T_USER, tp_check(), TRUE, UNDEFINED, and rsbac_target_id_t::user.

Referenced by rsbac_adf_request_int().

int rsbac_adf_set_attr_pm enum rsbac_adf_request_t  request,
rsbac_pid_t  caller_pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_target_t  new_target,
union rsbac_target_id_t  new_tid,
enum rsbac_attribute_t  attr,
union rsbac_attribute_value_t  attr_val,
rsbac_uid_t  owner
 

Definition at line 2614 of file pm_main.c.

References A_pm_current_task, A_pm_ipc_purpose, A_pm_object_class, A_pm_object_type, A_pm_process_type, A_pm_tp, adjust_in_out_pp(), adjust_in_out_pp_ipc(), FALSE, rsbac_target_id_t::ipc, NOT_GRANTED, rsbac_attribute_value_t::owner, PM, rsbac_attribute_value_t::pm_current_task, rsbac_attribute_value_t::pm_ipc_purpose, rsbac_attribute_value_t::pm_object_class, rsbac_attribute_value_t::pm_object_type, rsbac_attribute_value_t::pm_process_type, rsbac_attribute_value_t::pm_tp, PO_dir, PO_none, PO_personal_data, PO_TP, PP_TP, rsbac_target_id_t::process, R_APPEND_OPEN, R_CLONE, R_CREATE, R_EXECUTE, R_READ, R_READ_OPEN, R_READ_WRITE_OPEN, R_WRITE, R_WRITE_OPEN, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_EREADFAILED, RSBAC_EWRITEFAILED, rsbac_get_attr, RSBAC_PM_A_APPEND, RSBAC_PM_A_READ, RSBAC_PM_A_WRITE, rsbac_pm_get_data(), rsbac_set_attr, T_DEV, T_DIR, T_FIFO, T_FILE, T_IPC, and T_PROCESS.

Referenced by rsbac_adf_set_attr().

static enum rsbac_adf_req_ret_t tp_check rsbac_pid_t  caller_pid  )  [static]
 

Definition at line 53 of file pm_main.c.

References A_pm_process_type, DO_NOT_CARE, FALSE, NOT_GRANTED, PM, rsbac_attribute_value_t::pm_process_type, PP_TP, rsbac_target_id_t::process, rsbac_get_attr, and T_PROCESS.

Referenced by rsbac_adf_request_pm().


Generated on Fri Jun 17 09:45:29 2005 for RSBAC by  doxygen 1.4.2