00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __RSBAC_ACI_H
00012 #define __RSBAC_ACI_H
00013
00014 #include <rsbac/types.h>
00015 #include <linux/init.h>
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifdef CONFIG_RSBAC_INIT_DELAY
00030 extern int rsbac_init(kdev_t root_dev);
00031 #else
00032 extern int rsbac_init(kdev_t root_dev) __init;
00033 #endif
00034
00035
00036 int rsbac_kthread_notify(rsbac_pid_t pid);
00037
00038
00039 extern void rsbac_off(void);
00040
00041
00042 extern rsbac_boolean_t rsbac_initialized;
00043
00044 static inline rsbac_boolean_t rsbac_is_initialized(void)
00045 {
00046 return rsbac_initialized;
00047 }
00048
00049
00050 extern int rsbac_mount(struct super_block * sb_p, struct dentry * d_covers);
00051
00052 extern int rsbac_umount(struct super_block * sb_p, struct dentry * d_covers);
00053
00054
00055
00056 int rsbac_free_dat_dentries(void);
00057
00058
00059 extern int rsbac_stats(void);
00060
00061
00062 extern int rsbac_check(int correct, int check_inode);
00063
00064
00065
00066
00067 #if defined(CONFIG_RSBAC_MAINT) || defined(CONFIG_RSBAC_AUTO_WRITE)
00068 extern int rsbac_write(rsbac_boolean_t);
00069 #endif
00070
00071
00072
00073
00074
00075
00076
00077 int rsbac_get_parent(enum rsbac_target_t target,
00078 union rsbac_target_id_t tid,
00079 enum rsbac_target_t * parent_target_p,
00080 union rsbac_target_id_t * parent_tid_p);
00081
00082
00083
00084 #ifdef CONFIG_RSBAC_FD_CACHE
00085 int rsbac_fd_cache_invalidate(struct rsbac_fs_file_t * file_p);
00086
00087 int rsbac_fd_cache_invalidate_all(void);
00088 #endif
00089
00090
00091
00092
00093
00094 int rsbac_ta_get_attr(
00095 rsbac_list_ta_number_t ta_number,
00096 enum rsbac_switch_target_t module,
00097 enum rsbac_target_t target,
00098 union rsbac_target_id_t tid,
00099 enum rsbac_attribute_t attr,
00100 union rsbac_attribute_value_t * value,
00101 rsbac_boolean_t inherit);
00102
00103 #define rsbac_get_attr(module, target, tid, attr, value, inherit) \
00104 rsbac_ta_get_attr(0, module, target, tid, attr, value, inherit)
00105
00106 int rsbac_ta_set_attr(
00107 rsbac_list_ta_number_t ta_number,
00108 enum rsbac_switch_target_t module,
00109 enum rsbac_target_t target,
00110 union rsbac_target_id_t tid,
00111 enum rsbac_attribute_t attr,
00112 union rsbac_attribute_value_t value);
00113
00114 #define rsbac_set_attr(module, target, tid, attr, value) \
00115 rsbac_ta_set_attr(0, module, target, tid, attr, value)
00116
00117
00118
00119
00120 int rsbac_ta_remove_target(
00121 rsbac_list_ta_number_t ta_number,
00122 enum rsbac_target_t target,
00123 union rsbac_target_id_t tid);
00124
00125 #define rsbac_remove_target(target, tid) \
00126 rsbac_ta_remove_target(0, target, tid)
00127
00128 int rsbac_ta_list_all_dev(rsbac_list_ta_number_t ta_number,
00129 struct rsbac_dev_desc_t ** id_pp);
00130
00131 int rsbac_ta_list_all_user(rsbac_list_ta_number_t ta_number,
00132 rsbac_uid_t ** id_pp);
00133
00134 int rsbac_ta_list_all_ipc(rsbac_list_ta_number_t ta_number,
00135 struct rsbac_ipc_t ** id_pp);
00136
00137 int rsbac_ta_list_all_group(rsbac_list_ta_number_t ta_number,
00138 rsbac_gid_t ** id_pp);
00139
00140 int rsbac_mark_kthread(rsbac_pid_t pid);
00141 int rsbac_kthreads_init(void);
00142 #endif