mac_main.c File Reference

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

Go to the source code of this file.

Functions

static enum rsbac_adf_req_ret_t mac_check_role (rsbac_uid_t owner, enum rsbac_system_role_t role)
static enum rsbac_adf_req_ret_t auto_write_attr (rsbac_pid_t pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t t_level_attr, enum rsbac_attribute_t t_cat_attr, rsbac_boolean_t set_level)
static enum rsbac_adf_req_ret_t auto_write (rsbac_pid_t pid, enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_boolean_t set_level)
static enum rsbac_adf_req_ret_t auto_read_attr (rsbac_pid_t pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t t_level_attr, enum rsbac_attribute_t t_cat_attr, rsbac_boolean_t set_level)
static enum rsbac_adf_req_ret_t auto_read (rsbac_pid_t pid, enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_boolean_t set_level)
static enum rsbac_adf_req_ret_t auto_read_write_attr (rsbac_pid_t pid, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t t_level_attr, enum rsbac_attribute_t t_cat_attr, rsbac_boolean_t set_level)
static enum rsbac_adf_req_ret_t auto_read_write (rsbac_pid_t pid, enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_boolean_t set_level)
enum rsbac_adf_req_ret_t rsbac_adf_request_mac (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_mac (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 auto_read rsbac_pid_t  pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_boolean_t  set_level
[static]
 

Definition at line 1793 of file mac_main.c.

References A_mac_categories, A_security_level, and auto_read_attr().

Referenced by rsbac_adf_request_mac(), and rsbac_adf_set_attr_mac().

static enum rsbac_adf_req_ret_t auto_read_attr rsbac_pid_t  pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_attribute_t  t_level_attr,
enum rsbac_attribute_t  t_cat_attr,
rsbac_boolean_t  set_level
[static]
 

Definition at line 1100 of file mac_main.c.

References A_current_sec_level, A_mac_categories, A_mac_curr_categories, A_mac_file_flags, A_mac_process_flags, A_max_read_categories, A_max_read_open, A_min_write_categories, A_min_write_open, A_none, A_security_level, rsbac_attribute_value_t::current_sec_level, FALSE, get_target_name(), GRANTED, MAC, MAC_auto, rsbac_attribute_value_t::mac_categories, rsbac_attribute_value_t::mac_file_flags, MAC_override, rsbac_attribute_value_t::mac_process_flags, MAC_read_up, MAC_trusted, rsbac_attribute_value_t::max_read_open, NOT_GRANTED, rsbac_target_id_t::process, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_set_attr, rsbac_attribute_value_t::security_level, T_DIR, T_FIFO, T_FILE, T_PROCESS, T_SYMLINK, TRUE, and u64tostrmac().

Referenced by auto_read(), rsbac_adf_request_mac(), and rsbac_adf_set_attr_mac().

static enum rsbac_adf_req_ret_t auto_read_write rsbac_pid_t  pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_boolean_t  set_level
[static]
 

Definition at line 3026 of file mac_main.c.

References A_mac_categories, A_security_level, and auto_read_write_attr().

Referenced by rsbac_adf_request_mac(), and rsbac_adf_set_attr_mac().

static enum rsbac_adf_req_ret_t auto_read_write_attr rsbac_pid_t  pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_attribute_t  t_level_attr,
enum rsbac_attribute_t  t_cat_attr,
rsbac_boolean_t  set_level
[static]
 

Definition at line 1811 of file mac_main.c.

References A_current_sec_level, A_mac_categories, A_mac_curr_categories, A_mac_file_flags, A_mac_min_categories, A_mac_process_flags, A_max_read_categories, A_max_read_open, A_min_security_level, A_min_write_categories, A_min_write_open, A_none, A_security_level, rsbac_attribute_value_t::current_sec_level, FALSE, get_target_name(), GRANTED, MAC, MAC_auto, rsbac_attribute_value_t::mac_categories, rsbac_attribute_value_t::mac_file_flags, MAC_override, rsbac_attribute_value_t::mac_process_flags, MAC_read_up, MAC_trusted, MAC_write_down, MAC_write_up, rsbac_attribute_value_t::max_read_open, rsbac_attribute_value_t::min_write_open, NOT_GRANTED, rsbac_target_id_t::process, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_set_attr, rsbac_attribute_value_t::security_level, T_DIR, T_FIFO, T_FILE, T_PROCESS, T_SYMLINK, TRUE, and u64tostrmac().

Referenced by auto_read_write(), rsbac_adf_request_mac(), and rsbac_adf_set_attr_mac().

static enum rsbac_adf_req_ret_t auto_write rsbac_pid_t  pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_boolean_t  set_level
[static]
 

Definition at line 1083 of file mac_main.c.

References A_mac_categories, A_security_level, and auto_write_attr().

Referenced by rsbac_adf_request_mac(), and rsbac_adf_set_attr_mac().

static enum rsbac_adf_req_ret_t auto_write_attr rsbac_pid_t  pid,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_attribute_t  t_level_attr,
enum rsbac_attribute_t  t_cat_attr,
rsbac_boolean_t  set_level
[static]
 

Definition at line 92 of file mac_main.c.

References A_current_sec_level, A_mac_categories, A_mac_curr_categories, A_mac_file_flags, A_mac_min_categories, A_mac_process_flags, A_max_read_categories, A_max_read_open, A_min_security_level, A_min_write_categories, A_min_write_open, A_none, A_security_level, rsbac_attribute_value_t::current_sec_level, FALSE, get_target_name(), GRANTED, MAC, MAC_auto, rsbac_attribute_value_t::mac_categories, rsbac_attribute_value_t::mac_file_flags, MAC_override, rsbac_attribute_value_t::mac_process_flags, MAC_trusted, MAC_write_down, MAC_write_up, rsbac_attribute_value_t::min_write_open, NOT_GRANTED, rsbac_target_id_t::process, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_set_attr, rsbac_attribute_value_t::security_level, T_DIR, T_FIFO, T_FILE, T_PROCESS, T_SYMLINK, TRUE, and u64tostrmac().

Referenced by auto_write(), rsbac_adf_request_mac(), and rsbac_adf_set_attr_mac().

static enum rsbac_adf_req_ret_t mac_check_role rsbac_uid_t  owner,
enum rsbac_system_role_t  role
[static]
 

Definition at line 33 of file mac_main.c.

References A_mac_role, GRANTED, MAC, NOT_GRANTED, rsbac_get_attr, rsbac_attribute_value_t::system_role, T_USER, TRUE, and rsbac_target_id_t::user.

Referenced by rsbac_adf_request_mac().

enum rsbac_adf_req_ret_t rsbac_adf_request_mac 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 3044 of file mac_main.c.

References A_audit_uid, A_auid_exempt, A_auth_learn, A_auth_may_set_cap, A_auth_may_setuid, A_current_sec_level, A_fake_root_uid, A_initial_security_level, A_linux_dac_disable, A_local_mac_categories, A_local_sec_level, A_log_array_high, A_log_array_low, A_log_program_based, A_log_user_based, A_mac_auto, A_mac_categories, A_mac_check, A_mac_curr_categories, A_mac_file_flags, A_mac_initial_categories, A_mac_min_categories, A_mac_process_flags, A_mac_prop_trusted, A_mac_role, A_mac_user_flags, A_max_read_categories, A_max_read_open, A_min_security_level, A_min_write_categories, A_min_write_open, A_none, A_pseudo, A_remote_mac_categories, A_remote_sec_level, A_security_level, A_symlink_add_rc_role, A_symlink_add_uid, A_system_role, AUTH, auto_read(), auto_read_attr(), auto_read_write(), auto_read_write_attr(), auto_write(), auto_write_attr(), DO_NOT_CARE, FALSE, FREEZE, GRANTED, MAC, rsbac_attribute_value_t::mac_check, mac_check_role(), NOT_GRANTED, 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_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_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, rsbac_get_attr, rsbac_set_attr, rsbac_target_id_t::scd, SOFTMODE, SR_administrator, SR_auditor, SR_security_officer, ST_ioports, ST_rlimit, ST_rsbac, ST_rsbac_remote_log, ST_rsbaclog, rsbac_attribute_value_t::system_role, 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, UNDEFINED, and rsbac_target_id_t::user.

Referenced by rsbac_adf_request_int().

int rsbac_adf_set_attr_mac 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 4175 of file mac_main.c.

References A_current_sec_level, A_initial_security_level, A_local_mac_categories, A_local_sec_level, A_mac_auto, A_mac_categories, A_mac_check, A_mac_curr_categories, A_mac_initial_categories, A_mac_min_categories, A_mac_process_flags, A_mac_prop_trusted, A_mac_user_flags, A_max_read_categories, A_max_read_open, A_min_security_level, A_min_write_categories, A_min_write_open, A_none, A_remote_mac_categories, A_remote_sec_level, A_security_level, auto_read(), auto_read_attr(), auto_read_write(), auto_read_write_attr(), auto_write(), auto_write_attr(), DO_NOT_CARE, FALSE, GRANTED, MAC, MAC_allow_auto, rsbac_attribute_value_t::mac_auto, MAC_auto, rsbac_attribute_value_t::mac_categories, rsbac_attribute_value_t::mac_check, rsbac_attribute_value_t::mac_process_flags, MAC_program_auto, rsbac_attribute_value_t::mac_prop_trusted, MAC_trusted, rsbac_attribute_value_t::mac_user_flags, rsbac_attribute_value_t::max_read_open, rsbac_attribute_value_t::min_write_open, rsbac_attribute_value_t::owner, rsbac_target_id_t::process, R_ACCEPT, R_APPEND_OPEN, R_BIND, R_CHANGE_OWNER, R_CLONE, R_CONNECT, R_CREATE, R_DELETE, R_EXECUTE, R_LISTEN, R_MOUNT, R_READ, R_READ_OPEN, R_READ_WRITE_OPEN, R_RECEIVE, R_SEARCH, R_SEND, R_TRACE, R_WRITE, R_WRITE_OPEN, RSBAC_EDECISIONMISMATCH, RSBAC_EINVALIDATTR, RSBAC_EREADFAILED, RSBAC_EWRITEFAILED, rsbac_get_attr, rsbac_mac_copy_fp_truset(), rsbac_mac_copy_pp_truset(), RSBAC_MAC_MAX_CAT_VECTOR, RSBAC_MAC_MIN_CAT_VECTOR, RSBAC_MAC_P_FLAGS, rsbac_mac_p_truset_member(), rsbac_set_attr, rsbac_attribute_value_t::security_level, SL_max, SL_min, T_DEV, T_DIR, T_FIFO, T_FILE, T_IPC, T_NETOBJ, T_PROCESS, T_SYMLINK, T_USER, TRUE, and rsbac_target_id_t::user.

Referenced by rsbac_adf_set_attr().


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