rc_syscalls.c File Reference

#include <linux/string.h>
#include <rsbac/types.h>
#include <rsbac/aci.h>
#include <rsbac/rc.h>
#include <rsbac/adf_main.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>

Go to the source code of this file.

Functions

int rsbac_rc_test_role_admin (rsbac_boolean_t modify)
int rsbac_rc_test_admin_roles (rsbac_rc_role_id_t t_role, rsbac_boolean_t modify)
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_sys_copy_role (rsbac_list_ta_number_t ta_number, rsbac_rc_role_id_t from_role, rsbac_rc_role_id_t to_role)
int rsbac_rc_sys_copy_type (rsbac_list_ta_number_t ta_number, enum rsbac_rc_target_t target, rsbac_rc_type_id_t from_type, rsbac_rc_type_id_t to_type)
int rsbac_rc_sys_get_item (rsbac_list_ta_number_t ta_number, enum rsbac_rc_target_t target, union rsbac_rc_target_id_t tid, union rsbac_rc_target_id_t subtid, enum rsbac_rc_item_t item, union rsbac_rc_item_value_t *value_p, rsbac_time_t *ttl_p)
int rsbac_rc_sys_set_item (rsbac_list_ta_number_t ta_number, enum rsbac_rc_target_t target, union rsbac_rc_target_id_t tid, union rsbac_rc_target_id_t subtid, enum rsbac_rc_item_t item, union rsbac_rc_item_value_t value, rsbac_time_t ttl)
int rsbac_rc_sys_change_role (rsbac_rc_role_id_t role)
int rsbac_rc_sys_get_eff_rights (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_rc_request_vector_t *request_vector, rsbac_time_t *ttl_p)
int rsbac_rc_sys_get_current_role (rsbac_rc_role_id_t *role_p)


Function Documentation

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_sys_change_role rsbac_rc_role_id_t  role  ) 
 

Definition at line 1813 of file rc_syscalls.c.

References A_rc_role, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, RI_role_comp, rsbac_rc_target_id_t::role, RSBAC_EWRITEFAILED, rsbac_get_attr, rsbac_rc_check_comp(), rsbac_set_attr, T_PROCESS, and TRUE.

Referenced by sys_rsbac_rc_change_role().

int rsbac_rc_sys_copy_role rsbac_list_ta_number_t  ta_number,
rsbac_rc_role_id_t  from_role,
rsbac_rc_role_id_t  to_role
 

Definition at line 54 of file rc_syscalls.c.

References RC, rsbac_rc_copy_role(), rsbac_rc_role_exists(), rsbac_rc_test_admin_roles(), rsbac_rc_test_role_admin(), and TRUE.

Referenced by sys_rsbac_rc_copy_role().

int rsbac_rc_sys_copy_type rsbac_list_ta_number_t  ta_number,
enum rsbac_rc_target_t  target,
rsbac_rc_type_id_t  from_type,
rsbac_rc_type_id_t  to_type
 

Definition at line 152 of file rc_syscalls.c.

References FALSE, get_target_name_only(), GRANTED, RC, RCR_ADMIN, RSBAC_EINVALIDTARGET, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_rc_check_type_comp(), rsbac_rc_copy_type(), rsbac_rc_test_role_admin(), rsbac_rc_type_exists(), 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 TRUE.

Referenced by sys_rsbac_rc_copy_type().

int rsbac_rc_sys_get_current_role rsbac_rc_role_id_t role_p  ) 
 

Definition at line 2016 of file rc_syscalls.c.

References A_rc_role, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, RSBAC_EREADFAILED, rsbac_get_attr, T_PROCESS, and TRUE.

Referenced by sys_rsbac_rc_get_current_role().

int rsbac_rc_sys_get_eff_rights rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_rc_request_vector_t request_vector,
rsbac_time_t ttl_p
 

Definition at line 1901 of file rc_syscalls.c.

References A_none, A_rc_role, A_rc_type, A_rc_type_fd, A_rc_type_nt, 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_scd, rsbac_rc_item_value_t::rights, rsbac_rc_target_id_t::role, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_get_attr, rsbac_rc_get_item(), RST_none, RT_ROLE, rsbac_target_id_t::scd, T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SCD, T_SYMLINK, TRUE, and rsbac_rc_target_id_t::type.

Referenced by sys_rsbac_rc_get_eff_rights_n().

int rsbac_rc_sys_get_item rsbac_list_ta_number_t  ta_number,
enum rsbac_rc_target_t  target,
union rsbac_rc_target_id_t  tid,
union rsbac_rc_target_id_t  subtid,
enum rsbac_rc_item_t  item,
union rsbac_rc_item_value_t value_p,
rsbac_time_t ttl_p
 

Definition at line 290 of file rc_syscalls.c.

References FALSE, RC, RCR_ADMIN, RI_name, RI_type_dev_name, RI_type_fd_name, RI_type_fd_need_secdel, RI_type_group_name, RI_type_ipc_name, RI_type_netdev_name, RI_type_netobj_name, RI_type_nettemp_name, RI_type_process_name, RI_type_scd_name, RI_type_user_name, rsbac_rc_target_id_t::role, RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, rsbac_rc_check_type_comp(), rsbac_rc_get_item(), rsbac_rc_test_admin_roles(), rsbac_rc_test_role_admin(), RT_ROLE, RT_TYPE, T_FILE, and rsbac_rc_target_id_t::type.

Referenced by sys_rsbac_rc_get_item().

int rsbac_rc_sys_set_item rsbac_list_ta_number_t  ta_number,
enum rsbac_rc_target_t  target,
union rsbac_rc_target_id_t  tid,
union rsbac_rc_target_id_t  subtid,
enum rsbac_rc_item_t  item,
union rsbac_rc_item_value_t  value,
rsbac_time_t  ttl
 

Definition at line 422 of file rc_syscalls.c.

References A_rc_role, get_rc_item_name(), NOT_GRANTED, NULL, rsbac_target_id_t::process, R_NONE, RC, rsbac_attribute_value_t::rc_role, RCR_ACCESS_CONTROL, RCR_ADMIN, RCR_ASSIGN, RCR_SUPERVISOR, RI_admin_roles, RI_admin_type, RI_assign_roles, RI_boot_role, RI_def_fd_create_type, RI_def_fd_ind_create_type, RI_def_fd_ind_create_type_remove, 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_name, RI_remove_role, RI_role_comp, 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_scd, RI_type_comp_user, RI_type_dev_name, RI_type_dev_remove, RI_type_fd_name, RI_type_fd_need_secdel, RI_type_fd_remove, RI_type_group_name, RI_type_group_remove, RI_type_ipc_name, RI_type_ipc_remove, RI_type_netdev_name, RI_type_netdev_remove, RI_type_netobj_name, RI_type_netobj_remove, RI_type_nettemp_name, RI_type_nettemp_remove, RI_type_process_name, RI_type_process_remove, RI_type_scd_name, RI_type_user_name, RI_type_user_remove, rsbac_rc_item_value_t::rights, rsbac_rc_target_id_t::role, RSBAC_ALL_REQUEST_VECTOR, RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_get_attr, rsbac_rc_check_comp(), rsbac_rc_check_type_comp(), rsbac_rc_get_item(), RSBAC_RC_RIGHTS_VECTOR, rsbac_rc_set_item(), RSBAC_RC_SPECIAL_RIGHTS_VECTOR, rsbac_rc_test_admin_roles(), rsbac_rc_test_role_admin(), RT_ROLE, RT_TYPE, T_DEV, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SCD, T_USER, TRUE, rsbac_rc_target_id_t::type, rsbac_rc_item_value_t::type_id, and UNDEFINED.

Referenced by sys_rsbac_rc_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_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