#include <linux/types.h>
#include <linux/version.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/quotaops.h>
#include <linux/proc_fs.h>
#include <linux/msdos_fs.h>
#include <linux/iso_fs.h>
#include <linux/nfs_fs.h>
#include <linux/ext2_fs.h>
#include <linux/coda.h>
#include <linux/initrd.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/coda_psdev.h>
#include <linux/ncp_fs.h>
#include <linux/smb.h>
#include <linux/dnotify.h>
#include <linux/mm.h>
#include <linux/blkdev.h>
#include <linux/init.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/inetdevice.h>
#include <asm/uaccess.h>
#include <asm/atomic.h>
#include <rsbac/types.h>
#include <rsbac/aci.h>
#include <rsbac/aci_data_structures.h>
#include <rsbac/error.h>
#include <rsbac/helpers.h>
#include <rsbac/fs.h>
#include <rsbac/getname.h>
#include <rsbac/net_getname.h>
#include <rsbac/adf.h>
#include <rsbac/adf_main.h>
#include <rsbac/reg.h>
#include <rsbac/rkmem.h>
#include <rsbac/gen_lists.h>
#include <linux/string.h>
#include <linux/kdev_t.h>
#include <linux/smp_lock.h>
Go to the source code of this file.
Defines | |
#define | check_parent(dir, dentry) ((dir) == (dentry)->d_parent && !list_empty(&dentry->d_bucket)) |
Functions | |
DECLARE_MUTEX (rsbac_write_sem) | |
static struct rsbac_device_list_item_t * | lookup_device (kdev_t) |
static int | gen_fd_hash (u_long inode) |
rsbac_boolean_t | writable (struct super_block *sb_p) |
static int | lookup_aci_path_dentry (struct super_block *sb_p, struct dentry **dir_dentry_pp, rsbac_boolean_t create_dir, kdev_t kdev) |
static int | dev_compare (void *desc1, void *desc2) |
static int | ipc_compare (void *desc1, void *desc2) |
static int | gen_fd_conv (void *old_desc, void *old_data, void *new_desc, void *new_data) |
static int | gen_fd_old_conv (void *old_desc, void *old_data, void *new_desc, void *new_data) |
static int | gen_fd_old_old_conv (void *old_desc, void *old_data, void *new_desc, void *new_data) |
static int | gen_fd_old_old_old_conv (void *old_desc, void *old_data, void *new_desc, void *new_data) |
static int | gen_fd_old_old_old_old_conv (void *old_desc, void *old_data, void *new_desc, void *new_data) |
rsbac_list_conv_function_t * | gen_fd_get_conv (rsbac_version_t old_version) |
static int | gen_dev_conv (void *old_desc, void *old_data, void *new_desc, void *new_data) |
rsbac_list_conv_function_t * | gen_dev_get_conv (rsbac_version_t old_version) |
static int | register_fd_lists (struct rsbac_device_list_item_t *device_p, kdev_t kdev) |
static int | aci_detach_fd_lists (struct rsbac_device_list_item_t *device_p) |
static struct rsbac_device_list_item_t * | create_device_item (struct super_block *sb_p, struct dentry *d_covers) |
static struct rsbac_device_list_item_t * | add_device_item (struct rsbac_device_list_item_t *device_p) |
static void | clear_device_item (struct rsbac_device_list_item_t *item_p) |
static void | remove_device_item (kdev_t kdev) |
static int | rsbac_clear_file (struct dentry *dentry) |
static void | wakeup_auto (u_long dummy) |
super_block * | rsbac_get_super_block (kdev_t kdev) |
int | rsbac_read_open (char *name, struct file *file_p, kdev_t kdev) |
int | rsbac_write_open (char *name, struct file *file_p, kdev_t kdev) |
void | rsbac_read_close (struct file *file_p) |
void | rsbac_write_close (struct file *file_p) |
int | rsbac_get_full_path (struct dentry *dentry_p, char path[], int maxlen) |
int | rsbac_get_full_path_length (struct dentry *dentry_p) |
static void __init | registration_error (int err, char *listname) |
static int __init | register_dev_lists (void) |
static int __init | register_ipc_lists (void) |
static int __init | register_user_lists (void) |
static int __init | register_process_lists (void) |
static int __init | rsbac_do_init (void) |
int __init | rsbac_init (kdev_t root_dev) |
rsbac_boolean_t | rsbac_is_initialized (void) |
int | rsbac_kthread_notify (rsbac_pid_t pid) |
int | rsbac_mount (struct super_block *sb_p, struct dentry *d_covers) |
int | rsbac_umount (struct super_block *sb_p, struct dentry *d_covers) |
int | rsbac_free_dat_dentries (void) |
int | rsbac_stats (void) |
int | rsbac_check_inode (struct super_block *sb_p, rsbac_inode_nr_t inode) |
int | rsbac_check (int correct, int check_inode) |
int | rsbac_get_parent (enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_target_t *parent_target_p, union rsbac_target_id_t *parent_tid_p) |
static int | get_attr_fd (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value, rsbac_boolean_t inherit) |
static int | get_attr_dev (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value, rsbac_boolean_t inherit) |
static int | get_attr_ipc (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value, rsbac_boolean_t inherit) |
static int | get_attr_user (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value, rsbac_boolean_t inherit) |
static int | get_attr_process (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value, rsbac_boolean_t inherit) |
int | rsbac_ta_get_attr (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value, rsbac_boolean_t inherit) |
static int | set_attr_fd (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value_p) |
static int | set_attr_dev (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value_p) |
static int | set_attr_ipc (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value_p) |
static int | set_attr_user (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value_p) |
static int | set_attr_process (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t *tid_p, enum rsbac_attribute_t attr, union rsbac_attribute_value_t *value_p) |
int | rsbac_ta_set_attr (rsbac_list_ta_number_t ta_number, enum rsbac_switch_target_t module, enum rsbac_target_t target, union rsbac_target_id_t tid, enum rsbac_attribute_t attr, union rsbac_attribute_value_t value) |
int | rsbac_ta_remove_target (rsbac_list_ta_number_t ta_number, enum rsbac_target_t target, union rsbac_target_id_t tid) |
Variables | |
static rsbac_boolean_t | rsbac_initialized = FALSE |
static char | compiled_modules [80] |
kdev_t | rsbac_root_dev |
static struct rsbac_device_list_head_t | device_list_head |
static struct rsbac_dev_handles_t | dev_handles |
static struct rsbac_ipc_handles_t | ipc_handles |
static struct rsbac_user_handles_t | user_handles |
static struct rsbac_process_handles_t | process_handles |
static struct rsbac_gen_fd_aci_t | def_gen_root_dir_aci = DEFAULT_GEN_ROOT_DIR_ACI |
static struct rsbac_gen_fd_aci_t | def_gen_fd_aci = DEFAULT_GEN_FD_ACI |
static struct dentry * | sysfs_covered_p = NULL |
static struct super_block * | sysfs_sb_p = NULL |
|
Definition at line 2975 of file aci_data_structures.c. Referenced by rsbac_write_open(). |
|
Definition at line 2080 of file aci_data_structures.c. References get_error_name(), RSBAC_EINVALIDPOINTER, RSBAC_GEN_FD_ACI_KEY, rsbac_kfree(), rsbac_kmalloc(), rsbac_list_detach(), and RSBAC_MAXNAMELEN. Referenced by remove_device_item(). |
|
Definition at line 2595 of file aci_data_structures.c. References device_list_head, and NULL. Referenced by rsbac_do_init(), rsbac_init_acl(), rsbac_init_auth(), rsbac_init_mac(), rsbac_mount(), rsbac_mount_acl(), rsbac_mount_auth(), and rsbac_mount_mac(). |
|
Definition at line 2629 of file aci_data_structures.c. References rsbac_kfree(). Referenced by remove_device_item(), rsbac_do_init(), rsbac_mount(), rsbac_mount_acl(), rsbac_mount_auth(), and rsbac_mount_mac(). |
|
Definition at line 2573 of file aci_data_structures.c. References NULL, and rsbac_kmalloc(). Referenced by rsbac_do_init(), rsbac_init_acl(), rsbac_init_auth(), rsbac_init_mac(), rsbac_mount(), rsbac_mount_acl(), rsbac_mount_auth(), and rsbac_mount_mac(). |
|
|
|
Definition at line 752 of file aci_data_structures.c. Referenced by register_dev_lists(), and rsbac_init_acl(). |
|
Definition at line 933 of file aci_data_structures.c. Referenced by gen_dev_get_conv(). |
|
Definition at line 949 of file aci_data_structures.c. References gen_dev_conv(), NULL, and RSBAC_GEN_DEV_OLD_ACI_VERSION. Referenced by register_dev_lists(). |
|
|
|
Definition at line 223 of file aci_data_structures.c. Referenced by get_attr_fd(), rsbac_ta_remove_target(), and set_attr_fd(). |
|
|
|
|
|
|
|
|
|
|
Definition at line 773 of file aci_data_structures.c. References rsbac_ipc_t::id, rsbac_ipc_id_t::id_nr, and rsbac_ipc_t::type. Referenced by register_ipc_lists(). |
|
Definition at line 360 of file aci_data_structures.c. References device_list_head, lookup_device(), NULL, RSBAC_EACCESS, RSBAC_ECOULDNOTCREATEPATH, RSBAC_EINVALIDDEV, RSBAC_EINVALIDPOINTER, RSBAC_ENOROOTDIR, RSBAC_ENOTFOUND, RSBAC_ENOTWRITABLE, RSBAC_EPATHTOOLONG, rsbac_get_super_block(), rsbac_lookup_one_len(), SOCKFS_MAGIC, and writable(). Referenced by rsbac_read_open(), and rsbac_write_open(). |
|
|
|
|
Definition at line 6833 of file aci_data_structures.c. References ipc_compare(), ipc_handles, NULL, registration_error(), RSBAC_FC_ACI_IPC_NAME, RSBAC_FC_OC_ROOT_DEF, RSBAC_JAIL_ACI_IPC_NAME, RSBAC_JAIL_DEF_ID, RSBAC_LIST_DEF_DATA, rsbac_list_register(), RSBAC_LIST_VERSION, RSBAC_MAC_ACI_IPC_NAME, RSBAC_PM_ACI_IPC_NAME, RSBAC_RC_ACI_IPC_NAME, RSBAC_RC_GENERAL_TYPE, RSBAC_SIM_ACI_IPC_NAME, and RSBAC_SIM_DT_ROOT_DEF. Referenced by rsbac_do_init(). |
|
|
|
Definition at line 6612 of file aci_data_structures.c. References get_error_name(), rsbac_kfree(), rsbac_kmalloc(), and RSBAC_MAXNAMELEN. Referenced by register_dev_lists(), register_ipc_lists(), register_process_lists(), register_user_lists(), rsbac_init_acl(), rsbac_init_pm(), and rsbac_init_rc(). |
|
Definition at line 2641 of file aci_data_structures.c. References aci_detach_fd_lists(), clear_device_item(), device_list_head, lookup_device(), and NULL. Referenced by rsbac_umount(), rsbac_umount_acl(), rsbac_umount_auth(), and rsbac_umount_mac(). |
|
Definition at line 11452 of file aci_data_structures.c. References device_list_head, rsbac_check_inode(), RSBAC_ENOMEM, RSBAC_ENOTINITIALIZED, rsbac_initialized, rsbac_kfree(), rsbac_kmalloc(), rsbac_list_get_all_desc(), rsbac_list_remove(), RSBAC_MAXNAMELEN, and rsbac_vfree. Referenced by rsbac_do_init(), and sys_rsbac_check(). |
|
Definition at line 11392 of file aci_data_structures.c. References RSBAC_EINVALIDPOINTER, RSBAC_EINVALIDVALUE, and RSBAC_ENOTFOUND. Referenced by rsbac_check(). |
|
Definition at line 2694 of file aci_data_structures.c. Referenced by rsbac_write_open(). |
|
|
Definition at line 10743 of file aci_data_structures.c. References device_list_head, NULL, RSBAC_ENOTINITIALIZED, and rsbac_initialized. |
|
Definition at line 3547 of file aci_data_structures.c. References A_pseudo, FALSE, GEN, lookup_device(), rsbac_attribute_value_t::pseudo, RSBAC_EINVALIDPOINTER, RSBAC_EINVALIDVALUE, RSBAC_ENOMEM, rsbac_get_attr, rsbac_kfree(), rsbac_kmalloc(), RSBAC_MAXNAMELEN, T_USER, and rsbac_target_id_t::user. Referenced by get_target_name(), rsbac_adf_request_int(), rsbac_jail_sys_jail(), and xp_fill_file_struct(). |
|
Definition at line 3631 of file aci_data_structures.c. References lookup_device(), and RSBAC_EINVALIDPOINTER. Referenced by xp_fill_file_struct(). |
|
Definition at line 12443 of file aci_data_structures.c. References device_list_head, lookup_device(), RSBAC_EINVALIDPOINTER, RSBAC_EINVALIDTARGET, RSBAC_ENOTFOUND, T_DIR, T_FIFO, T_FILE, and T_SYMLINK. Referenced by copy_fp_cap_set_item(), copy_fp_tru_set_item(), get_attr_fd(), rsbac_acl_get_rights(), and rsbac_acl_get_single_right(). |
|
|
Definition at line 9890 of file aci_data_structures.c. Referenced by rsbac_mount(). |
|
|
Definition at line 10116 of file aci_data_structures.c. References process_handles, rsbac_initialized, and rsbac_list_add(). |
|
|
Definition at line 3522 of file aci_data_structures.c. References NULL. Referenced by read_info(), read_list(), read_lol_list(), and rsbac_write_close(). |
|
Definition at line 2819 of file aci_data_structures.c. References FALSE, init_private_file(), lookup_aci_path_dentry(), NULL, RSBAC_EINVALIDPOINTER, RSBAC_ENOMEM, RSBAC_ENOTFOUND, RSBAC_EREADFAILED, rsbac_kfree(), rsbac_kmalloc(), rsbac_lookup_one_len(), and RSBAC_MAXNAMELEN. Referenced by read_info(), read_list(), and read_lol_list(). |
|
Definition at line 10790 of file aci_data_structures.c. References dev_handles, device_list_head, ipc_handles, process_handles, rsbac_adf_request_count, rsbac_adf_set_attr_count, RSBAC_ENOTINITIALIZED, rsbac_initialized, rsbac_list_count(), rsbac_stats_acl(), rsbac_stats_auth(), rsbac_stats_pm(), rsbac_stats_rc(), T_DEV, T_DIR, T_FIFO, T_FILE, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SCD, T_SYMLINK, T_USER, and user_handles. Referenced by sys_rsbac_stats(). |
|
Definition at line 15062 of file aci_data_structures.c. References get_attr_dev(), get_attr_fd(), get_attr_ipc(), get_attr_process(), get_attr_user(), RSBAC_EINVALIDPOINTER, RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_initialized, T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SYMLINK, and T_USER. Referenced by rsbac_pm(), sys_rsbac_get_attr(), and sys_rsbac_get_attr_n(). |
|
|
Definition at line 17532 of file aci_data_structures.c. References RSBAC_EINVALIDTARGET, RSBAC_ENOTINITIALIZED, rsbac_initialized, set_attr_dev(), set_attr_fd(), set_attr_ipc(), set_attr_process(), set_attr_user(), T_DEV, T_DIR, T_FIFO, T_FILE, T_GROUP, T_IPC, T_NETDEV, T_NETOBJ, T_NETTEMP, T_PROCESS, T_SYMLINK, and T_USER. Referenced by rsbac_pm(), sys_rsbac_set_attr(), and sys_rsbac_set_attr_n(). |
|
Definition at line 10568 of file aci_data_structures.c. References device_list_head, lookup_device(), NULL, remove_device_item(), rsbac_debug_no_write, RSBAC_EINVALIDPOINTER, RSBAC_ENOTINITIALIZED, rsbac_initialized, rsbac_list_umount(), rsbac_umount_acl(), rsbac_umount_auth(), rsbac_umount_mac(), rsbac_umount_reg(), rsbac_write(), rsbac_write_sem, sysfs_covered_p, SYSFS_MAGIC, sysfs_sb_p, and TRUE. Referenced by rsbac_aef_sb_umount(). |
|
Definition at line 3539 of file aci_data_structures.c. References rsbac_read_close(). Referenced by rsbac_list_write_buffers(), rsbac_list_write_lol_buffers(), and write_info(). |
|
Definition at line 2986 of file aci_data_structures.c. References check_parent, init_private_file(), lookup_aci_path_dentry(), NULL, rsbac_clear_file(), RSBAC_EINVALIDDEV, RSBAC_EINVALIDPOINTER, RSBAC_ENOMEM, RSBAC_ENOTWRITABLE, RSBAC_EWRITEFAILED, rsbac_get_super_block(), rsbac_kfree(), rsbac_kmalloc(), rsbac_lookup_one_len(), RSBAC_MAXNAMELEN, TRUE, and writable(). Referenced by rsbac_list_write_buffers(), rsbac_list_write_lol_buffers(), and write_info(). |
|
|
|
|
|
|
Definition at line 2708 of file aci_data_structures.c. Referenced by rsbac_get_super_block(). |
|
Definition at line 323 of file aci_data_structures.c. References FALSE, KERNEL_VERSION, rsbac_debug_no_write, SOCKFS_MAGIC, SYSFS_MAGIC, and TRUE. Referenced by lookup_aci_path_dentry(), and rsbac_write_open(). |
|
Definition at line 120 of file aci_data_structures.c. Referenced by rsbac_do_init(). |
|
Definition at line 154 of file aci_data_structures.c. |
|
Definition at line 153 of file aci_data_structures.c. |
|
Definition at line 129 of file aci_data_structures.c. Referenced by get_attr_dev(), register_dev_lists(), rsbac_stats(), rsbac_ta_remove_target(), and set_attr_dev(). |
|
Definition at line 128 of file aci_data_structures.c. Referenced by add_device_item(), get_attr_fd(), lookup_aci_path_dentry(), lookup_device(), remove_device_item(), rsbac_check(), rsbac_do_init(), rsbac_free_dat_dentries(), rsbac_get_parent(), rsbac_get_super_block(), rsbac_mount(), rsbac_stats(), rsbac_ta_remove_target(), rsbac_umount(), and set_attr_fd(). |
|
Definition at line 130 of file aci_data_structures.c. Referenced by get_attr_ipc(), register_ipc_lists(), rsbac_stats(), rsbac_ta_remove_target(), and set_attr_ipc(). |
|
Definition at line 135 of file aci_data_structures.c. Referenced by get_attr_process(), register_process_lists(), rsbac_init(), rsbac_kthread_notify(), rsbac_stats(), rsbac_ta_remove_target(), and set_attr_process(). |
|
Definition at line 118 of file aci_data_structures.c. Referenced by rsbac_check(), rsbac_do_init(), rsbac_free_dat_dentries(), rsbac_init(), rsbac_is_initialized(), rsbac_kthread_notify(), rsbac_mount(), rsbac_stats(), rsbac_ta_get_attr(), rsbac_ta_remove_target(), rsbac_ta_set_attr(), and rsbac_umount(). |
|
Definition at line 122 of file aci_data_structures.c. Referenced by read_info(), rsbac_do_init(), rsbac_init(), rsbac_init_acl(), rsbac_init_auth(), rsbac_init_mac(), rsbac_list_lol_register(), rsbac_list_register(), rsbac_mount(), and write_info(). |
|
Definition at line 202 of file aci_data_structures.c. Referenced by rsbac_do_init(), rsbac_mount(), and rsbac_umount(). |
|
Definition at line 203 of file aci_data_structures.c. Referenced by rsbac_do_init(), rsbac_mount(), and rsbac_umount(). |
|
Definition at line 131 of file aci_data_structures.c. Referenced by get_attr_user(), register_user_lists(), rsbac_init(), rsbac_stats(), rsbac_ta_remove_target(), and set_attr_user(). |