00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __RSBAC_ACL_H
00011 #define __RSBAC_ACL_H
00012
00013 #include <linux/init.h>
00014 #include <rsbac/types.h>
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifdef CONFIG_RSBAC_INIT_DELAY
00029 extern int rsbac_init_acl(void);
00030 #else
00031 extern int rsbac_init_acl(void) __init;
00032 #endif
00033
00034
00035 int rsbac_mount_acl(kdev_t kdev);
00036 int rsbac_umount_acl(kdev_t kdev);
00037
00038
00039 extern int rsbac_stats_acl(void);
00040
00041
00042 extern int rsbac_check_acl(int correct, int check_inode);
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 int rsbac_acl_set_acl_entry(
00057 rsbac_list_ta_number_t ta_number,
00058 enum rsbac_target_t target,
00059 union rsbac_target_id_t tid,
00060 enum rsbac_acl_subject_type_t subj_type,
00061 rsbac_acl_subject_id_t subj_id,
00062 rsbac_acl_rights_vector_t rights,
00063 rsbac_time_t ttl);
00064
00065
00066
00067
00068
00069
00070 int rsbac_acl_remove_acl_entry(
00071 rsbac_list_ta_number_t ta_number,
00072 enum rsbac_target_t target,
00073 union rsbac_target_id_t tid,
00074 enum rsbac_acl_subject_type_t subj_type,
00075 rsbac_acl_subject_id_t subj_id);
00076
00077
00078
00079
00080
00081 int rsbac_acl_remove_acl(
00082 rsbac_list_ta_number_t ta_number,
00083 enum rsbac_target_t target,
00084 union rsbac_target_id_t tid);
00085
00086
00087
00088
00089
00090
00091 int rsbac_acl_add_to_acl_entry(
00092 rsbac_list_ta_number_t ta_number,
00093 enum rsbac_target_t target,
00094 union rsbac_target_id_t tid,
00095 enum rsbac_acl_subject_type_t subj_type,
00096 rsbac_acl_subject_id_t subj_id,
00097 rsbac_acl_rights_vector_t rights,
00098 rsbac_time_t ttl);
00099
00100
00101
00102
00103
00104
00105
00106
00107 int rsbac_acl_remove_from_acl_entry(
00108 rsbac_list_ta_number_t ta_number,
00109 enum rsbac_target_t target,
00110 union rsbac_target_id_t tid,
00111 enum rsbac_acl_subject_type_t subj_type,
00112 rsbac_acl_subject_id_t subj_id,
00113 rsbac_acl_rights_vector_t rights);
00114
00115
00116
00117
00118
00119
00120 int rsbac_acl_set_mask(
00121 rsbac_list_ta_number_t ta_number,
00122 enum rsbac_target_t target,
00123 union rsbac_target_id_t tid,
00124 rsbac_acl_rights_vector_t mask);
00125
00126
00127
00128
00129
00130
00131 int rsbac_acl_get_mask(
00132 rsbac_list_ta_number_t ta_number,
00133 enum rsbac_target_t target,
00134 union rsbac_target_id_t tid,
00135 rsbac_acl_rights_vector_t * mask_p);
00136
00137
00138
00139
00140
00141
00142
00143
00144 int rsbac_acl_get_rights(
00145 rsbac_list_ta_number_t ta_number,
00146 enum rsbac_target_t target,
00147 union rsbac_target_id_t tid,
00148 enum rsbac_acl_subject_type_t subj_type,
00149 rsbac_acl_subject_id_t subj_id,
00150 rsbac_acl_rights_vector_t * rights_p,
00151 rsbac_boolean_t inherit);
00152
00153
00154
00155
00156
00157
00158
00159
00160 int rsbac_acl_get_single_right (enum rsbac_target_t target,
00161 union rsbac_target_id_t tid,
00162 enum rsbac_acl_subject_type_t subj_type,
00163 rsbac_acl_subject_id_t subj_id,
00164 enum rsbac_adf_request_t right,
00165 rsbac_boolean_t * result);
00166
00167
00168
00169
00170
00171
00172 int rsbac_acl_copy_fd_acl(struct rsbac_fs_file_t file1,
00173 struct rsbac_fs_file_t file2);
00174
00175
00176
00177
00178 int rsbac_acl_copy_pp_acl(rsbac_pid_t old_pid,
00179 rsbac_pid_t new_pid);
00180
00181
00182
00183
00184
00185
00186 int rsbac_acl_get_tlist(
00187 rsbac_list_ta_number_t ta_number,
00188 enum rsbac_target_t target,
00189 union rsbac_target_id_t tid,
00190 struct rsbac_acl_entry_t ** entry_pp,
00191 rsbac_time_t ** ttl_pp);
00192
00193
00194
00195
00196
00197
00198 int rsbac_acl_add_group(
00199 rsbac_list_ta_number_t ta_number,
00200 rsbac_uid_t owner,
00201 enum rsbac_acl_group_type_t type,
00202 char * name,
00203 rsbac_acl_group_id_t * group_id_p);
00204
00205 int rsbac_acl_change_group(
00206 rsbac_list_ta_number_t ta_number,
00207 rsbac_acl_group_id_t id,
00208 rsbac_uid_t owner,
00209 enum rsbac_acl_group_type_t type,
00210 char * name);
00211
00212 int rsbac_acl_remove_group(
00213 rsbac_list_ta_number_t ta_number,
00214 rsbac_acl_group_id_t id);
00215
00216 int rsbac_acl_get_group_entry(
00217 rsbac_list_ta_number_t ta_number,
00218 rsbac_acl_group_id_t group,
00219 struct rsbac_acl_group_entry_t * entry_p);
00220
00221 int rsbac_acl_list_groups(
00222 rsbac_list_ta_number_t ta_number,
00223 rsbac_uid_t owner,
00224 rsbac_boolean_t include_global,
00225 struct rsbac_acl_group_entry_t ** entry_pp);
00226
00227
00228 rsbac_boolean_t rsbac_acl_group_exist(rsbac_acl_group_id_t group);
00229
00230 int rsbac_acl_add_group_member(
00231 rsbac_list_ta_number_t ta_number,
00232 rsbac_acl_group_id_t group,
00233 rsbac_uid_t user,
00234 rsbac_time_t ttl);
00235
00236 int rsbac_acl_remove_group_member(
00237 rsbac_list_ta_number_t ta_number,
00238 rsbac_acl_group_id_t group,
00239 rsbac_uid_t user);
00240
00241
00242 rsbac_boolean_t rsbac_acl_group_member(rsbac_acl_group_id_t group, rsbac_uid_t user);
00243
00244
00245
00246
00247 int rsbac_acl_get_user_groups(
00248 rsbac_list_ta_number_t ta_number,
00249 rsbac_uid_t user,
00250 rsbac_acl_group_id_t ** group_pp,
00251 rsbac_time_t ** ttl_pp);
00252
00253
00254 int rsbac_acl_get_group_members(
00255 rsbac_list_ta_number_t ta_number,
00256 rsbac_acl_group_id_t group,
00257 rsbac_uid_t user_array[],
00258 rsbac_time_t ttl_array[],
00259 int maxnum);
00260
00261
00262 int rsbac_acl_remove_subject(
00263 rsbac_list_ta_number_t ta_number,
00264 struct rsbac_acl_entry_desc_t desc);
00265
00266
00267
00268 int rsbac_acl_remove_user(
00269 rsbac_list_ta_number_t ta_number,
00270 rsbac_uid_t user);
00271
00272 #endif