rc_main.c File Reference

#include <linux/string.h>
#include <rsbac/types.h>
#include <rsbac/aci.h>
#include <rsbac/adf_main.h>
#include <rsbac/rc.h>
#include <rsbac/error.h>
#include <rsbac/debug.h>
#include <rsbac/helpers.h>
#include <rsbac/getname.h>
#include <rsbac/rc_getname.h>
#include <rsbac/rkmem.h>
#include <rsbac/network.h>

Go to the source code of this file.

Functions

static enum rsbac_adf_req_ret_t check_comp_rc (enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_adf_request_t request, rsbac_pid_t caller_pid)
static enum rsbac_adf_req_ret_t check_comp_rc_scd (enum rsbac_rc_scd_type_t scd_type, enum rsbac_adf_request_t request, rsbac_pid_t caller_pid)
int rsbac_rc_test_admin_roles (rsbac_rc_role_id_t t_role, rsbac_boolean_t modify)
int rsbac_rc_test_assign_roles (enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t attr, rsbac_rc_role_id_t t_role)
enum rsbac_adf_req_ret_t rsbac_rc_check_type_comp (enum rsbac_target_t target, rsbac_rc_type_id_t type, enum rsbac_adf_request_t request, rsbac_pid_t caller_pid)
int rsbac_rc_test_role_admin (rsbac_boolean_t modify)
enum rsbac_adf_req_ret_t rsbac_adf_request_rc (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_rc (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 enum rsbac_adf_req_ret_t check_comp_rc enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_adf_request_t  request,
rsbac_pid_t  caller_pid
[static]
 

Definition at line 34 of file rc_main.c.

References A_local_rc_type, A_rc_role, A_rc_type, A_rc_type_fd, A_rc_type_nt, A_remote_rc_type, FALSE, get_rc_special_right_name(), get_target_name_only(), GRANTED, NOT_GRANTED, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, rsbac_attribute_value_t::rc_type, RI_type_comp_dev, RI_type_comp_fd, RI_type_comp_group, RI_type_comp_ipc, RI_type_comp_netdev, RI_type_comp_netobj, RI_type_comp_nettemp, RI_type_comp_process, RI_type_comp_user, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_net_remote_request(), rsbac_rc_check_comp(), T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SYMLINK, T_USER, TRUE, and rsbac_rc_target_id_t::type.

Referenced by rsbac_adf_request_rc().

static enum rsbac_adf_req_ret_t check_comp_rc_scd enum rsbac_rc_scd_type_t  scd_type,
enum rsbac_adf_request_t  request,
rsbac_pid_t  caller_pid
[static]
 

Definition at line 172 of file rc_main.c.

References A_rc_role, FALSE, get_request_name(), GRANTED, NOT_GRANTED, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, RI_type_comp_scd, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_rc_check_comp(), T_PROCESS, and rsbac_rc_target_id_t::type.

Referenced by rsbac_adf_request_rc().

enum rsbac_adf_req_ret_t rsbac_adf_request_rc 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 504 of file rc_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_linux_dac_disable, A_log_array_high, A_log_array_low, A_log_program_based, A_log_user_based, A_none, A_pseudo, A_rc_def_role, A_rc_force_role, A_rc_initial_role, A_rc_role, A_rc_type, A_rc_type_fd, A_rc_type_nt, A_symlink_add_rc_role, A_symlink_add_uid, AUTH, check_comp_rc(), check_comp_rc_scd(), DO_NOT_CARE, FALSE, FREEZE, GRANTED, rsbac_target_id_t::netobj, NOT_GRANTED, NULL, rsbac_target_id_t::process, R_ACCEPT, R_ADD_TO_KERNEL, R_ALTER, R_APPEND_OPEN, R_BIND, R_CHANGE_GROUP, R_CHANGE_OWNER, R_CHDIR, R_CLONE, R_CONNECT, R_CREATE, R_DELETE, R_EXECUTE, R_GET_PERMISSIONS_DATA, R_GET_STATUS_DATA, R_LINK_HARD, R_LISTEN, R_MAP_EXEC, R_MODIFY_ACCESS_DATA, R_MODIFY_ATTRIBUTE, R_MODIFY_PERMISSIONS_DATA, R_MODIFY_SYSTEM_DATA, R_MOUNT, R_NET_SHUTDOWN, R_READ, R_READ_ATTRIBUTE, R_READ_OPEN, R_READ_WRITE_OPEN, R_RECEIVE, R_REMOVE_FROM_KERNEL, R_RENAME, R_SEARCH, R_SEND, R_SEND_SIGNAL, R_SHUTDOWN, R_SWITCH_LOG, R_SWITCH_MODULE, R_TERMINATE, R_TRACE, R_TRUNCATE, R_UMOUNT, R_WRITE, R_WRITE_OPEN, RC, rsbac_attribute_value_t::rc_role, RC_role_inherit_user, rsbac_attribute_value_t::rc_type, RC_type_inherit_parent, RC_type_inherit_process, RC_type_no_chown, RC_type_no_create, RC_type_no_execute, RC_type_use_new_role_def_create, RCR_ASSIGN, RCR_MODIFY_AUTH, RI_def_fd_create_type, RI_def_fd_ind_create_type, RI_def_group_create_type, RI_def_ipc_create_type, RI_def_process_chown_type, RI_def_process_create_type, RI_def_process_execute_type, RI_def_user_create_type, RI_type_comp_fd, RI_type_comp_group, RI_type_comp_ipc, RI_type_comp_nettemp, RI_type_comp_process, RI_type_comp_user, rsbac_rc_target_id_t::role, RSBAC_EREADFAILED, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_rc_check_comp(), rsbac_rc_check_type_comp(), RSBAC_RC_GENERAL_TYPE, rsbac_rc_get_item(), rsbac_rc_test_assign_roles(), rsbac_rc_test_role_admin(), RST_auth_administration, RT_ROLE, rsbac_target_id_t::scd, rsbac_net_obj_desc_t::sock_p, SOFTMODE, ST_other, T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_NONE, T_PROCESS, T_SCD, T_SYMLINK, T_USER, TRUE, rsbac_rc_target_id_t::type, rsbac_rc_item_value_t::type_id, and UNDEFINED.

Referenced by rsbac_adf_request_int().

int rsbac_adf_set_attr_rc 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 1846 of file rc_main.c.

References A_rc_def_role, A_rc_force_role, A_rc_initial_role, A_rc_role, A_rc_type, A_rc_type_fd, FALSE, NOT_GRANTED, NULL, rsbac_attribute_value_t::owner, rsbac_target_id_t::process, R_CHANGE_OWNER, R_CLONE, R_CREATE, R_EXECUTE, RC, rsbac_attribute_value_t::rc_def_role, RC_default_root_dir_force_role, RC_default_root_dir_initial_role, rsbac_attribute_value_t::rc_force_role, rsbac_attribute_value_t::rc_initial_role, rsbac_attribute_value_t::rc_role, RC_role_inherit_parent, RC_role_inherit_process, RC_role_inherit_up_mixed, RC_role_inherit_user, RC_role_max_value, RC_role_min_special, RC_role_use_force_role, rsbac_attribute_value_t::rc_type, rsbac_attribute_value_t::rc_type_fd, RC_type_inherit_parent, RC_type_inherit_process, RC_type_no_chown, RC_type_no_create, RC_type_no_execute, RC_type_use_new_role_def_create, RI_def_fd_create_type, RI_def_fd_ind_create_type, RI_def_ipc_create_type, RI_def_process_chown_type, RI_def_process_create_type, RI_def_process_execute_type, rsbac_rc_target_id_t::role, RSBAC_EDECISIONMISMATCH, RSBAC_EINVALIDATTR, RSBAC_EINVALIDVALUE, RSBAC_EREADFAILED, RSBAC_EWRITEFAILED, rsbac_get_attr, RSBAC_RC_GENERAL_ROLE, RSBAC_RC_GENERAL_TYPE, rsbac_rc_get_item(), rsbac_set_attr, RT_ROLE, T_DIR, T_FILE, T_IPC, T_PROCESS, T_USER, TRUE, rsbac_rc_target_id_t::type, rsbac_rc_item_value_t::type_id, and rsbac_target_id_t::user.

Referenced by rsbac_adf_set_attr().

enum rsbac_adf_req_ret_t rsbac_rc_check_type_comp enum rsbac_target_t  target,
rsbac_rc_type_id_t  type,
enum rsbac_adf_request_t  request,
rsbac_pid_t  caller_pid
 

Definition at line 332 of file rc_main.c.

References A_rc_role, FALSE, get_rc_special_right_name(), GRANTED, NOT_GRANTED, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, RC_type_max_value, RCR_ASSIGN, RI_type_comp_dev, RI_type_comp_fd, RI_type_comp_group, RI_type_comp_ipc, RI_type_comp_netdev, RI_type_comp_netobj, RI_type_comp_nettemp, RI_type_comp_process, RI_type_comp_user, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_rc_check_comp(), T_DEV, T_DIR, T_FD, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SYMLINK, T_USER, and rsbac_rc_target_id_t::type.

Referenced by rsbac_adf_request_rc(), rsbac_rc_sys_copy_type(), rsbac_rc_sys_get_item(), and rsbac_rc_sys_set_item().

int rsbac_rc_test_admin_roles rsbac_rc_role_id_t  t_role,
rsbac_boolean_t  modify
 

Definition at line 230 of file rc_main.c.

References A_rc_role, rsbac_target_id_t::process, R_NONE, RC, rsbac_attribute_value_t::rc_role, RC_role_max_value, RI_admin_roles, RI_assign_roles, rsbac_rc_target_id_t::role, RSBAC_EINVALIDVALUE, RSBAC_EREADFAILED, rsbac_get_attr, rsbac_rc_check_comp(), T_PROCESS, and TRUE.

Referenced by rsbac_rc_sys_copy_role(), rsbac_rc_sys_get_item(), and rsbac_rc_sys_set_item().

int rsbac_rc_test_assign_roles enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_attribute_t  attr,
rsbac_rc_role_id_t  t_role
 

Definition at line 273 of file rc_main.c.

References A_rc_role, rsbac_target_id_t::process, R_NONE, RC, rsbac_attribute_value_t::rc_role, RC_role_inherit_user, RC_role_max_value, RI_assign_roles, rsbac_rc_target_id_t::role, RSBAC_EINVALIDVALUE, RSBAC_EREADFAILED, rsbac_get_attr, rsbac_rc_check_comp(), T_NONE, T_PROCESS, and TRUE.

Referenced by rsbac_adf_request_rc().

int rsbac_rc_test_role_admin rsbac_boolean_t  modify  ) 
 

Definition at line 454 of file rc_main.c.

References A_rc_role, rsbac_rc_item_value_t::admin_type, NULL, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, RC_role_admin, RC_system_admin, RI_admin_type, rsbac_rc_target_id_t::role, RSBAC_EREADFAILED, rsbac_get_attr, rsbac_rc_get_item(), RT_ROLE, T_PROCESS, and TRUE.

Referenced by rsbac_adf_request_rc(), rsbac_rc_sys_copy_role(), rsbac_rc_sys_copy_type(), rsbac_rc_sys_get_item(), and rsbac_rc_sys_set_item().


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