rc.h File Reference

#include <linux/init.h>
#include <rsbac/rc_types.h>

Go to the source code of this file.

Functions

int rsbac_init_rc (void) __init
int rsbac_rc_get_boot_role (rsbac_rc_role_id_t *role_p) __init
int rsbac_stats_rc (void)
int rsbac_rc_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_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_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_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)
rsbac_boolean_t rsbac_rc_check_comp (rsbac_rc_role_id_t role, union rsbac_rc_target_id_t subtid, enum rsbac_rc_item_t item, enum rsbac_rc_special_rights_t right)
rsbac_boolean_t rsbac_rc_role_exists (rsbac_list_ta_number_t ta_number, rsbac_rc_role_id_t role)
rsbac_boolean_t rsbac_rc_type_exists (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, rsbac_rc_type_id_t type)
int rsbac_rc_get_list (rsbac_list_ta_number_t ta_number, enum rsbac_rc_target_t target, union rsbac_rc_target_id_t tid, enum rsbac_rc_item_t item, __u32 **array_pp, rsbac_time_t **ttl_array_pp)


Function Documentation

int rsbac_init_rc void   ) 
 

Definition at line 372 of file rc_data_structures.c.

References rsbac_list_lol_info_t::data_size, rsbac_list_info_t::data_size, rsbac_list_lol_info_t::desc_size, rsbac_list_info_t::desc_size, rsbac_list_lol_info_t::key, rsbac_list_info_t::key, rsbac_list_lol_info_t::max_age, rsbac_list_info_t::max_age, name, rsbac_rc_type_fd_entry_t::name, rsbac_rc_type_fd_entry_t::need_secdel, NULL, proc_rsbac_root_p, R_ADD_TO_KERNEL, R_GET_STATUS_DATA, R_MAP_EXEC, R_MODIFY_PERMISSIONS_DATA, R_MODIFY_SYSTEM_DATA, R_MOUNT, R_REMOVE_FROM_KERNEL, R_SEARCH, R_SHUTDOWN, R_SWITCH_LOG, R_SWITCH_MODULE, R_UMOUNT, registration_error(), role_adr_handle, role_asr_handle, role_dfdc_handle, role_get_conv(), role_handle, role_rc_handle, role_tcdv_handle, role_tcfd_handle, role_tcgr_handle, role_tcip_handle, role_tcnd_handle, role_tcno_handle, role_tcnt_handle, role_tcpr_handle, role_tcsc_handle, role_tcus_handle, RSBAC_DEV_REQUEST_VECTOR, RSBAC_EREINIT, RSBAC_EXECUTE_REQUEST_VECTOR, RSBAC_FD_REQUEST_VECTOR, RSBAC_GROUP_REQUEST_VECTOR, RSBAC_IPC_REQUEST_VECTOR, rsbac_is_initialized(), rsbac_kfree(), rsbac_kmalloc(), rsbac_list_add(), RSBAC_LIST_BACKUP, rsbac_list_compare_u32(), rsbac_list_count(), RSBAC_LIST_DEF_DATA, RSBAC_LIST_DEF_SUBDATA, rsbac_list_exist(), rsbac_list_lol_add(), rsbac_list_lol_get_all_desc(), rsbac_list_lol_register(), rsbac_list_lol_subadd(), rsbac_list_lol_subexist(), RSBAC_LIST_PERSIST, rsbac_list_register(), RSBAC_LIST_VERSION, RSBAC_MAXNAMELEN, RSBAC_NETDEV_REQUEST_VECTOR, RSBAC_NETOBJ_REQUEST_VECTOR, RSBAC_NETTEMP_REQUEST_VECTOR, rsbac_no_defaults, RSBAC_PROCESS_REQUEST_VECTOR, RSBAC_RC_AUDITOR_ROLE, RSBAC_RC_AUDITOR_ROLE_ENTRY, RSBAC_RC_BOOT_ROLE, RSBAC_RC_BOOT_ROLE_ENTRY, RSBAC_RC_DEFAULT_RIGHTS_VECTOR, RSBAC_RC_GENERAL_ROLE, RSBAC_RC_GENERAL_ROLE_ENTRY, RSBAC_RC_GENERAL_TYPE, RSBAC_RC_NAME_LEN, RSBAC_RC_RIGHTS_VECTOR, RSBAC_RC_ROLE_ADMIN_ROLE, RSBAC_RC_ROLE_ADMIN_ROLE_ENTRY, RSBAC_RC_SEC_TYPE, RSBAC_RC_SPECIAL_RIGHTS_VECTOR, RSBAC_RC_SYS_TYPE, RSBAC_RC_SYSTEM_ADMIN_ROLE, RSBAC_RC_SYSTEM_ADMIN_ROLE_ENTRY, RSBAC_READ_REQUEST_VECTOR, RSBAC_READ_WRITE_REQUEST_VECTOR, RSBAC_REQUEST_VECTOR, RSBAC_SCD_REQUEST_VECTOR, RSBAC_SECURITY_REQUEST_VECTOR, RSBAC_SYSTEM_REQUEST_VECTOR, RSBAC_USER_REQUEST_VECTOR, rsbac_vfree, RST_auth_administration, ST_firewall, ST_ioports, ST_network, ST_none, ST_other, ST_rlimit, ST_rsbac, ST_rsbaclog, ST_sysfs, ST_time_strucs, rsbac_list_lol_info_t::subdata_size, rsbac_list_lol_info_t::subdesc_size, tcfd_get_conv(), tcfd_get_subconv(), type_dev_handle, type_fd_handle, type_group_handle, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, type_user_handle, rsbac_list_lol_info_t::version, and rsbac_list_info_t::version.

Referenced by rsbac_do_init().

rsbac_boolean_t rsbac_rc_check_comp rsbac_rc_role_id_t  role,
union rsbac_rc_target_id_t  subtid,
enum rsbac_rc_item_t  item,
enum rsbac_rc_special_rights_t  right
 

Definition at line 2555 of file rc_data_structures.c.

References FALSE, RC_role_max_value, RI_admin_roles, RI_assign_roles, 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, rsbac_rc_target_id_t::role, role_adr_handle, role_asr_handle, role_rc_handle, role_tcdv_handle, role_tcfd_handle, role_tcgr_handle, role_tcip_handle, role_tcnd_handle, role_tcno_handle, role_tcnt_handle, role_tcpr_handle, role_tcsc_handle, role_tcus_handle, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), rsbac_list_lol_get_subdata(), rsbac_list_lol_subexist(), RSBAC_RC_RIGHTS_VECTOR, TRUE, and rsbac_rc_target_id_t::type.

Referenced by check_comp_rc(), check_comp_rc_scd(), rsbac_adf_request_rc(), rsbac_rc_check_type_comp(), rsbac_rc_sys_change_role(), rsbac_rc_sys_set_item(), rsbac_rc_test_admin_roles(), and rsbac_rc_test_assign_roles().

int rsbac_rc_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 1870 of file rc_data_structures.c.

int rsbac_rc_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 2083 of file rc_data_structures.c.

References NULL, RC_type_max_value, role_handle, role_tcdv_handle, role_tcfd_handle, role_tcgr_handle, role_tcip_handle, role_tcnd_handle, role_tcno_handle, role_tcnt_handle, role_tcpr_handle, role_tcus_handle, RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), RSBAC_RC_NAME_LEN, rsbac_ta_list_add_ttl(), rsbac_ta_list_get_all_desc(), rsbac_ta_list_get_data_ttl(), rsbac_ta_list_lol_get_subdata_ttl(), rsbac_ta_list_lol_subadd_ttl(), rsbac_ta_list_lol_subremove_from_all(), rsbac_vfree, 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, type_dev_handle, type_fd_handle, type_group_handle, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, and type_user_handle.

int rsbac_rc_get_boot_role rsbac_rc_role_id_t role_p  ) 
 

Definition at line 1808 of file rc_data_structures.c.

References role_handle, RSBAC_ENOTFOUND, rsbac_list_get_desc(), and rsbac_rc_role_compare_data().

Referenced by rsbac_init().

int rsbac_rc_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 2210 of file rc_data_structures.c.

References rsbac_rc_role_entry_t::admin_type, rsbac_rc_item_value_t::admin_type, rsbac_rc_role_entry_t::boot_role, rsbac_rc_item_value_t::boot_role, rsbac_rc_item_value_t::comp, rsbac_rc_role_entry_t::def_fd_create_type, rsbac_rc_role_entry_t::def_group_create_type, rsbac_rc_role_entry_t::def_ipc_create_type, rsbac_rc_role_entry_t::def_process_chown_type, rsbac_rc_role_entry_t::def_process_create_type, rsbac_rc_role_entry_t::def_process_execute_type, rsbac_rc_role_entry_t::def_user_create_type, FALSE, get_rc_scd_type_name(), rsbac_rc_type_fd_entry_t::name, rsbac_rc_role_entry_t::name, rsbac_rc_item_value_t::name, rsbac_rc_type_fd_entry_t::need_secdel, rsbac_rc_item_value_t::need_secdel, NULL, RC_role_max_value, RC_type_max_value, 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_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_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_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_item_value_t::rights, rsbac_rc_target_id_t::role, role_adr_handle, role_asr_handle, role_dfdc_handle, role_handle, role_rc_handle, role_tcdv_handle, role_tcfd_handle, role_tcgr_handle, role_tcip_handle, role_tcnd_handle, role_tcno_handle, role_tcnt_handle, role_tcpr_handle, role_tcsc_handle, role_tcus_handle, RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, RSBAC_ENOMEM, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, RSBAC_RC_DEFAULT_RIGHTS_VECTOR, RSBAC_RC_NAME_LEN, rsbac_ta_list_get_data_ttl(), rsbac_ta_list_lol_get_subdata_ttl(), RT_ROLE, RT_TYPE, TRUE, rsbac_rc_target_id_t::type, type_dev_handle, type_fd_handle, type_group_handle, rsbac_rc_item_value_t::type_id, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, and type_user_handle.

int rsbac_rc_get_list rsbac_list_ta_number_t  ta_number,
enum rsbac_rc_target_t  target,
union rsbac_rc_target_id_t  tid,
enum rsbac_rc_item_t  item,
__u32 **  array_pp,
rsbac_time_t **  ttl_array_pp
 

Definition at line 2683 of file rc_data_structures.c.

References NULL, RI_admin_roles, RI_assign_roles, RI_def_fd_ind_create_type, RI_name, 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_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_user_name, rsbac_rc_target_id_t::role, role_adr_handle, role_asr_handle, role_dfdc_handle, role_handle, role_rc_handle, role_tcdv_handle, role_tcfd_handle, role_tcgr_handle, role_tcip_handle, role_tcnd_handle, role_tcno_handle, role_tcnt_handle, role_tcpr_handle, role_tcsc_handle, role_tcus_handle, RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, RSBAC_ENOTFOUND, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), rsbac_ta_list_count(), rsbac_ta_list_get_all_desc(), rsbac_ta_list_lol_get_all_subdesc_ttl(), rsbac_ta_list_lol_subcount(), RT_ROLE, RT_TYPE, type_dev_handle, type_fd_handle, type_group_handle, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, and type_user_handle.

rsbac_boolean_t rsbac_rc_role_exists rsbac_list_ta_number_t  ta_number,
rsbac_rc_role_id_t  role
 

Definition at line 1824 of file rc_data_structures.c.

References role_handle, and rsbac_ta_list_exist().

Referenced by rsbac_rc_sys_copy_role().

int rsbac_rc_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 2938 of file rc_data_structures.c.

References ACLS_ROLE, rsbac_rc_item_value_t::admin_type, rsbac_rc_role_entry_t::admin_type, rsbac_rc_item_value_t::boot_role, rsbac_rc_role_entry_t::boot_role, rsbac_rc_item_value_t::comp, rsbac_rc_role_entry_t::def_fd_create_type, rsbac_rc_role_entry_t::def_group_create_type, rsbac_rc_role_entry_t::def_ipc_create_type, rsbac_rc_role_entry_t::def_process_chown_type, rsbac_rc_role_entry_t::def_process_create_type, rsbac_rc_role_entry_t::def_process_execute_type, rsbac_rc_role_entry_t::def_user_create_type, rsbac_rc_role_entry_t::name, rsbac_rc_item_value_t::name, rsbac_rc_item_value_t::need_secdel, rsbac_rc_type_fd_entry_t::need_secdel, NULL, RC_role_max_value, RC_type_max_value, RC_type_min_special, 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_user_name, RI_type_user_remove, rsbac_rc_item_value_t::rights, rsbac_rc_target_id_t::role, role_adr_handle, role_asr_handle, role_dfdc_handle, role_handle, role_rc_handle, role_tcdv_handle, role_tcfd_handle, role_tcgr_handle, role_tcip_handle, role_tcnd_handle, role_tcno_handle, role_tcnt_handle, role_tcpr_handle, role_tcsc_handle, role_tcus_handle, rsbac_acl_remove_subject(), RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), RSBAC_RC_NAME_LEN, rsbac_ta_list_add_ttl(), rsbac_ta_list_exist(), rsbac_ta_list_get_data_ttl(), rsbac_ta_list_lol_remove(), rsbac_ta_list_lol_subadd_ttl(), rsbac_ta_list_lol_subremove(), rsbac_ta_list_lol_subremove_from_all(), rsbac_ta_list_remove(), RST_min, RST_none, RT_ROLE, RT_TYPE, ST_none, rsbac_acl_entry_desc_t::subj_id, rsbac_acl_entry_desc_t::subj_type, rsbac_rc_target_id_t::type, type_dev_handle, type_fd_handle, type_group_handle, rsbac_rc_item_value_t::type_id, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, and type_user_handle.

rsbac_boolean_t rsbac_rc_type_exists rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
rsbac_rc_type_id_t  type
 

Definition at line 1831 of file rc_data_structures.c.

References FALSE, rsbac_ta_list_exist(), ST_none, T_DEV, T_DIR, T_FD, T_FIFO, T_FILE, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SCD, T_SYMLINK, T_USER, TRUE, type_dev_handle, type_fd_handle, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, and type_user_handle.

Referenced by rsbac_rc_sys_copy_type().

int rsbac_stats_rc void   ) 
 

Definition at line 1754 of file rc_data_structures.c.

References role_handle, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), rsbac_list_count(), type_dev_handle, type_fd_handle, type_group_handle, type_ipc_handle, type_netdev_handle, type_netobj_handle, type_nettemp_handle, type_process_handle, and type_user_handle.

Referenced by rsbac_stats().


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