auth.h File Reference

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

Go to the source code of this file.

Functions

int rsbac_init_auth (void) __init
int rsbac_mount_auth (kdev_t kdev)
int rsbac_umount_auth (kdev_t kdev)
int rsbac_stats_auth (void)
int rsbac_check_auth (int correct, int check_inode)
int rsbac_auth_add_to_p_capset (rsbac_list_ta_number_t ta_number, rsbac_pid_t pid, enum rsbac_auth_cap_type_t cap_type, struct rsbac_auth_cap_range_t cap_range, rsbac_time_t ttl)
int rsbac_auth_add_to_f_capset (rsbac_list_ta_number_t ta_number, rsbac_auth_file_t file, enum rsbac_auth_cap_type_t cap_type, struct rsbac_auth_cap_range_t cap_range, rsbac_time_t ttl)
int rsbac_auth_remove_from_p_capset (rsbac_list_ta_number_t ta_number, rsbac_pid_t pid, enum rsbac_auth_cap_type_t cap_type, struct rsbac_auth_cap_range_t cap_range)
int rsbac_auth_remove_from_f_capset (rsbac_list_ta_number_t ta_number, rsbac_auth_file_t file, enum rsbac_auth_cap_type_t cap_type, struct rsbac_auth_cap_range_t cap_range)
int rsbac_auth_clear_p_capset (rsbac_list_ta_number_t ta_number, rsbac_pid_t pid, enum rsbac_auth_cap_type_t cap_type)
int rsbac_auth_clear_f_capset (rsbac_list_ta_number_t ta_number, rsbac_auth_file_t file, enum rsbac_auth_cap_type_t cap_type)
rsbac_boolean_t rsbac_auth_p_capset_member (rsbac_pid_t pid, enum rsbac_auth_cap_type_t cap_type, rsbac_uid_t member)
int rsbac_auth_remove_p_capsets (rsbac_pid_t pid)
int rsbac_auth_remove_f_capsets (rsbac_auth_file_t file)
int rsbac_auth_copy_fp_capset (rsbac_auth_file_t file, rsbac_pid_t p_cap_set_id)
int rsbac_auth_copy_pp_capset (rsbac_pid_t old_p_set_id, rsbac_pid_t new_p_set_id)
int rsbac_auth_get_f_caplist (rsbac_list_ta_number_t ta_number, rsbac_auth_file_t file, enum rsbac_auth_cap_type_t cap_type, struct rsbac_auth_cap_range_t **caplist_p, rsbac_time_t **ttllist_p)
int rsbac_auth_get_p_caplist (rsbac_list_ta_number_t ta_number, rsbac_pid_t pid, enum rsbac_auth_cap_type_t cap_type, struct rsbac_auth_cap_range_t **caplist_p, rsbac_time_t **ttllist_p)


Function Documentation

int rsbac_auth_add_to_f_capset rsbac_list_ta_number_t  ta_number,
rsbac_auth_file_t  file,
enum rsbac_auth_cap_type_t  cap_type,
struct rsbac_auth_cap_range_t  cap_range,
rsbac_time_t  ttl
 

Definition at line 3370 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, fd_hash(), rsbac_auth_cap_range_t::first, rsbac_auth_device_list_item_t::handles, rsbac_auth_cap_range_t::last, rsbac_auth_device_list_head_t::lock, lookup_device(), NULL, RSBAC_EINVALIDDEV, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_ENOTINITIALIZED, rsbac_get_super_block(), rsbac_is_initialized(), and rsbac_ta_list_lol_subadd_ttl().

Referenced by rsbac_auth_add_f_cap().

int rsbac_auth_add_to_p_capset rsbac_list_ta_number_t  ta_number,
rsbac_pid_t  pid,
enum rsbac_auth_cap_type_t  cap_type,
struct rsbac_auth_cap_range_t  cap_range,
rsbac_time_t  ttl
 

Definition at line 3326 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, rsbac_auth_cap_range_t::first, rsbac_auth_cap_range_t::last, NULL, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), and rsbac_ta_list_lol_subadd_ttl().

Referenced by rsbac_auth_add_p_cap(), and rsbac_replace_auth_cap().

int rsbac_auth_clear_f_capset rsbac_list_ta_number_t  ta_number,
rsbac_auth_file_t  file,
enum rsbac_auth_cap_type_t  cap_type
 

Definition at line 3633 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, fd_hash(), rsbac_auth_device_list_item_t::handles, rsbac_auth_device_list_head_t::lock, lookup_device(), RSBAC_EINVALIDDEV, RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_get_super_block(), rsbac_is_initialized(), and rsbac_ta_list_lol_remove().

Referenced by rsbac_auth_remove_f_capsets().

int rsbac_auth_clear_p_capset rsbac_list_ta_number_t  ta_number,
rsbac_pid_t  pid,
enum rsbac_auth_cap_type_t  cap_type
 

Definition at line 3593 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), and rsbac_ta_list_lol_remove().

Referenced by rsbac_auth_remove_p_capsets().

int rsbac_auth_copy_fp_capset rsbac_auth_file_t  file,
rsbac_pid_t  p_cap_set_id
 

Definition at line 4427 of file auth_data_structures.c.

References copy_fp_cap_set_item(), rsbac_auth_device_list_head_t::lock, lookup_device(), RSBAC_EINVALIDDEV, RSBAC_ENOTINITIALIZED, rsbac_get_super_block(), and rsbac_is_initialized().

Referenced by rsbac_adf_set_attr_auth().

int rsbac_auth_copy_pp_capset rsbac_pid_t  old_p_set_id,
rsbac_pid_t  new_p_set_id
 

Definition at line 4482 of file auth_data_structures.c.

References copy_pp_cap_set_item(), RSBAC_ENOTINITIALIZED, and rsbac_is_initialized().

Referenced by rsbac_adf_set_attr_auth().

int rsbac_auth_get_f_caplist rsbac_list_ta_number_t  ta_number,
rsbac_auth_file_t  file,
enum rsbac_auth_cap_type_t  cap_type,
struct rsbac_auth_cap_range_t **  caplist_p,
rsbac_time_t **  ttllist_p
 

Definition at line 4505 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, fd_hash(), rsbac_auth_device_list_item_t::handles, rsbac_auth_device_list_head_t::lock, lookup_device(), RSBAC_EINVALIDDEV, RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_get_super_block(), rsbac_is_initialized(), and rsbac_ta_list_lol_get_all_subdesc_ttl().

int rsbac_auth_get_p_caplist rsbac_list_ta_number_t  ta_number,
rsbac_pid_t  pid,
enum rsbac_auth_cap_type_t  cap_type,
struct rsbac_auth_cap_range_t **  caplist_p,
rsbac_time_t **  ttllist_p
 

Definition at line 4616 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), and rsbac_ta_list_lol_get_all_subdesc_ttl().

rsbac_boolean_t rsbac_auth_p_capset_member rsbac_pid_t  pid,
enum rsbac_auth_cap_type_t  cap_type,
rsbac_uid_t  member
 

Definition at line 3714 of file auth_data_structures.c.

References A_auth_learn, ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, AUTH, rsbac_attribute_value_t::auth_learn, FALSE, fd_hash(), rsbac_auth_cap_range_t::first, rsbac_auth_device_list_item_t::handles, rsbac_auth_cap_range_t::last, rsbac_auth_device_list_head_t::lock, lookup_device(), NULL, rsbac_target_id_t::process, RSBAC_AUTH_MAX_RANGE_UID, RSBAC_AUTH_OWNER_F_CAP, rsbac_get_attr, rsbac_is_initialized(), rsbac_list_lol_subadd(), rsbac_list_lol_subexist_compare(), single_cap_compare(), T_PROCESS, and TRUE.

Referenced by rsbac_adf_request_auth(), and rsbac_replace_auth_cap().

int rsbac_auth_remove_f_capsets rsbac_auth_file_t  file  ) 
 

Definition at line 4403 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, and rsbac_auth_clear_f_capset().

Referenced by rsbac_adf_set_attr_auth(), and rsbac_ta_remove_target().

int rsbac_auth_remove_from_f_capset rsbac_list_ta_number_t  ta_number,
rsbac_auth_file_t  file,
enum rsbac_auth_cap_type_t  cap_type,
struct rsbac_auth_cap_range_t  cap_range
 

Definition at line 3507 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, fd_hash(), rsbac_auth_cap_range_t::first, rsbac_auth_device_list_item_t::handles, rsbac_auth_cap_range_t::last, rsbac_auth_device_list_head_t::lock, lookup_device(), RSBAC_EINVALIDDEV, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_ENOTINITIALIZED, rsbac_get_super_block(), rsbac_is_initialized(), and rsbac_ta_list_lol_subremove().

Referenced by rsbac_auth_remove_f_cap().

int rsbac_auth_remove_from_p_capset rsbac_list_ta_number_t  ta_number,
rsbac_pid_t  pid,
enum rsbac_auth_cap_type_t  cap_type,
struct rsbac_auth_cap_range_t  cap_range
 

Definition at line 3464 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, rsbac_auth_cap_range_t::first, rsbac_auth_cap_range_t::last, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), and rsbac_ta_list_lol_subremove().

Referenced by rsbac_auth_remove_p_cap(), and rsbac_replace_auth_cap().

int rsbac_auth_remove_p_capsets rsbac_pid_t  pid  ) 
 

Definition at line 4383 of file auth_data_structures.c.

References ACT_eff, ACT_fs, ACT_group_eff, ACT_group_fs, ACT_group_real, ACT_real, and rsbac_auth_clear_p_capset().

Referenced by rsbac_ta_remove_target().

int rsbac_check_auth int  correct,
int  check_inode
 

Definition at line 3039 of file auth_data_structures.c.

References rsbac_auth_device_list_head_t::count, rsbac_auth_device_list_item_t::handles, rsbac_auth_device_list_head_t::head, rsbac_auth_device_list_item_t::id, rsbac_auth_device_list_head_t::lock, rsbac_auth_device_list_item_t::next, NULL, RSBAC_ENOTINITIALIZED, rsbac_get_super_block(), rsbac_is_initialized(), rsbac_list_lol_get_all_desc(), rsbac_list_lol_remove(), and rsbac_vfree.

Referenced by rsbac_do_init(), and sys_rsbac_check().

int rsbac_init_auth void   ) 
 

Definition at line 2399 of file auth_data_structures.c.

References add_device_item(), auth_register_fd_lists(), cap_compare(), rsbac_auth_device_list_head_t::count, create_device_item(), rsbac_auth_device_list_head_t::curr, rsbac_list_lol_info_t::data_size, rsbac_list_lol_info_t::desc_size, get_error_name(), rsbac_auth_device_list_head_t::head, rsbac_list_lol_info_t::key, rsbac_auth_device_list_head_t::lock, rsbac_list_lol_info_t::max_age, NULL, proc_rsbac_root_p, RSBAC_AUTH_LIST_KEY, RSBAC_AUTH_P_EFF_LIST_NAME, RSBAC_AUTH_P_FS_LIST_NAME, RSBAC_AUTH_P_GROUP_EFF_LIST_NAME, RSBAC_AUTH_P_GROUP_FS_LIST_NAME, RSBAC_AUTH_P_GROUP_LIST_NAME, RSBAC_AUTH_P_LIST_NAME, RSBAC_AUTH_P_LIST_VERSION, RSBAC_ECOULDNOTADDDEVICE, RSBAC_EREINIT, rsbac_is_initialized(), rsbac_kfree(), rsbac_kmalloc(), RSBAC_LIST_DEF_DATA, rsbac_list_lol_register(), RSBAC_LIST_VERSION, RSBAC_MAXNAMELEN, rsbac_root_dev, rsbac_list_lol_info_t::subdata_size, rsbac_list_lol_info_t::subdesc_size, rsbac_auth_device_list_head_t::tail, and rsbac_list_lol_info_t::version.

Referenced by rsbac_do_init().

int rsbac_mount_auth kdev_t  kdev  ) 
 

Definition at line 2769 of file auth_data_structures.c.

References add_device_item(), auth_register_fd_lists(), clear_device_item(), create_device_item(), get_error_name(), rsbac_auth_device_list_head_t::lock, lookup_device(), rsbac_auth_device_list_item_t::mount_count, RSBAC_ECOULDNOTADDDEVICE, RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), and RSBAC_MAXNAMELEN.

Referenced by rsbac_mount().

int rsbac_stats_auth void   ) 
 

Definition at line 2960 of file auth_data_structures.c.

References A_none, rsbac_attribute_value_t::dummy, rsbac_auth_device_list_item_t::handles, rsbac_auth_device_list_head_t::head, rsbac_auth_device_list_item_t::id, rsbac_auth_device_list_head_t::lock, rsbac_auth_device_list_item_t::next, R_GET_STATUS_DATA, rsbac_adf_request(), RSBAC_ENOTINITIALIZED, rsbac_is_initialized(), rsbac_list_lol_all_subcount(), rsbac_list_lol_count(), rsbac_target_id_t::scd, ST_rsbac, and T_SCD.

Referenced by rsbac_stats().

int rsbac_umount_auth kdev_t  kdev  ) 
 

Definition at line 2891 of file auth_data_structures.c.

References rsbac_auth_device_list_head_t::lock, lookup_device(), rsbac_auth_device_list_item_t::mount_count, remove_device_item(), RSBAC_ENOTINITIALIZED, and rsbac_is_initialized().

Referenced by rsbac_umount().


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