getname.c File Reference

#include <rsbac/types.h>
#include <rsbac/getname.h>
#include <rsbac/helpers.h>
#include <rsbac/error.h>
#include <rsbac/pax_getname.h>
#include <string.h>
#include <errno.h>

Go to the source code of this file.

Functions

char * get_request_name (char *request_name, enum rsbac_adf_request_t request)
enum rsbac_adf_request_t get_request_nr (const char *request_name)
char * get_result_name (char *res_name, enum rsbac_adf_req_ret_t res)
enum rsbac_adf_req_ret_t get_result_nr (const char *res_name)
enum rsbac_switch_target_t get_attr_module (enum rsbac_attribute_t attr)
char * get_attribute_name (char *attr_name, enum rsbac_attribute_t attr)
enum rsbac_attribute_t get_attribute_nr (const char *attr_name)
char * get_attribute_value_name (char *attr_val_name, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *attr_val_p)
char * get_scd_type_name (char *res_name, enum rsbac_scd_type_t res)
enum rsbac_scd_type_t get_scd_type_nr (const char *res_name)
char * get_target_name (char *target_type_name, enum rsbac_target_t target, char *target_id_name, union rsbac_target_id_t tid)
char * get_target_name_only (char *target_type_name, enum rsbac_target_t target)
enum rsbac_target_t get_target_nr (const char *target_name)
char * get_ipc_target_name (char *ipc_name, enum rsbac_ipc_type_t target)
enum rsbac_ipc_type_t get_ipc_target_nr (const char *ipc_name)
char * get_switch_target_name (char *switch_name, enum rsbac_switch_target_t target)
enum rsbac_switch_target_t get_switch_target_nr (const char *switch_name)
char * get_error_name (char *error_name, int error)
char * get_attribute_param (char *attr_name, enum rsbac_attribute_t attr)
char * get_log_level_name (char *ll_name, enum rsbac_log_level_t target)
enum rsbac_log_level_t get_log_level_nr (const char *ll_name)

Variables

static char request_list [R_NONE+1][24]
static char result_list [UNDEFINED+1][12]
static rsbac_switch_target_int_t attr_mod_list [A_none+1]
static char attribute_list [A_none+1][23]
static char target_list [T_NONE+1][11]
static char ipc_target_list [I_none+1][7]
static char switch_target_list [SW_NONE+1][12]
static char error_list [RSBAC_EMAX][25]
static char scd_type_list [ST_none+1][17]
static char attribute_param_list [A_none+1][193]
static char log_level_list [LL_invalid+1][9]


Function Documentation

enum rsbac_switch_target_t get_attr_module enum rsbac_attribute_t  attr  ) 
 

Definition at line 622 of file getname.c.

References A_none, attr_mod_list, and SW_NONE.

Referenced by sys_rsbac_get_attr(), sys_rsbac_get_attr_n(), sys_rsbac_set_attr(), and sys_rsbac_set_attr_n().

char* get_attribute_name char *  attr_name,
enum rsbac_attribute_t  attr
 

Definition at line 636 of file getname.c.

References A_none, attribute_list, and NULL.

Referenced by rsbac_adf_request_int(), and rsbac_adf_set_attr().

enum rsbac_attribute_t get_attribute_nr const char *  attr_name  ) 
 

Definition at line 648 of file getname.c.

References A_none, and attribute_list.

char* get_attribute_param char *  attr_name,
enum rsbac_attribute_t  attr
 

Definition at line 1321 of file getname.c.

References A_none, attribute_param_list, and NULL.

char* get_attribute_value_name char *  attr_val_name,
enum rsbac_attribute_t  attr,
union rsbac_attribute_value_t attr_val_p
 

Definition at line 670 of file getname.c.

References A_none, A_pax_flags, get_request_name(), get_switch_target_name(), get_target_name_only(), NULL, rsbac_attribute_value_t::pax_flags, pax_print_flags(), rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, and rsbac_attribute_value_t::u_dummy.

Referenced by rsbac_adf_request_int().

char* get_error_name char *  error_name,
int  error
 

Definition at line 1304 of file getname.c.

References error_list, inttostr(), NULL, RSBAC_EPERM, and RSBAC_ERROR.

Referenced by aci_detach_fd_lists(), acl_detach_fd_lists(), acl_register_fd_lists(), auth_detach_fd_lists(), auth_register_fd_lists(), error_exit(), mac_detach_fd_lists(), mac_register_fd_lists(), register_fd_lists(), registration_error(), rsbac_acl_check_forward(), rsbac_acl_check_right(), rsbac_acl_check_super(), rsbac_acl_sys_add_to_acl_entry(), rsbac_acl_sys_get_mask(), rsbac_acl_sys_get_rights(), rsbac_acl_sys_get_tlist(), rsbac_acl_sys_remove_acl(), rsbac_acl_sys_remove_acl_entry(), rsbac_acl_sys_remove_from_acl_entry(), rsbac_acl_sys_remove_user(), rsbac_acl_sys_set_acl_entry(), rsbac_acl_sys_set_mask(), rsbac_do_init(), rsbac_init_acl(), rsbac_init_auth(), rsbac_init_debug(), rsbac_init_mac(), rsbac_init_um(), rsbac_list_init(), rsbac_list_lol_register(), rsbac_list_register(), rsbac_mount(), rsbac_mount_acl(), rsbac_mount_auth(), rsbac_mount_mac(), and show_error().

char* get_ipc_target_name char *  ipc_name,
enum rsbac_ipc_type_t  target
 

Definition at line 1230 of file getname.c.

References I_none, ipc_target_list, and NULL.

enum rsbac_ipc_type_t get_ipc_target_nr const char *  ipc_name  ) 
 

Definition at line 1242 of file getname.c.

References I_none, and ipc_target_list.

char* get_log_level_name char *  ll_name,
enum rsbac_log_level_t  target
 

Definition at line 1334 of file getname.c.

References LL_invalid, log_level_list, and NULL.

enum rsbac_log_level_t get_log_level_nr const char *  ll_name  ) 
 

Definition at line 1346 of file getname.c.

References LL_invalid, and log_level_list.

char* get_request_name char *  request_name,
enum rsbac_adf_request_t  request
 

Definition at line 564 of file getname.c.

References NULL, R_NONE, and request_list.

Referenced by check_comp_rc_scd(), get_acl_special_right_name(), get_attribute_value_name(), get_rc_special_right_name(), rsbac_acl_check_right(), rsbac_adf_request_int(), rsbac_adf_set_attr(), sys_rsbac_adf_log_switch(), and sys_rsbac_get_adf_log().

enum rsbac_adf_request_t get_request_nr const char *  request_name  ) 
 

Definition at line 576 of file getname.c.

References R_NONE, and request_list.

Referenced by get_acl_special_right_nr(), and get_rc_special_right_nr().

char* get_result_name char *  res_name,
enum rsbac_adf_req_ret_t  res
 

Definition at line 593 of file getname.c.

References NULL, result_list, and UNDEFINED.

Referenced by rsbac_adf_request_int().

enum rsbac_adf_req_ret_t get_result_nr const char *  res_name  ) 
 

Definition at line 605 of file getname.c.

References result_list, and UNDEFINED.

char* get_scd_type_name char *  res_name,
enum rsbac_scd_type_t  res
 

Definition at line 747 of file getname.c.

References NULL, scd_type_list, and ST_none.

Referenced by get_acl_scd_type_name(), get_rc_scd_type_name(), and get_target_name().

enum rsbac_scd_type_t get_scd_type_nr const char *  res_name  ) 
 

Definition at line 759 of file getname.c.

References scd_type_list, and ST_none.

Referenced by get_acl_scd_type_nr(), and get_rc_scd_type_nr().

char* get_switch_target_name char *  switch_name,
enum rsbac_switch_target_t  target
 

Definition at line 1265 of file getname.c.

References NULL, SW_NONE, and switch_target_list.

Referenced by get_attribute_value_name(), and sys_rsbac_switch().

enum rsbac_switch_target_t get_switch_target_nr const char *  switch_name  ) 
 

Definition at line 1277 of file getname.c.

References SW_NONE, and switch_target_list.

char* get_target_name char *  target_type_name,
enum rsbac_target_t  target,
char *  target_id_name,
union rsbac_target_id_t  tid
 

Definition at line 782 of file getname.c.

References D_block, get_scd_type_name(), rsbac_target_id_t::group, I_msg, I_sem, I_shm, rsbac_ipc_t::id, rsbac_ipc_id_t::id_nr, inttostr(), rsbac_target_id_t::ipc, KERNEL_VERSION, rsbac_net_obj_desc_t::local_addr, rsbac_target_id_t::netdev, rsbac_target_id_t::netobj, rsbac_target_id_t::nettemp, NIPQUAD, NULL, rsbac_target_id_t::process, rsbac_net_obj_desc_t::remote_addr, rsbac_get_full_path(), rsbac_get_net_family_name(), rsbac_get_net_protocol_name(), rsbac_get_net_type_name(), RSBAC_IFNAMSIZ, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_min, rsbac_target_id_t::scd, rsbac_net_obj_desc_t::sock_p, T_DEV, T_DIR, T_FD, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_NETTEMP_NT, T_NONE, T_PROCESS, T_SCD, T_SYMLINK, T_USER, rsbac_ipc_t::type, ulongtostr(), and rsbac_target_id_t::user.

Referenced by auto_read_attr(), auto_read_write_attr(), auto_write_attr(), rsbac_acl_check_right(), rsbac_acl_sys_add_to_acl_entry(), rsbac_acl_sys_remove_acl(), rsbac_acl_sys_remove_acl_entry(), rsbac_acl_sys_remove_from_acl_entry(), rsbac_acl_sys_set_acl_entry(), rsbac_acl_sys_set_mask(), rsbac_adf_request_int(), and rsbac_adf_set_attr().

char* get_target_name_only char *  target_type_name,
enum rsbac_target_t  target
 

Definition at line 1169 of file getname.c.

References NULL, T_DEV, T_DIR, T_FD, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_NETTEMP_NT, T_NONE, T_PROCESS, T_SCD, T_SYMLINK, and T_USER.

Referenced by check_comp_rc(), get_attribute_value_name(), and rsbac_rc_sys_copy_type().

enum rsbac_target_t get_target_nr const char *  target_name  ) 
 

Definition at line 1214 of file getname.c.

References T_NONE, and target_list.


Variable Documentation

rsbac_switch_target_int_t attr_mod_list[A_none+1] [static]
 

Definition at line 87 of file getname.c.

Referenced by get_attr_module().

char attribute_list[A_none+1][23] [static]
 

Definition at line 215 of file getname.c.

Referenced by get_attribute_name(), and get_attribute_nr().

char attribute_param_list[A_none+1][193] [static]
 

Definition at line 447 of file getname.c.

Referenced by get_attribute_param().

char error_list[RSBAC_EMAX][25] [static]
 

Definition at line 390 of file getname.c.

Referenced by get_error_name().

char ipc_target_list[I_none+1][7] [static]
 

Initial value:

 {
                          "sem",
                          "msg",
                          "shm",
                          "none" }

Definition at line 362 of file getname.c.

Referenced by get_ipc_target_name(), and get_ipc_target_nr().

char log_level_list[LL_invalid+1][9] [static]
 

Initial value:

 {
                          "none",
                          "denied",
                          "full",
                          "request",
                          "invalid!" }

Definition at line 549 of file getname.c.

Referenced by get_log_level_name(), and get_log_level_nr().

char request_list[R_NONE+1][24] [static]
 

Definition at line 30 of file getname.c.

Referenced by get_request_name(), and get_request_nr().

char result_list[UNDEFINED+1][12] [static]
 

Initial value:

 {
                         "NOT_GRANTED",
                         "GRANTED",
                         "DO_NOT_CARE",
                         "UNDEFINED" }

Definition at line 81 of file getname.c.

Referenced by get_result_name(), and get_result_nr().

char scd_type_list[ST_none+1][17] [static]
 

Initial value:

 {
                          "time_strucs",
                          "clock",
                          "host_id",
                          "net_id",
                          "ioports",
                          "rlimit",
                          "swap",
                          "syslog",
                          "rsbac",
                          "rsbac_log",
                          "other",
                          "kmem",
                          "network",
                          "firewall",
                          "priority",
                          "sysfs",
                          "rsbac_remote_log",
                          "none" }

Definition at line 424 of file getname.c.

Referenced by get_scd_type_name(), and get_scd_type_nr().

char switch_target_list[SW_NONE+1][12] [static]
 

Initial value:

 {
                          "GEN",
                          "MAC",
                          "FC",
                          "SIM",
                          "PM",
                          "DAZ",
                          "FF",
                          "RC",
                          "AUTH",
                          "REG",
                          "ACL",
                          "CAP",
                          "JAIL",
                          "RES",
                          "PAX",
                          "SOFTMODE",
                          "DAC_DISABLE",
                          "UM",
                          "FREEZE",
                          "NONE" }

Definition at line 368 of file getname.c.

Referenced by get_switch_target_name(), and get_switch_target_nr().

char target_list[T_NONE+1][11] [static]
 

Initial value:

 {
                          "FILE",
                          "DIR",
                          "FIFO",
                          "SYMLINK",
                          "DEV",
                          "IPC",
                          "SCD",
                          "USER",
                          "PROCESS",
                          "NETDEV",
                          "NETTEMP",
                          "NETOBJ",
                          "NETTEMP_NT",
                          "GROUP",
                          "FD",
                          "NONE" }

Definition at line 344 of file getname.c.

Referenced by get_target_nr().


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