acl_syscalls.c File Reference

#include <linux/string.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/vmalloc.h>
#include <rsbac/types.h>
#include <rsbac/aci.h>
#include <rsbac/error.h>
#include <rsbac/acl.h>
#include <rsbac/getname.h>
#include <rsbac/acl_getname.h>
#include <rsbac/helpers.h>
#include <rsbac/debug.h>
#include <rsbac/rkmem.h>
#include <rsbac/adf_main.h>

Go to the source code of this file.

Functions

rsbac_boolean_t rsbac_acl_check_super (enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_uid_t user)
rsbac_boolean_t rsbac_acl_check_forward (enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_uid_t user, rsbac_acl_rights_vector_t rights)
rsbac_boolean_t rsbac_acl_check_right (enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_uid_t user, rsbac_pid_t caller_pid, enum rsbac_adf_request_t request)
int rsbac_acl_sys_set_acl_entry (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_acl_subject_type_t subj_type, rsbac_acl_subject_id_t subj_id, rsbac_acl_rights_vector_t rights, rsbac_time_t ttl)
int rsbac_acl_sys_remove_acl_entry (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_acl_subject_type_t subj_type, rsbac_acl_subject_id_t subj_id)
int rsbac_acl_sys_remove_acl (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid)
int rsbac_acl_sys_add_to_acl_entry (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_acl_subject_type_t subj_type, rsbac_acl_subject_id_t subj_id, rsbac_acl_rights_vector_t rights, rsbac_time_t ttl)
int rsbac_acl_sys_remove_from_acl_entry (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_acl_subject_type_t subj_type, rsbac_acl_subject_id_t subj_id, rsbac_acl_rights_vector_t rights)
int rsbac_acl_sys_set_mask (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_acl_rights_vector_t mask)
int rsbac_acl_sys_remove_user (rsbac_list_ta_number_t ta_number, rsbac_uid_t uid)
int rsbac_acl_sys_get_mask (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, rsbac_acl_rights_vector_t *mask_p)
int rsbac_acl_sys_get_rights (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_acl_subject_type_t subj_type, rsbac_acl_subject_id_t subj_id, rsbac_acl_rights_vector_t *rights_p, rsbac_boolean_t effective)
int rsbac_acl_sys_get_tlist (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid, struct rsbac_acl_entry_t **entry_pp, rsbac_time_t **ttl_pp)
int rsbac_acl_sys_group (rsbac_list_ta_number_t ta_number, enum rsbac_acl_group_syscall_type_t call, union rsbac_acl_group_syscall_arg_t arg)


Function Documentation

rsbac_boolean_t rsbac_acl_check_forward enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_uid_t  user,
rsbac_acl_rights_vector_t  rights
 

Definition at line 366 of file acl_main.c.

References ACLR_FORWARD, ACLS_USER, FALSE, get_error_name(), rsbac_acl_sys_get_rights(), rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_NETTEMP_NT, T_PROCESS, T_SCD, T_SYMLINK, T_USER, and TRUE.

Referenced by rsbac_acl_sys_add_to_acl_entry(), and rsbac_acl_sys_set_acl_entry().

rsbac_boolean_t rsbac_acl_check_right enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_uid_t  user,
rsbac_pid_t  caller_pid,
enum rsbac_adf_request_t  request
 

Definition at line 37 of file acl_main.c.

References A_rc_role, ACLS_GROUP, ACLS_ROLE, ACLS_USER, FALSE, get_error_name(), get_request_name(), get_target_name(), NULL, rsbac_target_id_t::process, R_NONE, RC, rsbac_attribute_value_t::rc_role, rsbac_acl_add_to_acl_entry(), rsbac_acl_check_super(), rsbac_acl_get_single_right(), rsbac_acl_get_user_groups(), RSBAC_ACL_GROUP_EVERYONE, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, RSBAC_REQUEST_VECTOR, rsbac_vfree, T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_NETTEMP_NT, T_PROCESS, T_SCD, T_SYMLINK, T_USER, and TRUE.

Referenced by rsbac_acl_sys_add_to_acl_entry(), 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(), and rsbac_adf_request_acl().

rsbac_boolean_t rsbac_acl_check_super enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_uid_t  user
 

Definition at line 40 of file acl_syscalls.c.

References A_rc_role, ACLR_SUPERVISOR, ACLS_GROUP, ACLS_ROLE, ACLS_USER, FALSE, get_error_name(), NULL, rsbac_target_id_t::process, RC, rsbac_attribute_value_t::rc_role, rsbac_acl_get_single_right(), rsbac_acl_get_user_groups(), RSBAC_ACL_GROUP_EVERYONE, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_vfree, T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_NETTEMP_NT, T_PROCESS, T_SCD, T_SYMLINK, T_USER, and TRUE.

Referenced by rsbac_acl_check_right(), rsbac_acl_sys_add_to_acl_entry(), rsbac_acl_sys_get_rights(), rsbac_acl_sys_remove_acl(), rsbac_acl_sys_remove_acl_entry(), rsbac_acl_sys_remove_from_acl_entry(), rsbac_acl_sys_set_acl_entry(), and rsbac_adf_request_acl().

int rsbac_acl_sys_add_to_acl_entry rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_acl_subject_type_t  subj_type,
rsbac_acl_subject_id_t  subj_id,
rsbac_acl_rights_vector_t  rights,
rsbac_time_t  ttl
 

Definition at line 747 of file acl_syscalls.c.

References ACL, ACLR_ACCESS_CONTROL, get_acl_subject_type_name(), get_error_name(), get_target_name(), rsbac_target_id_t::netobj, rsbac_net_obj_desc_t::remote_addr, rsbac_acl_add_to_acl_entry(), rsbac_acl_check_forward(), rsbac_acl_check_right(), rsbac_acl_check_super(), RSBAC_ACL_SUPERVISOR_RIGHT_VECTOR, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_LIST_TTL_KEEP, RSBAC_MAXNAMELEN, rsbac_net_obj_desc_t::sock_p, T_NETOBJ, and u64tostracl().

Referenced by sys_rsbac_acl(), and sys_rsbac_acl_n().

int rsbac_acl_sys_get_mask rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_acl_rights_vector_t mask_p
 

Definition at line 1322 of file acl_syscalls.c.

References get_error_name(), rsbac_acl_get_mask(), rsbac_kfree(), rsbac_kmalloc(), and RSBAC_MAXNAMELEN.

Referenced by sys_rsbac_acl_get_mask(), and sys_rsbac_acl_get_mask_n().

int rsbac_acl_sys_get_rights rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_acl_subject_type_t  subj_type,
rsbac_acl_subject_id_t  subj_id,
rsbac_acl_rights_vector_t rights_p,
rsbac_boolean_t  effective
 

Definition at line 1357 of file acl_syscalls.c.

References A_rc_def_role, ACLR_SUPERVISOR, ACLS_GROUP, ACLS_ROLE, ACLS_USER, FALSE, get_error_name(), NULL, RC, rsbac_attribute_value_t::rc_role, rsbac_acl_check_super(), rsbac_acl_get_rights(), rsbac_acl_get_single_right(), rsbac_acl_get_user_groups(), RSBAC_ACL_GROUP_EVERYONE, RSBAC_ACL_SUPERVISOR_RIGHT_VECTOR, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, RSBAC_NO_USER, rsbac_vfree, T_USER, TRUE, and rsbac_target_id_t::user.

Referenced by rsbac_acl_check_forward(), sys_rsbac_acl_get_rights(), and sys_rsbac_acl_get_rights_n().

int rsbac_acl_sys_get_tlist rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
struct rsbac_acl_entry_t **  entry_pp,
rsbac_time_t **  ttl_pp
 

Definition at line 1611 of file acl_syscalls.c.

References get_error_name(), rsbac_acl_get_tlist(), RSBAC_ENOTFOUND, rsbac_kfree(), rsbac_kmalloc(), and RSBAC_MAXNAMELEN.

Referenced by sys_rsbac_acl_get_tlist(), and sys_rsbac_acl_get_tlist_n().

int rsbac_acl_sys_group rsbac_list_ta_number_t  ta_number,
enum rsbac_acl_group_syscall_type_t  call,
union rsbac_acl_group_syscall_arg_t  arg
 

Definition at line 1652 of file acl_syscalls.c.

References ACL, ACLG_GLOBAL, ACLG_NONE, ACLGS_add_group, ACLGS_add_member, ACLGS_change_group, ACLGS_get_group_entry, ACLGS_get_group_members, ACLGS_get_user_groups, ACLGS_list_groups, ACLGS_none, ACLGS_remove_group, ACLGS_remove_member, rsbac_acl_group_syscall_arg_t::add_group, rsbac_acl_group_syscall_arg_t::add_member, rsbac_acl_group_syscall_arg_t::change_group, rsbac_acl_get_group_entry_arg_t::entry_p, get_acl_group_syscall_name(), rsbac_acl_group_syscall_arg_t::get_group_entry, rsbac_acl_group_syscall_arg_t::get_group_members, rsbac_acl_group_syscall_arg_t::get_user_groups, rsbac_acl_get_group_members_arg_t::group, rsbac_acl_remove_member_arg_t::group, rsbac_acl_add_member_arg_t::group, rsbac_acl_get_user_groups_arg_t::group_array, rsbac_acl_list_groups_arg_t::group_entry_array, rsbac_acl_add_group_arg_t::group_id_p, rsbac_acl_get_group_entry_arg_t::id, rsbac_acl_remove_group_arg_t::id, rsbac_acl_group_entry_t::id, rsbac_acl_change_group_arg_t::id, rsbac_acl_list_groups_arg_t::include_global, rsbac_acl_group_syscall_arg_t::list_groups, rsbac_acl_get_group_members_arg_t::maxnum, rsbac_acl_get_user_groups_arg_t::maxnum, rsbac_acl_list_groups_arg_t::maxnum, rsbac_acl_group_entry_t::name, rsbac_acl_change_group_arg_t::name, rsbac_acl_add_group_arg_t::name, NULL, rsbac_acl_change_group_arg_t::owner, rsbac_acl_group_entry_t::owner, rsbac_acl_group_syscall_arg_t::remove_group, rsbac_acl_group_syscall_arg_t::remove_member, rsbac_acl_add_group(), rsbac_acl_add_group_member(), rsbac_acl_change_group(), rsbac_acl_get_group_entry(), rsbac_acl_get_group_members(), rsbac_acl_get_user_groups(), rsbac_acl_list_groups(), RSBAC_ACL_MAX_MAXNUM, rsbac_acl_remove_group(), rsbac_acl_remove_group_member(), RSBAC_EINVALIDPOINTER, RSBAC_EINVALIDREQUEST, RSBAC_EINVALIDVALUE, RSBAC_ENOMEM, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_min, RSBAC_NO_USER, rsbac_vfree, rsbac_vmalloc, rsbac_acl_add_member_arg_t::ttl, rsbac_acl_get_group_members_arg_t::ttl_array, rsbac_acl_get_user_groups_arg_t::ttl_array, rsbac_acl_group_entry_t::type, rsbac_acl_change_group_arg_t::type, rsbac_acl_add_group_arg_t::type, rsbac_acl_get_user_groups_arg_t::user, rsbac_acl_remove_member_arg_t::user, rsbac_acl_add_member_arg_t::user, and rsbac_acl_get_group_members_arg_t::user_array.

Referenced by sys_rsbac_acl_group().

int rsbac_acl_sys_remove_acl rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid
 

Definition at line 660 of file acl_syscalls.c.

References ACL, get_error_name(), get_target_name(), rsbac_acl_check_super(), rsbac_acl_remove_acl(), RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), and RSBAC_MAXNAMELEN.

Referenced by sys_rsbac_acl(), and sys_rsbac_acl_n().

int rsbac_acl_sys_remove_acl_entry rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_acl_subject_type_t  subj_type,
rsbac_acl_subject_id_t  subj_id
 

Definition at line 469 of file acl_syscalls.c.

References ACL, ACLR_ACCESS_CONTROL, FALSE, get_acl_subject_type_name(), get_error_name(), get_target_name(), rsbac_target_id_t::netobj, rsbac_net_obj_desc_t::remote_addr, rsbac_acl_check_right(), rsbac_acl_check_super(), rsbac_acl_get_rights(), rsbac_acl_remove_acl_entry(), RSBAC_ACL_SUPERVISOR_RIGHT_VECTOR, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_net_obj_desc_t::sock_p, and T_NETOBJ.

Referenced by sys_rsbac_acl(), and sys_rsbac_acl_n().

int rsbac_acl_sys_remove_from_acl_entry rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_acl_subject_type_t  subj_type,
rsbac_acl_subject_id_t  subj_id,
rsbac_acl_rights_vector_t  rights
 

Definition at line 928 of file acl_syscalls.c.

References ACL, ACLR_ACCESS_CONTROL, get_acl_subject_type_name(), get_error_name(), get_target_name(), rsbac_target_id_t::netobj, rsbac_net_obj_desc_t::remote_addr, rsbac_acl_check_right(), rsbac_acl_check_super(), rsbac_acl_remove_from_acl_entry(), RSBAC_ACL_SUPERVISOR_RIGHT_VECTOR, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_net_obj_desc_t::sock_p, T_NETOBJ, and u64tostracl().

Referenced by sys_rsbac_acl(), and sys_rsbac_acl_n().

int rsbac_acl_sys_remove_user rsbac_list_ta_number_t  ta_number,
rsbac_uid_t  uid
 

Definition at line 1234 of file acl_syscalls.c.

References ACL, get_error_name(), R_DELETE, rsbac_acl_check_right(), rsbac_acl_remove_user(), RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, T_USER, and rsbac_target_id_t::user.

Referenced by sys_rsbac_acl().

int rsbac_acl_sys_set_acl_entry rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
enum rsbac_acl_subject_type_t  subj_type,
rsbac_acl_subject_id_t  subj_id,
rsbac_acl_rights_vector_t  rights,
rsbac_time_t  ttl
 

Definition at line 287 of file acl_syscalls.c.

References ACL, ACLR_ACCESS_CONTROL, get_acl_subject_type_name(), get_error_name(), get_target_name(), rsbac_target_id_t::netobj, rsbac_net_obj_desc_t::remote_addr, rsbac_acl_check_forward(), rsbac_acl_check_right(), rsbac_acl_check_super(), rsbac_acl_set_acl_entry(), RSBAC_ACL_SUPERVISOR_RIGHT_VECTOR, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_LIST_TTL_KEEP, RSBAC_MAXNAMELEN, rsbac_net_obj_desc_t::sock_p, T_NETOBJ, and u64tostracl().

Referenced by sys_rsbac_acl(), and sys_rsbac_acl_n().

int rsbac_acl_sys_set_mask rsbac_list_ta_number_t  ta_number,
enum rsbac_target_t  target,
union rsbac_target_id_t  tid,
rsbac_acl_rights_vector_t  mask
 

Definition at line 1101 of file acl_syscalls.c.

References ACL, ACLR_ACCESS_CONTROL, ACLS_USER, FALSE, get_error_name(), get_target_name(), rsbac_target_id_t::netobj, rsbac_net_obj_desc_t::remote_addr, rsbac_acl_check_right(), rsbac_acl_get_rights(), rsbac_acl_set_mask(), RSBAC_ACL_SUPERVISOR_RIGHT_VECTOR, RSBAC_EINVALIDTARGET, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, rsbac_net_obj_desc_t::sock_p, T_NETOBJ, and u64tostracl().

Referenced by sys_rsbac_acl(), and sys_rsbac_acl_n().


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