#include <linux/init.h>
#include <rsbac/pm_types.h>
Go to the source code of this file.
Functions | |
int | rsbac_init_pm (void) __init |
int | rsbac_stats_pm (void) |
int | rsbac_pm_add_to_set (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t, union rsbac_pm_set_member_t) |
int | rsbac_pm_remove_from_set (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t, union rsbac_pm_set_member_t) |
int | rsbac_pm_clear_set (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t) |
rsbac_boolean_t | rsbac_pm_set_member (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t, union rsbac_pm_set_member_t) |
rsbac_boolean_t | rsbac_pm_pp_subset (rsbac_pm_pp_set_id_t, rsbac_pm_in_pp_set_id_t) |
rsbac_boolean_t | rsbac_pm_pp_superset (rsbac_pm_pp_set_id_t, rsbac_pm_out_pp_set_id_t) |
rsbac_boolean_t | rsbac_pm_pp_only (rsbac_pm_purpose_id_t, rsbac_pm_out_pp_set_id_t) |
int | rsbac_pm_pp_intersec (rsbac_pm_pp_set_id_t, rsbac_pm_in_pp_set_id_t) |
int | rsbac_pm_pp_union (rsbac_pm_pp_set_id_t, rsbac_pm_out_pp_set_id_t) |
int | rsbac_pm_create_set (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t) |
rsbac_boolean_t | rsbac_pm_set_exist (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t) |
int | rsbac_pm_remove_set (rsbac_list_ta_number_t, enum rsbac_pm_set_t, union rsbac_pm_set_id_t) |
int | rsbac_pm_get_data (rsbac_list_ta_number_t, enum rsbac_pm_target_t, union rsbac_pm_target_id_t, enum rsbac_pm_data_t, union rsbac_pm_data_value_t *) |
int | rsbac_pm_get_all_data (rsbac_list_ta_number_t, enum rsbac_pm_target_t, union rsbac_pm_target_id_t, union rsbac_pm_all_data_value_t *) |
rsbac_boolean_t | rsbac_pm_exists (rsbac_list_ta_number_t, enum rsbac_pm_target_t, union rsbac_pm_target_id_t) |
int | rsbac_pm_set_data (rsbac_list_ta_number_t, enum rsbac_pm_target_t, union rsbac_pm_target_id_t, enum rsbac_pm_data_t, union rsbac_pm_data_value_t) |
int | rsbac_pm_add_target (rsbac_list_ta_number_t, enum rsbac_pm_target_t, union rsbac_pm_all_data_value_t) |
int | rsbac_pm_remove_target (rsbac_list_ta_number_t, enum rsbac_pm_target_t, union rsbac_pm_target_id_t) |
|
Definition at line 1150 of file pm_data_structures.c. References class_handle, cs_handle, rsbac_list_info_t::data_size, rsbac_list_lol_info_t::data_size, rsbac_list_info_t::desc_size, rsbac_list_lol_info_t::desc_size, in_pp_set_handle, rsbac_list_info_t::key, rsbac_list_lol_info_t::key, rsbac_list_info_t::max_age, rsbac_list_lol_info_t::max_age, na_handle, NULL, out_pp_set_handle, PA_class, PA_cs, PA_in_pp_set, PA_na, PA_out_pp_set, PA_pp, PA_pp_set, PA_ru_set, PA_task, PA_task_set, PA_tkt, PA_tp, PA_tp_set, pp_handle, pp_set_handle, proc_rsbac_root_p, registration_error(), RSBAC_EREINIT, rsbac_is_initialized(), RSBAC_LIST_BACKUP, rsbac_list_compare_u32(), rsbac_list_lol_register(), RSBAC_LIST_PERSIST, rsbac_list_register(), RSBAC_LIST_VERSION, RSBAC_PM_CLASS_LIST_NAME, RSBAC_PM_CLASS_LIST_PROC_NAME, RSBAC_PM_CLASS_LIST_VERSION, RSBAC_PM_CS_LIST_NAME, RSBAC_PM_CS_LIST_PROC_NAME, RSBAC_PM_CS_LIST_VERSION, RSBAC_PM_IN_PP_SET_LIST_NAME, RSBAC_PM_IN_PP_SET_LIST_PROC_NAME, RSBAC_PM_LIST_KEY, RSBAC_PM_NA_LIST_NAME, RSBAC_PM_NA_LIST_PROC_NAME, RSBAC_PM_NA_LIST_VERSION, RSBAC_PM_NO_VERSION, RSBAC_PM_OUT_PP_SET_LIST_NAME, RSBAC_PM_OUT_PP_SET_LIST_PROC_NAME, RSBAC_PM_PP_LIST_NAME, RSBAC_PM_PP_LIST_PROC_NAME, RSBAC_PM_PP_LIST_VERSION, RSBAC_PM_PP_SET_LIST_NAME, RSBAC_PM_PP_SET_LIST_PROC_NAME, RSBAC_PM_PP_SET_LIST_VERSION, RSBAC_PM_PROC_DIR_NAME, RSBAC_PM_PROC_STATS_NAME, RSBAC_PM_RU_SET_LIST_NAME, RSBAC_PM_RU_SET_LIST_PROC_NAME, RSBAC_PM_RU_SET_LIST_VERSION, RSBAC_PM_TASK_LIST_NAME, RSBAC_PM_TASK_LIST_PROC_NAME, RSBAC_PM_TASK_LIST_VERSION, RSBAC_PM_TASK_SET_LIST_NAME, RSBAC_PM_TASK_SET_LIST_PROC_NAME, RSBAC_PM_TASK_SET_LIST_VERSION, RSBAC_PM_TKT_LIST_NAME, RSBAC_PM_TKT_LIST_PROC_NAME, RSBAC_PM_TKT_LIST_VERSION, RSBAC_PM_TP_LIST_NAME, RSBAC_PM_TP_LIST_PROC_NAME, RSBAC_PM_TP_LIST_VERSION, RSBAC_PM_TP_SET_LIST_NAME, RSBAC_PM_TP_SET_LIST_PROC_NAME, RSBAC_PM_TP_SET_LIST_VERSION, rsbac_printk(), ru_set_handle, rsbac_list_lol_info_t::subdata_size, rsbac_list_lol_info_t::subdesc_size, task_handle, task_set_handle, tkt_handle, tp_handle, tp_set_handle, rsbac_list_info_t::version, and rsbac_list_lol_info_t::version. Referenced by rsbac_do_init(). 01152 { 01153 int err = 0; 01154 struct proc_dir_entry * tmp_entry_p; 01155 struct proc_dir_entry * pm_entry_p; 01156 struct rsbac_list_lol_info_t lol_info; 01157 struct rsbac_list_info_t list_info; 01158 01159 if (rsbac_is_initialized()) 01160 { 01161 rsbac_printk(KERN_WARNING "rsbac_init_pm(): RSBAC already initialized\n"); 01162 return(-RSBAC_EREINIT); 01163 } 01164 01165 rsbac_printk(KERN_INFO "rsbac_init_pm(): Initializing RSBAC: PM subsystem\n"); 01166 01167 /* Helper lists */ 01168 lol_info.version = RSBAC_PM_TASK_SET_LIST_VERSION; 01169 lol_info.key = RSBAC_PM_LIST_KEY; 01170 lol_info.desc_size = sizeof(rsbac_pm_task_set_id_t); 01171 lol_info.data_size = 0; 01172 lol_info.subdesc_size = sizeof(rsbac_pm_task_id_t); 01173 lol_info.subdata_size = 0; 01174 lol_info.max_age = 0; 01175 err = rsbac_list_lol_register(RSBAC_LIST_VERSION, 01176 &task_set_handle, 01177 &lol_info, 01178 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01179 rsbac_list_compare_u32, 01180 rsbac_list_compare_u32, 01181 NULL, 01182 NULL, 01183 NULL, 01184 NULL, 01185 RSBAC_PM_TASK_SET_LIST_NAME, 01186 RSBAC_AUTO_DEV); 01187 if(err) 01188 { 01189 registration_error(err, "task set"); 01190 return err; 01191 } 01192 01193 lol_info.version = RSBAC_PM_TP_SET_LIST_VERSION; 01194 lol_info.key = RSBAC_PM_LIST_KEY; 01195 lol_info.desc_size = sizeof(rsbac_pm_tp_set_id_t); 01196 lol_info.data_size = 0; 01197 lol_info.subdesc_size = sizeof(rsbac_pm_tp_id_t); 01198 lol_info.subdata_size = 0; 01199 lol_info.max_age = 0; 01200 err = rsbac_list_lol_register(RSBAC_LIST_VERSION, 01201 &tp_set_handle, 01202 &lol_info, 01203 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01204 rsbac_list_compare_u32, 01205 rsbac_list_compare_u32, 01206 NULL, 01207 NULL, 01208 NULL, 01209 NULL, 01210 RSBAC_PM_TP_SET_LIST_NAME, 01211 RSBAC_AUTO_DEV); 01212 if(err) 01213 { 01214 registration_error(err, "tp set"); 01215 return err; 01216 } 01217 01218 lol_info.version = RSBAC_PM_RU_SET_LIST_VERSION; 01219 lol_info.key = RSBAC_PM_LIST_KEY; 01220 lol_info.desc_size = sizeof(rsbac_pm_ru_set_id_t); 01221 lol_info.data_size = 0; 01222 lol_info.subdesc_size = sizeof(rsbac_uid_t); 01223 lol_info.subdata_size = 0; 01224 lol_info.max_age = 0; 01225 err = rsbac_list_lol_register(RSBAC_LIST_VERSION, 01226 &ru_set_handle, 01227 &lol_info, 01228 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01229 rsbac_list_compare_u32, 01230 rsbac_list_compare_u32, 01231 NULL, 01232 NULL, 01233 NULL, 01234 NULL, 01235 RSBAC_PM_RU_SET_LIST_NAME, 01236 RSBAC_AUTO_DEV); 01237 if(err) 01238 { 01239 registration_error(err, "ru set"); 01240 return err; 01241 } 01242 01243 lol_info.version = RSBAC_PM_PP_SET_LIST_VERSION; 01244 lol_info.key = RSBAC_PM_LIST_KEY; 01245 lol_info.desc_size = sizeof(rsbac_pm_pp_set_id_t); 01246 lol_info.data_size = 0; 01247 lol_info.subdesc_size = sizeof(rsbac_pm_purpose_id_t); 01248 lol_info.subdata_size = 0; 01249 lol_info.max_age = 0; 01250 err = rsbac_list_lol_register(RSBAC_LIST_VERSION, 01251 &pp_set_handle, 01252 &lol_info, 01253 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01254 rsbac_list_compare_u32, 01255 rsbac_list_compare_u32, 01256 NULL, 01257 NULL, 01258 NULL, 01259 NULL, 01260 RSBAC_PM_PP_SET_LIST_NAME, 01261 RSBAC_AUTO_DEV); 01262 if(err) 01263 { 01264 registration_error(err, "pp set"); 01265 return err; 01266 } 01267 01268 lol_info.version = RSBAC_PM_NO_VERSION; 01269 lol_info.key = RSBAC_PM_LIST_KEY; 01270 lol_info.desc_size = sizeof(rsbac_pm_in_pp_set_id_t); 01271 lol_info.data_size = 0; 01272 lol_info.subdesc_size = sizeof(rsbac_pm_purpose_id_t); 01273 lol_info.subdata_size = 0; 01274 lol_info.max_age = 0; 01275 err = rsbac_list_lol_register(RSBAC_LIST_VERSION, 01276 &in_pp_set_handle, 01277 &lol_info, 01278 0, 01279 rsbac_list_compare_u32, 01280 rsbac_list_compare_u32, 01281 NULL, 01282 NULL, 01283 NULL, 01284 NULL, 01285 RSBAC_PM_IN_PP_SET_LIST_NAME, 01286 RSBAC_AUTO_DEV); 01287 if(err) 01288 { 01289 registration_error(err, "in_pp set"); 01290 return err; 01291 } 01292 01293 lol_info.version = RSBAC_PM_NO_VERSION; 01294 lol_info.key = RSBAC_PM_LIST_KEY; 01295 lol_info.desc_size = sizeof(rsbac_pm_out_pp_set_id_t); 01296 lol_info.data_size = 0; 01297 lol_info.subdesc_size = sizeof(rsbac_pm_purpose_id_t); 01298 lol_info.subdata_size = 0; 01299 lol_info.max_age = 0; 01300 err = rsbac_list_lol_register(RSBAC_LIST_VERSION, 01301 &out_pp_set_handle, 01302 &lol_info, 01303 0, 01304 rsbac_list_compare_u32, 01305 rsbac_list_compare_u32, 01306 NULL, 01307 NULL, 01308 NULL, 01309 NULL, 01310 RSBAC_PM_OUT_PP_SET_LIST_NAME, 01311 RSBAC_AUTO_DEV); 01312 if(err) 01313 { 01314 registration_error(err, "out_pp set"); 01315 return err; 01316 } 01317 01318 /* Main lists */ 01319 list_info.version = RSBAC_PM_TASK_LIST_VERSION; 01320 list_info.key = RSBAC_PM_LIST_KEY; 01321 list_info.desc_size = sizeof(rsbac_pm_task_id_t); 01322 list_info.data_size = sizeof(struct rsbac_pm_task_data_t); 01323 list_info.max_age = 0; 01324 err = rsbac_list_register(RSBAC_LIST_VERSION, 01325 &task_handle, 01326 &list_info, 01327 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01328 rsbac_list_compare_u32, 01329 NULL, 01330 NULL, 01331 RSBAC_PM_TASK_LIST_NAME, 01332 RSBAC_AUTO_DEV); 01333 if(err) 01334 { 01335 registration_error(err, "task"); 01336 return err; 01337 } 01338 01339 list_info.version = RSBAC_PM_CLASS_LIST_VERSION; 01340 list_info.key = RSBAC_PM_LIST_KEY; 01341 list_info.desc_size = sizeof(rsbac_pm_object_class_id_t); 01342 list_info.data_size = sizeof(struct rsbac_pm_class_data_t); 01343 list_info.max_age = 0; 01344 err = rsbac_list_register(RSBAC_LIST_VERSION, 01345 &class_handle, 01346 &list_info, 01347 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01348 rsbac_list_compare_u32, 01349 NULL, 01350 NULL, 01351 RSBAC_PM_CLASS_LIST_NAME, 01352 RSBAC_AUTO_DEV); 01353 if(err) 01354 { 01355 registration_error(err, "class"); 01356 return err; 01357 } 01358 01359 list_info.version = RSBAC_PM_NA_LIST_VERSION; 01360 list_info.key = RSBAC_PM_LIST_KEY; 01361 list_info.desc_size = sizeof(struct rsbac_pm_na_id_t); 01362 list_info.data_size = sizeof(struct rsbac_pm_na_data_t); 01363 list_info.max_age = 0; 01364 err = rsbac_list_register(RSBAC_LIST_VERSION, 01365 &na_handle, 01366 &list_info, 01367 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01368 rsbac_list_compare_u32, 01369 NULL, 01370 NULL, 01371 RSBAC_PM_NA_LIST_NAME, 01372 RSBAC_AUTO_DEV); 01373 if(err) 01374 { 01375 registration_error(err, "na"); 01376 return err; 01377 } 01378 01379 list_info.version = RSBAC_PM_CS_LIST_VERSION; 01380 list_info.key = RSBAC_PM_LIST_KEY; 01381 list_info.desc_size = sizeof(struct rsbac_pm_cs_id_t); 01382 list_info.data_size = sizeof(struct rsbac_pm_cs_data_t); 01383 list_info.max_age = 0; 01384 err = rsbac_list_register(RSBAC_LIST_VERSION, 01385 &cs_handle, 01386 &list_info, 01387 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01388 rsbac_list_compare_u32, 01389 NULL, 01390 NULL, 01391 RSBAC_PM_CS_LIST_NAME, 01392 RSBAC_AUTO_DEV); 01393 if(err) 01394 { 01395 registration_error(err, "cs"); 01396 return err; 01397 } 01398 01399 list_info.version = RSBAC_PM_TP_LIST_VERSION; 01400 list_info.key = RSBAC_PM_LIST_KEY; 01401 list_info.desc_size = sizeof(rsbac_pm_tp_id_t); 01402 list_info.data_size = sizeof(struct rsbac_pm_tp_data_t); 01403 list_info.max_age = 0; 01404 err = rsbac_list_register(RSBAC_LIST_VERSION, 01405 &tp_handle, 01406 &list_info, 01407 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01408 rsbac_list_compare_u32, 01409 NULL, 01410 NULL, 01411 RSBAC_PM_TP_LIST_NAME, 01412 RSBAC_AUTO_DEV); 01413 if(err) 01414 { 01415 registration_error(err, "tp"); 01416 return err; 01417 } 01418 01419 list_info.version = RSBAC_PM_PP_LIST_VERSION; 01420 list_info.key = RSBAC_PM_LIST_KEY; 01421 list_info.desc_size = sizeof(rsbac_pm_purpose_id_t); 01422 list_info.data_size = sizeof(struct rsbac_pm_pp_data_t); 01423 list_info.max_age = 0; 01424 err = rsbac_list_register(RSBAC_LIST_VERSION, 01425 &pp_handle, 01426 &list_info, 01427 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01428 rsbac_list_compare_u32, 01429 NULL, 01430 NULL, 01431 RSBAC_PM_PP_LIST_NAME, 01432 RSBAC_AUTO_DEV); 01433 if(err) 01434 { 01435 registration_error(err, "pp"); 01436 return err; 01437 } 01438 01439 list_info.version = RSBAC_PM_TKT_LIST_VERSION; 01440 list_info.key = RSBAC_PM_LIST_KEY; 01441 list_info.desc_size = sizeof(rsbac_pm_tkt_id_t); 01442 list_info.data_size = sizeof(struct rsbac_pm_tkt_data_t); 01443 list_info.max_age = 0; 01444 err = rsbac_list_register(RSBAC_LIST_VERSION, 01445 &tkt_handle, 01446 &list_info, 01447 RSBAC_LIST_PERSIST | RSBAC_LIST_BACKUP, 01448 rsbac_list_compare_u32, 01449 NULL, 01450 NULL, 01451 RSBAC_PM_TKT_LIST_NAME, 01452 RSBAC_AUTO_DEV); 01453 if(err) 01454 { 01455 registration_error(err, "tkt"); 01456 return err; 01457 } 01458 01459 #if defined(CONFIG_RSBAC_PROC) && defined(CONFIG_PROC_FS) 01460 tmp_entry_p = create_proc_entry(RSBAC_PM_PROC_STATS_NAME, 01461 S_IFREG | S_IRUGO, 01462 proc_rsbac_root_p); 01463 if(tmp_entry_p) 01464 { 01465 tmp_entry_p->get_info = stats_pm_proc_info; 01466 } 01467 01468 pm_entry_p = create_proc_entry(RSBAC_PM_PROC_DIR_NAME, 01469 S_IFDIR | S_IRUGO | S_IXUGO, 01470 proc_rsbac_root_p); 01471 if(pm_entry_p) 01472 { 01473 tmp_entry_p = create_proc_entry(RSBAC_PM_TASK_SET_LIST_PROC_NAME, 01474 S_IFREG | S_IRUGO, 01475 pm_entry_p); 01476 if(tmp_entry_p) 01477 { 01478 tmp_entry_p->read_proc = pm_list_proc_read; 01479 tmp_entry_p->data = (void *) PA_task_set; 01480 } 01481 tmp_entry_p = create_proc_entry(RSBAC_PM_TP_SET_LIST_PROC_NAME, 01482 S_IFREG | S_IRUGO, 01483 pm_entry_p); 01484 if(tmp_entry_p) 01485 { 01486 tmp_entry_p->read_proc = pm_list_proc_read; 01487 tmp_entry_p->data = (void *) PA_tp_set; 01488 } 01489 tmp_entry_p = create_proc_entry(RSBAC_PM_RU_SET_LIST_PROC_NAME, 01490 S_IFREG | S_IRUGO, 01491 pm_entry_p); 01492 if(tmp_entry_p) 01493 { 01494 tmp_entry_p->read_proc = pm_list_proc_read; 01495 tmp_entry_p->data = (void *) PA_ru_set; 01496 } 01497 tmp_entry_p = create_proc_entry(RSBAC_PM_PP_SET_LIST_PROC_NAME, 01498 S_IFREG | S_IRUGO, 01499 pm_entry_p); 01500 if(tmp_entry_p) 01501 { 01502 tmp_entry_p->read_proc = pm_list_proc_read; 01503 tmp_entry_p->data = (void *) PA_pp_set; 01504 } 01505 tmp_entry_p = create_proc_entry(RSBAC_PM_IN_PP_SET_LIST_PROC_NAME, 01506 S_IFREG | S_IRUGO, 01507 pm_entry_p); 01508 if(tmp_entry_p) 01509 { 01510 tmp_entry_p->read_proc = pm_list_proc_read; 01511 tmp_entry_p->data = (void *) PA_in_pp_set; 01512 } 01513 tmp_entry_p = create_proc_entry(RSBAC_PM_OUT_PP_SET_LIST_PROC_NAME, 01514 S_IFREG | S_IRUGO, 01515 pm_entry_p); 01516 if(tmp_entry_p) 01517 { 01518 tmp_entry_p->read_proc = pm_list_proc_read; 01519 tmp_entry_p->data = (void *) PA_out_pp_set; 01520 } 01521 01522 tmp_entry_p = create_proc_entry(RSBAC_PM_TASK_LIST_PROC_NAME, 01523 S_IFREG | S_IRUGO, 01524 pm_entry_p); 01525 if(tmp_entry_p) 01526 { 01527 tmp_entry_p->read_proc = pm_list_proc_read; 01528 tmp_entry_p->data = (void *) PA_task; 01529 } 01530 tmp_entry_p = create_proc_entry(RSBAC_PM_CLASS_LIST_PROC_NAME, 01531 S_IFREG | S_IRUGO, 01532 pm_entry_p); 01533 if(tmp_entry_p) 01534 { 01535 tmp_entry_p->read_proc = pm_list_proc_read; 01536 tmp_entry_p->data = (void *) PA_class; 01537 } 01538 tmp_entry_p = create_proc_entry(RSBAC_PM_NA_LIST_PROC_NAME, 01539 S_IFREG | S_IRUGO, 01540 pm_entry_p); 01541 if(tmp_entry_p) 01542 { 01543 tmp_entry_p->read_proc = pm_list_proc_read; 01544 tmp_entry_p->data = (void *) PA_na; 01545 } 01546 tmp_entry_p = create_proc_entry(RSBAC_PM_CS_LIST_PROC_NAME, 01547 S_IFREG | S_IRUGO, 01548 pm_entry_p); 01549 if(tmp_entry_p) 01550 { 01551 tmp_entry_p->read_proc = pm_list_proc_read; 01552 tmp_entry_p->data = (void *) PA_cs; 01553 } 01554 tmp_entry_p = create_proc_entry(RSBAC_PM_TP_LIST_PROC_NAME, 01555 S_IFREG | S_IRUGO, 01556 pm_entry_p); 01557 if(tmp_entry_p) 01558 { 01559 tmp_entry_p->read_proc = pm_list_proc_read; 01560 tmp_entry_p->data = (void *) PA_tp; 01561 } 01562 tmp_entry_p = create_proc_entry(RSBAC_PM_PP_LIST_PROC_NAME, 01563 S_IFREG | S_IRUGO, 01564 pm_entry_p); 01565 if(tmp_entry_p) 01566 { 01567 tmp_entry_p->read_proc = pm_list_proc_read; 01568 tmp_entry_p->data = (void *) PA_pp; 01569 } 01570 tmp_entry_p = create_proc_entry(RSBAC_PM_TKT_LIST_PROC_NAME, 01571 S_IFREG | S_IRUGO, 01572 pm_entry_p); 01573 if(tmp_entry_p) 01574 { 01575 tmp_entry_p->read_proc = pm_list_proc_read; 01576 tmp_entry_p->data = (void *) PA_tkt; 01577 } 01578 } 01579 #endif 01580 01581 #ifdef CONFIG_RSBAC_DEBUG 01582 if (rsbac_debug_ds_pm) 01583 { 01584 rsbac_printk(KERN_DEBUG "rsbac_init_pm(): Ready.\n"); 01585 } 01586 #endif 01587 return(err); 01588 };
|
|
Definition at line 2769 of file pm_data_structures.c. References class_handle, cs_handle, na_handle, pp_handle, RSBAC_EINVALIDTARGET, rsbac_ta_list_add_ttl(), task_handle, tkt_handle, and tp_handle. Referenced by rsbac_pm(). 02773 { 02774 switch (target) 02775 { 02776 case PMT_TASK: 02777 /* 02778 #ifdef CONFIG_RSBAC_DEBUG 02779 if (rsbac_debug_ds_pm) 02780 rsbac_printk(KERN_DEBUG 02781 "rsbac_pm_add_target(): Adding task item\n"); 02782 #endif 02783 */ 02784 return rsbac_ta_list_add_ttl(ta_number, task_handle, 0, &data.task.id, &data.task); 02785 02786 case PMT_CLASS: 02787 /* 02788 #ifdef CONFIG_RSBAC_DEBUG 02789 if (rsbac_debug_ds_pm) 02790 rsbac_printk(KERN_DEBUG 02791 "rsbac_pm_add_target(): Adding class item\n"); 02792 #endif 02793 */ 02794 return rsbac_ta_list_add_ttl(ta_number, class_handle, 0, &data.object_class.id, &data.object_class); 02795 02796 case PMT_NA: 02797 { 02798 struct rsbac_pm_na_id_t na_id; 02799 02800 /* 02801 #ifdef CONFIG_RSBAC_DEBUG 02802 if (rsbac_debug_ds_pm) 02803 rsbac_printk(KERN_DEBUG 02804 "rsbac_pm_add_target(): Adding na item\n"); 02805 #endif 02806 */ 02807 na_id.task = data.na.task; 02808 na_id.object_class = data.na.object_class; 02809 na_id.tp = data.na.tp; 02810 return rsbac_ta_list_add_ttl(ta_number, na_handle, 0, &na_id, &data.na); 02811 } 02812 02813 case PMT_CS: 02814 { 02815 struct rsbac_pm_cs_id_t cs_id; 02816 02817 /* 02818 #ifdef CONFIG_RSBAC_DEBUG 02819 if (rsbac_debug_ds_pm) 02820 rsbac_printk(KERN_DEBUG 02821 "rsbac_pm_add_target(): Adding cs item\n"); 02822 #endif 02823 */ 02824 cs_id.purpose = data.cs.purpose; 02825 cs_id.file = data.cs.file; 02826 return rsbac_ta_list_add_ttl(ta_number, cs_handle, 0, &cs_id, &data.cs); 02827 } 02828 02829 case PMT_TP: 02830 /* 02831 #ifdef CONFIG_RSBAC_DEBUG 02832 if (rsbac_debug_ds_pm) 02833 rsbac_printk(KERN_DEBUG 02834 "rsbac_pm_add_target(): Adding tp item\n"); 02835 #endif 02836 */ 02837 return rsbac_ta_list_add_ttl(ta_number, tp_handle, 0, &data.tp.id, &data.tp); 02838 02839 case PMT_PP: 02840 /* 02841 #ifdef CONFIG_RSBAC_DEBUG 02842 if (rsbac_debug_ds_pm) 02843 rsbac_printk(KERN_DEBUG 02844 "rsbac_pm_add_target(): Adding pp item\n"); 02845 #endif 02846 */ 02847 return rsbac_ta_list_add_ttl(ta_number, pp_handle, 0, &data.pp.id, &data.pp); 02848 02849 case PMT_TKT: 02850 /* 02851 #ifdef CONFIG_RSBAC_DEBUG 02852 if (rsbac_debug_ds_pm) 02853 rsbac_printk(KERN_DEBUG 02854 "rsbac_pm_add_target(): Adding tkt item\n"); 02855 #endif 02856 */ 02857 return rsbac_ta_list_add_ttl(ta_number, tkt_handle, 0, &data.tkt.id, &data.tkt); 02858 02859 /* switch target: no valid target */ 02860 default: 02861 return(-RSBAC_EINVALIDTARGET); 02862 } 02863 } /* end of rsbac_pm_add_target() */
|
|
Definition at line 1714 of file pm_data_structures.c. References in_pp_set_handle, NULL, out_pp_set_handle, pp_set_handle, RSBAC_EINVALIDTARGET, rsbac_ta_list_lol_subadd_ttl(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by adjust_in_out_pp_ipc(), and rsbac_pm(). 01719 { 01720 switch(set) 01721 { 01722 case PS_TASK: 01723 return(rsbac_ta_list_lol_subadd_ttl(ta_number, task_set_handle, 0, &id.task_set, &member.task, NULL)); 01724 case PS_TP: 01725 return(rsbac_ta_list_lol_subadd_ttl(ta_number, tp_set_handle, 0, &id.tp_set, &member.tp, NULL)); 01726 case PS_RU: 01727 return(rsbac_ta_list_lol_subadd_ttl(ta_number, ru_set_handle, 0, &id.ru_set, &member.ru, NULL)); 01728 case PS_PP: 01729 return(rsbac_ta_list_lol_subadd_ttl(ta_number, pp_set_handle, 0, &id.pp_set, &member.pp, NULL)); 01730 case PS_IN_PP: 01731 return(rsbac_ta_list_lol_subadd_ttl(ta_number, in_pp_set_handle, 0, &id.in_pp_set, &member.pp, NULL)); 01732 case PS_OUT_PP: 01733 return(rsbac_ta_list_lol_subadd_ttl(ta_number, out_pp_set_handle, 0, &id.out_pp_set, &member.pp, NULL)); 01734 default: 01735 return(-RSBAC_EINVALIDTARGET); 01736 } 01737 }
|
|
Definition at line 1774 of file pm_data_structures.c. References in_pp_set_handle, out_pp_set_handle, pp_set_handle, RSBAC_EINVALIDTARGET, rsbac_ta_list_lol_subremove_all(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by adjust_in_out_pp_ipc(), and rsbac_pm(). 01778 { 01779 switch(set) 01780 { 01781 case PS_TASK: 01782 return(rsbac_ta_list_lol_subremove_all(ta_number, task_set_handle, &id.task_set)); 01783 case PS_TP: 01784 return(rsbac_ta_list_lol_subremove_all(ta_number, tp_set_handle, &id.tp_set)); 01785 case PS_RU: 01786 return(rsbac_ta_list_lol_subremove_all(ta_number, ru_set_handle, &id.ru_set)); 01787 case PS_PP: 01788 return(rsbac_ta_list_lol_subremove_all(ta_number, pp_set_handle, &id.pp_set)); 01789 case PS_IN_PP: 01790 return(rsbac_ta_list_lol_subremove_all(ta_number, in_pp_set_handle, &id.in_pp_set)); 01791 case PS_OUT_PP: 01792 return(rsbac_ta_list_lol_subremove_all(ta_number, out_pp_set_handle, &id.out_pp_set)); 01793 default: 01794 return(-RSBAC_EINVALIDTARGET); 01795 } 01796 }
|
|
Definition at line 2006 of file pm_data_structures.c. References in_pp_set_handle, NULL, out_pp_set_handle, pp_set_handle, RSBAC_EEXISTS, RSBAC_EINVALIDTARGET, rsbac_ta_list_lol_add_ttl(), rsbac_ta_list_lol_exist(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by adjust_in_out_pp_ipc(), and rsbac_pm(). 02010 { 02011 switch (set) 02012 { 02013 case PS_TASK: 02014 /* 02015 #ifdef CONFIG_RSBAC_DEBUG 02016 if (rsbac_debug_ds_pm) 02017 rsbac_printk(KERN_DEBUG "rsbac_pm_create_set(): Creating task set\n"); 02018 #endif 02019 */ 02020 if(rsbac_ta_list_lol_exist(ta_number, task_set_handle, &id.task_set)) 02021 return -RSBAC_EEXISTS; 02022 return rsbac_ta_list_lol_add_ttl(ta_number, task_set_handle, 0, &id.task_set, NULL); 02023 case PS_TP: 02024 /* 02025 #ifdef CONFIG_RSBAC_DEBUG 02026 if (rsbac_debug_ds_pm) 02027 rsbac_printk(KERN_DEBUG "rsbac_pm_create_set(): Creating tp set\n"); 02028 #endif 02029 */ 02030 if(rsbac_ta_list_lol_exist(ta_number, tp_set_handle, &id.tp_set)) 02031 return -RSBAC_EEXISTS; 02032 return rsbac_ta_list_lol_add_ttl(ta_number, tp_set_handle, 0, &id.tp_set, NULL); 02033 case PS_RU: 02034 /* 02035 #ifdef CONFIG_RSBAC_DEBUG 02036 if (rsbac_debug_ds_pm) 02037 rsbac_printk(KERN_DEBUG "rsbac_pm_create_set(): Creating ru set\n"); 02038 #endif 02039 */ 02040 if(rsbac_ta_list_lol_exist(ta_number, ru_set_handle, &id.ru_set)) 02041 return -RSBAC_EEXISTS; 02042 return rsbac_ta_list_lol_add_ttl(ta_number, ru_set_handle, 0, &id.ru_set, NULL); 02043 case PS_PP: 02044 /* 02045 #ifdef CONFIG_RSBAC_DEBUG 02046 if (rsbac_debug_ds_pm) 02047 rsbac_printk(KERN_DEBUG "rsbac_pm_create_set(): Creating pp set\n"); 02048 #endif 02049 */ 02050 if(rsbac_ta_list_lol_exist(ta_number, pp_set_handle, &id.pp_set)) 02051 return -RSBAC_EEXISTS; 02052 return rsbac_ta_list_lol_add_ttl(ta_number, pp_set_handle, 0, &id.pp_set, NULL); 02053 case PS_IN_PP: 02054 /* 02055 #ifdef CONFIG_RSBAC_DEBUG 02056 if (rsbac_debug_ds_pm) 02057 rsbac_printk(KERN_DEBUG "rsbac_pm_create_set(): Creating in_pp set\n"); 02058 #endif 02059 */ 02060 if(rsbac_ta_list_lol_exist(ta_number, in_pp_set_handle, &id.in_pp_set)) 02061 return -RSBAC_EEXISTS; 02062 return rsbac_ta_list_lol_add_ttl(ta_number, in_pp_set_handle, 0, &id.in_pp_set, NULL); 02063 case PS_OUT_PP: 02064 /* 02065 #ifdef CONFIG_RSBAC_DEBUG 02066 if (rsbac_debug_ds_pm) 02067 rsbac_printk(KERN_DEBUG "rsbac_pm_create_set(): Creating out_pp set\n"); 02068 #endif 02069 */ 02070 if(rsbac_ta_list_lol_exist(ta_number, out_pp_set_handle, &id.out_pp_set)) 02071 return -RSBAC_EEXISTS; 02072 return rsbac_ta_list_lol_add_ttl(ta_number, out_pp_set_handle, 0, &id.out_pp_set, NULL); 02073 02074 default: 02075 return(-RSBAC_EINVALIDTARGET); 02076 } 02077 }
|
|
Definition at line 2486 of file pm_data_structures.c. References class_handle, cs_handle, FALSE, na_handle, NULL, pp_handle, pp_set_handle, RSBAC_PM_DEV_OBJECT_CLASS_ID, RSBAC_PM_IPC_OBJECT_CLASS_ID, rsbac_printk(), rsbac_ta_list_exist(), rsbac_ta_list_get_data_ttl(), rsbac_ta_list_lol_exist(), rsbac_ta_list_lol_remove(), rsbac_ta_list_remove(), task_handle, tkt_handle, tp_handle, and TRUE. Referenced by na_and_pp_or_cs(), rsbac_pm(), and rsbac_pm_create_file(). 02490 { 02491 switch (target) 02492 { 02493 case PMT_TASK: 02494 return rsbac_ta_list_exist(ta_number, task_handle, &tid.task); 02495 02496 case PMT_CLASS: 02497 /* IPC and DEV classes always exist */ 02498 if( (tid.object_class == RSBAC_PM_IPC_OBJECT_CLASS_ID) 02499 || (tid.object_class == RSBAC_PM_DEV_OBJECT_CLASS_ID)) 02500 return(TRUE); 02501 return rsbac_ta_list_exist(ta_number, class_handle, &tid.object_class); 02502 02503 case PMT_NA: 02504 return rsbac_ta_list_exist(ta_number, na_handle, &tid.na); 02505 02506 case PMT_CS: 02507 return rsbac_ta_list_exist(ta_number, cs_handle, &tid.cs); 02508 02509 case PMT_TP: 02510 return rsbac_ta_list_exist(ta_number, tp_handle, &tid.tp); 02511 02512 case PMT_PP: 02513 return rsbac_ta_list_exist(ta_number, pp_handle, &tid.pp); 02514 02515 case PMT_TKT: 02516 { 02517 struct rsbac_pm_tkt_data_t all_data; 02518 02519 if(rsbac_ta_list_get_data_ttl(ta_number, tkt_handle, 02520 NULL, &tid.tkt, &all_data)) 02521 return FALSE; 02522 02523 /* ticket too old? -> remove it and return FALSE */ 02524 { 02525 if(all_data.valid_until < RSBAC_CURRENT_TIME) 02526 { 02527 rsbac_pm_pp_set_id_t pp_set = -tid.tkt; 02528 02529 if(rsbac_ta_list_lol_exist(ta_number, pp_set_handle, &pp_set)) 02530 rsbac_ta_list_lol_remove(ta_number, pp_set_handle, &pp_set); 02531 rsbac_ta_list_remove(ta_number, tkt_handle, &tid.tkt); 02532 return(FALSE); 02533 } 02534 else 02535 return TRUE; 02536 } 02537 } 02538 /* switch target: no valid target */ 02539 default: 02540 rsbac_printk(KERN_WARNING 02541 "rsbac_pm_exists(): Invalid target!\n"); 02542 return FALSE; 02543 } 02544 } /* end of rsbac_pm_exists() */
|
|
Definition at line 2391 of file pm_data_structures.c. References class_handle, cs_handle, na_handle, NULL, pp_handle, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, rsbac_ta_list_get_data_ttl(), task_handle, tkt_handle, and tp_handle. Referenced by rsbac_pm(). 02396 { 02397 if (!value) 02398 return(-RSBAC_EINVALIDVALUE); 02399 switch (target) 02400 { 02401 case PMT_TASK: 02402 /* 02403 #ifdef CONFIG_RSBAC_DEBUG 02404 if (rsbac_debug_ds_pm) 02405 rsbac_printk(KERN_DEBUG 02406 "rsbac_pm_get_data(): Getting task data\n"); 02407 #endif 02408 */ 02409 return rsbac_ta_list_get_data_ttl(ta_number, task_handle, 02410 NULL, &tid.task, &value->task); 02411 02412 case PMT_CLASS: 02413 /* 02414 #ifdef CONFIG_RSBAC_DEBUG 02415 if (rsbac_debug_ds_pm) 02416 rsbac_printk(KERN_DEBUG 02417 "rsbac_pm_get_data(): Getting class data\n"); 02418 #endif 02419 */ 02420 return rsbac_ta_list_get_data_ttl(ta_number, class_handle, 02421 NULL, &tid.object_class, &value->object_class); 02422 02423 case PMT_NA: 02424 /* 02425 #ifdef CONFIG_RSBAC_DEBUG 02426 if (rsbac_debug_ds_pm) 02427 rsbac_printk(KERN_DEBUG 02428 "rsbac_pm_get_data(): Getting na data\n"); 02429 #endif 02430 */ 02431 return rsbac_ta_list_get_data_ttl(ta_number, na_handle, 02432 NULL, &tid.na, &value->na); 02433 02434 case PMT_CS: 02435 /* 02436 #ifdef CONFIG_RSBAC_DEBUG 02437 if (rsbac_debug_ds_pm) 02438 rsbac_printk(KERN_DEBUG 02439 "rsbac_pm_get_data(): Getting cs data\n"); 02440 #endif 02441 */ 02442 return rsbac_ta_list_get_data_ttl(ta_number, cs_handle, 02443 NULL, &tid.cs, &value->cs); 02444 02445 case PMT_TP: 02446 /* 02447 #ifdef CONFIG_RSBAC_DEBUG 02448 if (rsbac_debug_ds_pm) 02449 rsbac_printk(KERN_DEBUG 02450 "rsbac_pm_get_data(): Getting tp data\n"); 02451 #endif 02452 */ 02453 return rsbac_ta_list_get_data_ttl(ta_number, tp_handle, 02454 NULL, &tid.tp, &value->tp); 02455 02456 case PMT_PP: 02457 /* 02458 #ifdef CONFIG_RSBAC_DEBUG 02459 if (rsbac_debug_ds_pm) 02460 rsbac_printk(KERN_DEBUG 02461 "rsbac_pm_get_data(): Getting pp data\n"); 02462 #endif 02463 */ 02464 return rsbac_ta_list_get_data_ttl(ta_number, pp_handle, 02465 NULL, &tid.pp, &value->pp); 02466 02467 case PMT_TKT: 02468 /* 02469 #ifdef CONFIG_RSBAC_DEBUG 02470 if (rsbac_debug_ds_pm) 02471 rsbac_printk(KERN_DEBUG 02472 "rsbac_pm_get_data(): Getting tkt data\n"); 02473 #endif 02474 */ 02475 return rsbac_ta_list_get_data_ttl(ta_number, tkt_handle, 02476 NULL, &tid.tkt, &value->tkt); 02477 02478 /* switch target: no valid target */ 02479 default: 02480 return(-RSBAC_EINVALIDTARGET); 02481 } 02482 } /* end of rsbac_pm_get_all_data() */
|
|
Definition at line 2150 of file pm_data_structures.c. References class_handle, cs_handle, na_handle, NULL, pp_handle, RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, RSBAC_EINVALIDVALUE, rsbac_ta_list_get_data_ttl(), task_handle, tkt_handle, and tp_handle. Referenced by adjust_in_out_pp(), na_and_pp_ipc(), na_and_pp_or_cs(), na_dev(), na_ipc(), rsbac_adf_request_pm(), rsbac_adf_set_attr_pm(), rsbac_pm(), and rsbac_pm_create_file(). 02156 { 02157 int err = 0; 02158 02159 if (!value) 02160 return(-RSBAC_EINVALIDVALUE); 02161 02162 switch (target) 02163 { 02164 case PMT_TASK: 02165 { 02166 struct rsbac_pm_task_data_t all_data; 02167 02168 /* 02169 #ifdef CONFIG_RSBAC_DEBUG 02170 if (rsbac_debug_ds_pm) 02171 rsbac_printk(KERN_DEBUG 02172 "rsbac_pm_get_data(): Getting task data\n"); 02173 #endif 02174 */ 02175 err = rsbac_ta_list_get_data_ttl(ta_number, task_handle, 02176 NULL, &tid.task, &all_data); 02177 if(err) 02178 return err; 02179 02180 switch (data) 02181 { 02182 case PD_purpose: 02183 value->purpose = all_data.purpose; 02184 break; 02185 case PD_tp_set: 02186 value->tp_set = all_data.tp_set; 02187 break; 02188 case PD_ru_set: 02189 value->ru_set = all_data.ru_set; 02190 break; 02191 default: 02192 return -RSBAC_EINVALIDATTR; 02193 } 02194 return 0; 02195 } 02196 02197 case PMT_CLASS: 02198 { 02199 struct rsbac_pm_class_data_t all_data; 02200 02201 /* 02202 #ifdef CONFIG_RSBAC_DEBUG 02203 if (rsbac_debug_ds_pm) 02204 rsbac_printk(KERN_DEBUG 02205 "rsbac_pm_get_data(): Getting class data\n"); 02206 #endif 02207 */ 02208 err = rsbac_ta_list_get_data_ttl(ta_number, class_handle, 02209 NULL, &tid.object_class, &all_data); 02210 if(err) 02211 return err; 02212 02213 switch (data) 02214 { 02215 case PD_pp_set: 02216 value->pp_set = all_data.pp_set; 02217 break; 02218 default: 02219 return -RSBAC_EINVALIDATTR; 02220 } 02221 return 0; 02222 } 02223 02224 case PMT_NA: 02225 { 02226 struct rsbac_pm_na_data_t all_data; 02227 02228 /* 02229 #ifdef CONFIG_RSBAC_DEBUG 02230 if (rsbac_debug_ds_pm) 02231 rsbac_printk(KERN_DEBUG 02232 "rsbac_pm_get_data(): Getting na data\n"); 02233 #endif 02234 */ 02235 err = rsbac_ta_list_get_data_ttl(ta_number, na_handle, 02236 NULL, &tid.na, &all_data); 02237 if(err) 02238 return err; 02239 02240 switch (data) 02241 { 02242 case PD_task: 02243 value->task = all_data.task; 02244 break; 02245 case PD_class: 02246 value->object_class = all_data.object_class; 02247 break; 02248 case PD_tp: 02249 value->tp = all_data.tp; 02250 break; 02251 case PD_accesses: 02252 value->accesses = all_data.accesses; 02253 break; 02254 default: 02255 return -RSBAC_EINVALIDATTR; 02256 } 02257 return 0; 02258 } 02259 02260 case PMT_CS: 02261 { 02262 struct rsbac_pm_cs_data_t all_data; 02263 02264 /* 02265 #ifdef CONFIG_RSBAC_DEBUG 02266 if (rsbac_debug_ds_pm) 02267 rsbac_printk(KERN_DEBUG 02268 "rsbac_pm_get_data(): Getting cs data\n"); 02269 #endif 02270 */ 02271 err = rsbac_ta_list_get_data_ttl(ta_number, cs_handle, 02272 NULL, &tid.cs, &all_data); 02273 if(err) 02274 return err; 02275 02276 switch (data) 02277 { 02278 case PD_purpose: 02279 value->purpose = all_data.purpose; 02280 break; 02281 case PD_file: 02282 value->file = all_data.file; 02283 break; 02284 default: 02285 return -RSBAC_EINVALIDATTR; 02286 } 02287 return 0; 02288 } 02289 02290 case PMT_TP: 02291 { 02292 struct rsbac_pm_tp_data_t all_data; 02293 02294 /* 02295 #ifdef CONFIG_RSBAC_DEBUG 02296 if (rsbac_debug_ds_pm) 02297 rsbac_printk(KERN_DEBUG 02298 "rsbac_pm_get_data(): Getting tp data\n"); 02299 #endif 02300 */ 02301 err = rsbac_ta_list_get_data_ttl(ta_number, tp_handle, 02302 NULL, &tid.tp, &all_data); 02303 if(err) 02304 return err; 02305 02306 switch (data) 02307 { 02308 case PD_tp: 02309 value->tp = all_data.id; 02310 break; 02311 default: 02312 return -RSBAC_EINVALIDATTR; 02313 } 02314 return 0; 02315 } 02316 02317 case PMT_PP: 02318 { 02319 struct rsbac_pm_pp_data_t all_data; 02320 02321 /* 02322 #ifdef CONFIG_RSBAC_DEBUG 02323 if (rsbac_debug_ds_pm) 02324 rsbac_printk(KERN_DEBUG 02325 "rsbac_pm_get_data(): Getting pp data\n"); 02326 #endif 02327 */ 02328 err = rsbac_ta_list_get_data_ttl(ta_number, pp_handle, 02329 NULL, &tid.pp, &all_data); 02330 if(err) 02331 return err; 02332 02333 switch (data) 02334 { 02335 case PD_purpose: 02336 value->purpose = all_data.id; 02337 break; 02338 case PD_def_class: 02339 value->def_class = all_data.def_class; 02340 break; 02341 default: 02342 return -RSBAC_EINVALIDATTR; 02343 } 02344 return 0; 02345 } 02346 02347 case PMT_TKT: 02348 { 02349 struct rsbac_pm_tkt_data_t all_data; 02350 02351 /* 02352 #ifdef CONFIG_RSBAC_DEBUG 02353 if (rsbac_debug_ds_pm) 02354 rsbac_printk(KERN_DEBUG 02355 "rsbac_pm_get_data(): Getting tkt data\n"); 02356 #endif 02357 */ 02358 err = rsbac_ta_list_get_data_ttl(ta_number, tkt_handle, 02359 NULL, &tid.tkt, &all_data); 02360 if(err) 02361 return err; 02362 02363 switch (data) 02364 { 02365 case PD_issuer: 02366 value->issuer = all_data.issuer; 02367 break; 02368 case PD_function_type: 02369 value->function_type = all_data.function_type; 02370 break; 02371 case PD_function_param: 02372 value->function_param = all_data.function_param; 02373 break; 02374 case PD_valid_until: 02375 value->valid_until = all_data.valid_until; 02376 break; 02377 default: 02378 return -RSBAC_EINVALIDATTR; 02379 } 02380 return 0; 02381 } 02382 02383 /* switch target: no valid target */ 02384 default: 02385 return(-RSBAC_EINVALIDTARGET); 02386 } 02387 }; /* end of rsbac_pm_get_data() */
|
|
Definition at line 1925 of file pm_data_structures.c. References in_pp_set_handle, NULL, pp_set_handle, RSBAC_EINVALIDVALUE, rsbac_list_lol_add(), rsbac_list_lol_exist(), rsbac_list_lol_get_all_subdesc(), rsbac_list_lol_subadd(), rsbac_list_lol_subexist(), rsbac_list_lol_subremove(), and rsbac_vfree. Referenced by adjust_in_out_pp(). 01927 { 01928 rsbac_pm_purpose_id_t * pp_array; 01929 long count; 01930 u_long i; 01931 01932 if(!rsbac_list_lol_exist(pp_set_handle, &pp_set)) 01933 return -RSBAC_EINVALIDVALUE; 01934 01935 if(!rsbac_list_lol_exist(in_pp_set_handle, &in_pp_set)) 01936 { /* in_pp_set not found -> try to create and fill with pp_set */ 01937 if((count = rsbac_list_lol_add(in_pp_set_handle, &in_pp_set, NULL))) 01938 return count; 01939 /* creation successful -> copy list */ 01940 /* get all pp_set members */ 01941 count = rsbac_list_lol_get_all_subdesc(pp_set_handle, &pp_set, (void **) &pp_array); 01942 if(count <= 0) 01943 return count; 01944 for(i=0; i < count; i++) 01945 { 01946 rsbac_list_lol_subadd(in_pp_set_handle, &in_pp_set, &pp_array[i], NULL); 01947 } 01948 rsbac_vfree(pp_array); 01949 } 01950 else 01951 { /* in_pp_set exists -> remove all members not in pp_set */ 01952 /* get all in_pp_set members */ 01953 count = rsbac_list_lol_get_all_subdesc(in_pp_set_handle, &in_pp_set, (void **) &pp_array); 01954 if(count <= 0) 01955 return count; 01956 for(i=0; i < count; i++) 01957 { 01958 if(!rsbac_list_lol_subexist(pp_set_handle, &pp_set, &pp_array[i])) 01959 rsbac_list_lol_subremove(in_pp_set_handle, &in_pp_set, &pp_array[i]); 01960 } 01961 rsbac_vfree(pp_array); 01962 } 01963 return 0; 01964 }
|
|
Definition at line 1902 of file pm_data_structures.c. References FALSE, out_pp_set_handle, rsbac_list_lol_subcount(), rsbac_list_lol_subexist(), and TRUE. Referenced by na_and_pp_ipc(). 01904 { 01905 long count; 01906 01907 if(!out_pp_set) 01908 return(TRUE); 01909 01910 /* get number of pp_set members */ 01911 count = rsbac_list_lol_subcount(out_pp_set_handle, &out_pp_set); 01912 if(count <= 0) 01913 return TRUE; 01914 if(count == 1) 01915 return rsbac_list_lol_subexist(out_pp_set_handle, &out_pp_set, &purpose); 01916 else 01917 return FALSE; 01918 }
|
|
Definition at line 1829 of file pm_data_structures.c. References FALSE, in_pp_set_handle, pp_set_handle, rsbac_list_lol_exist(), rsbac_list_lol_get_all_subdesc(), rsbac_list_lol_subexist(), rsbac_vfree, and TRUE. Referenced by na_and_pp_or_cs(). 01831 { 01832 rsbac_pm_purpose_id_t * pp_array; 01833 long count; 01834 u_long i; 01835 rsbac_boolean_t result = TRUE; 01836 01837 if(!pp_set || !in_pp_set) 01838 return(FALSE); 01839 01840 /* get all pp_set members */ 01841 count = rsbac_list_lol_get_all_subdesc(pp_set_handle, &pp_set, (void **) &pp_array); 01842 if(count < 0) 01843 return FALSE; 01844 if(!count) 01845 return TRUE; 01846 if(!rsbac_list_lol_exist(in_pp_set_handle, &in_pp_set)) 01847 { 01848 rsbac_vfree(pp_array); 01849 return TRUE; 01850 } 01851 /* check all members in in_pp_set */ 01852 for(i=0; i< count; i++) 01853 { 01854 if(!rsbac_list_lol_subexist(in_pp_set_handle, &in_pp_set, &pp_array[i])) 01855 { 01856 result = FALSE; 01857 break; 01858 } 01859 } 01860 rsbac_vfree(pp_array); 01861 return result; 01862 }
|
|
Definition at line 1867 of file pm_data_structures.c. References FALSE, out_pp_set_handle, pp_set_handle, rsbac_list_lol_exist(), rsbac_list_lol_get_all_subdesc(), rsbac_list_lol_subexist(), rsbac_vfree, and TRUE. Referenced by na_and_pp_or_cs(). 01869 { 01870 rsbac_pm_purpose_id_t * pp_array; 01871 long count; 01872 u_long i; 01873 rsbac_boolean_t result = TRUE; 01874 01875 if(!pp_set) 01876 return(FALSE); 01877 if(!out_pp_set) 01878 return(TRUE); 01879 if(!rsbac_list_lol_exist(pp_set_handle, &pp_set)) 01880 return FALSE; 01881 01882 /* get all pp_set members */ 01883 count = rsbac_list_lol_get_all_subdesc(out_pp_set_handle, &out_pp_set, (void **) &pp_array); 01884 if(count <= 0) 01885 return TRUE; 01886 /* check all members in in_pp_set */ 01887 for(i=0; i< count; i++) 01888 { 01889 if(!rsbac_list_lol_subexist(pp_set_handle, &pp_set, &pp_array[i])) 01890 { 01891 result = FALSE; 01892 break; 01893 } 01894 } 01895 rsbac_vfree(pp_array); 01896 return result; 01897 }
|
|
Definition at line 1971 of file pm_data_structures.c. References NULL, out_pp_set_handle, pp_set_handle, RSBAC_EINVALIDVALUE, rsbac_list_lol_add(), rsbac_list_lol_exist(), rsbac_list_lol_get_all_subdesc(), rsbac_list_lol_subadd(), and rsbac_vfree. Referenced by adjust_in_out_pp(). 01973 { 01974 rsbac_pm_purpose_id_t * pp_array; 01975 long count; 01976 u_long i; 01977 01978 /* check, whether set-id pp_set exists */ 01979 if(!rsbac_list_lol_exist(pp_set_handle, &pp_set)) 01980 return -RSBAC_EINVALIDVALUE; 01981 01982 if(!rsbac_list_lol_exist(out_pp_set_handle, &out_pp_set)) 01983 { /* out_pp_set not found -> try to create */ 01984 count = rsbac_list_lol_add(out_pp_set_handle, &out_pp_set, NULL); 01985 if(count) 01986 return count; 01987 } 01988 /* out_pp_set exists -> add all members in pp_set */ 01989 /* get all pp_set members */ 01990 count = rsbac_list_lol_get_all_subdesc(pp_set_handle, &pp_set, (void **) &pp_array); 01991 if(count <= 0) 01992 return count; 01993 for(i=0; i < count; i++) 01994 { 01995 rsbac_list_lol_subadd(out_pp_set_handle, &out_pp_set, &pp_array[i], NULL); 01996 } 01997 rsbac_vfree(pp_array); 01998 return 0; 01999 }
|
|
Definition at line 1744 of file pm_data_structures.c. References in_pp_set_handle, out_pp_set_handle, pp_set_handle, RSBAC_EINVALIDTARGET, rsbac_ta_list_lol_subremove(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by rsbac_pm(). 01749 { 01750 switch(set) 01751 { 01752 case PS_TASK: 01753 return(rsbac_ta_list_lol_subremove(ta_number, task_set_handle, &id.task_set, &member.task)); 01754 case PS_TP: 01755 return(rsbac_ta_list_lol_subremove(ta_number, tp_set_handle, &id.tp_set, &member.tp)); 01756 case PS_RU: 01757 return(rsbac_ta_list_lol_subremove(ta_number, ru_set_handle, &id.ru_set, &member.ru)); 01758 case PS_PP: 01759 return(rsbac_ta_list_lol_subremove(ta_number, pp_set_handle, &id.pp_set, &member.pp)); 01760 case PS_IN_PP: 01761 return(rsbac_ta_list_lol_subremove(ta_number, in_pp_set_handle, &id.in_pp_set, &member.pp)); 01762 case PS_OUT_PP: 01763 return(rsbac_ta_list_lol_subremove(ta_number, out_pp_set_handle, &id.out_pp_set, &member.pp)); 01764 default: 01765 return(-RSBAC_EINVALIDTARGET); 01766 } 01767 }
|
|
Definition at line 2113 of file pm_data_structures.c. References in_pp_set_handle, out_pp_set_handle, pp_set_handle, RSBAC_EINVALIDTARGET, rsbac_ta_list_lol_remove(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by rsbac_adf_request_pm(), and rsbac_pm(). 02117 { 02118 switch (set) 02119 { 02120 case PS_TASK: 02121 return rsbac_ta_list_lol_remove(ta_number, task_set_handle, &id.task_set); 02122 case PS_TP: 02123 return rsbac_ta_list_lol_remove(ta_number, tp_set_handle, &id.tp_set); 02124 case PS_RU: 02125 return rsbac_ta_list_lol_remove(ta_number, ru_set_handle, &id.ru_set); 02126 case PS_PP: 02127 return rsbac_ta_list_lol_remove(ta_number, pp_set_handle, &id.pp_set); 02128 case PS_IN_PP: 02129 return rsbac_ta_list_lol_remove(ta_number, in_pp_set_handle, &id.in_pp_set); 02130 case PS_OUT_PP: 02131 return rsbac_ta_list_lol_remove(ta_number, out_pp_set_handle, &id.out_pp_set); 02132 02133 default: 02134 return -RSBAC_EINVALIDTARGET; 02135 } 02136 }
|
|
Definition at line 2867 of file pm_data_structures.c. References class_handle, cs_handle, na_handle, pp_handle, pp_set_handle, RSBAC_EINVALIDTARGET, rsbac_ta_list_lol_exist(), rsbac_ta_list_lol_remove(), rsbac_ta_list_remove(), task_handle, tkt_handle, and tp_handle. Referenced by rsbac_pm(). 02871 { 02872 switch (target) 02873 { 02874 case PMT_TASK: 02875 /* 02876 #ifdef CONFIG_RSBAC_DEBUG 02877 if (rsbac_debug_ds_pm) 02878 rsbac_printk(KERN_DEBUG 02879 "rsbac_pm_remove_target(): Removing task data\n"); 02880 #endif 02881 */ 02882 return rsbac_ta_list_remove(ta_number, task_handle, &tid.task); 02883 02884 case PMT_CLASS: 02885 /* 02886 #ifdef CONFIG_RSBAC_DEBUG 02887 if (rsbac_debug_ds_pm) rsbac_printk(KERN_DEBUG "%s\n", 02888 "rsbac_pm_remove_target(): Removing class data"); 02889 #endif 02890 */ 02891 return rsbac_ta_list_remove(ta_number, class_handle, &tid.object_class); 02892 02893 case PMT_NA: 02894 /* 02895 #ifdef CONFIG_RSBAC_DEBUG 02896 if (rsbac_debug_ds_pm) rsbac_printk(KERN_DEBUG "%s\n", 02897 "rsbac_pm_remove_target(): Removing tp data"); 02898 #endif 02899 */ 02900 return rsbac_ta_list_remove(ta_number, na_handle, &tid.na); 02901 02902 case PMT_CS: 02903 /* 02904 #ifdef CONFIG_RSBAC_DEBUG 02905 if (rsbac_debug_ds_pm) rsbac_printk(KERN_DEBUG "%s\n", 02906 "rsbac_pm_remove_target(): Removing cs data"); 02907 #endif 02908 */ 02909 return rsbac_ta_list_remove(ta_number, cs_handle, &tid.cs); 02910 02911 case PMT_TP: 02912 /* 02913 #ifdef CONFIG_RSBAC_DEBUG 02914 if (rsbac_debug_ds_pm) rsbac_printk(KERN_DEBUG "%s\n", 02915 "rsbac_pm_remove_target(): Removing tp data"); 02916 #endif 02917 */ 02918 return rsbac_ta_list_remove(ta_number, tp_handle, &tid.tp); 02919 02920 case PMT_PP: 02921 /* 02922 #ifdef CONFIG_RSBAC_DEBUG 02923 if (rsbac_debug_ds_pm) rsbac_printk(KERN_DEBUG "%s\n", 02924 "rsbac_pm_remove_target(): Removing pp data"); 02925 #endif 02926 */ 02927 return rsbac_ta_list_remove(ta_number, pp_handle, &tid.pp); 02928 02929 case PMT_TKT: 02930 { 02931 rsbac_pm_pp_set_id_t pp_set = -tid.tkt; 02932 02933 /* 02934 #ifdef CONFIG_RSBAC_DEBUG 02935 if (rsbac_debug_ds_pm) rsbac_printk(KERN_DEBUG "%s\n", 02936 "rsbac_pm_remove_target(): Removing tkt data"); 02937 #endif 02938 */ 02939 if(rsbac_ta_list_lol_exist(ta_number, pp_set_handle, &pp_set)) 02940 rsbac_ta_list_lol_remove(ta_number, pp_set_handle, &pp_set); 02941 return rsbac_ta_list_remove(ta_number, tkt_handle, &tid.tkt); 02942 } 02943 02944 default: 02945 return(-RSBAC_EINVALIDTARGET); 02946 } 02947 }; /* end of rsbac_remove_target() */
|
|
Definition at line 2548 of file pm_data_structures.c. References class_handle, cs_handle, na_handle, NULL, pp_handle, RSBAC_EINVALIDATTR, RSBAC_EINVALIDTARGET, rsbac_ta_list_add_ttl(), rsbac_ta_list_get_data_ttl(), task_handle, and tkt_handle. Referenced by rsbac_pm(). 02554 { 02555 switch (target) 02556 { 02557 case PMT_TASK: 02558 { 02559 struct rsbac_pm_task_data_t all_data; 02560 int err; 02561 02562 /* 02563 #ifdef CONFIG_RSBAC_DEBUG 02564 if (rsbac_debug_ds_pm) 02565 rsbac_printk(KERN_DEBUG 02566 "rsbac_pm_set_data(): Setting task data\n"); 02567 #endif 02568 */ 02569 err = rsbac_ta_list_get_data_ttl(ta_number, task_handle, 02570 NULL, &tid.task, &all_data); 02571 if(err) 02572 return err; 02573 02574 switch (data) 02575 { 02576 case PD_purpose: 02577 all_data.purpose = value.purpose; 02578 break; 02579 case PD_tp_set: 02580 all_data.tp_set = value.tp_set; 02581 break; 02582 case PD_ru_set: 02583 all_data.ru_set = value.ru_set; 02584 break; 02585 default: 02586 return -RSBAC_EINVALIDATTR; 02587 } 02588 err = rsbac_ta_list_add_ttl(ta_number, task_handle, 0, &tid.task, &all_data); 02589 return err; 02590 } 02591 02592 case PMT_CLASS: 02593 { 02594 struct rsbac_pm_class_data_t all_data; 02595 int err; 02596 02597 /* 02598 #ifdef CONFIG_RSBAC_DEBUG 02599 if (rsbac_debug_ds_pm) 02600 rsbac_printk(KERN_DEBUG 02601 "rsbac_pm_set_data(): Setting class data\n"); 02602 #endif 02603 */ 02604 err = rsbac_ta_list_get_data_ttl(ta_number, class_handle, 02605 NULL, &tid.object_class, &all_data); 02606 if(err) 02607 return err; 02608 02609 switch (data) 02610 { 02611 case PD_pp_set: 02612 all_data.pp_set = value.pp_set; 02613 break; 02614 default: 02615 return -RSBAC_EINVALIDATTR; 02616 } 02617 err = rsbac_ta_list_add_ttl(ta_number, class_handle, 0, &tid.object_class, &all_data); 02618 return err; 02619 } 02620 02621 case PMT_NA: 02622 { 02623 struct rsbac_pm_na_data_t all_data; 02624 int err; 02625 02626 /* 02627 #ifdef CONFIG_RSBAC_DEBUG 02628 if (rsbac_debug_ds_pm) 02629 rsbac_printk(KERN_DEBUG 02630 "rsbac_pm_set_data(): Setting na data\n"); 02631 #endif 02632 */ 02633 err = rsbac_ta_list_get_data_ttl(ta_number, na_handle, 02634 NULL, &tid.na, &all_data); 02635 if(err) 02636 return err; 02637 02638 switch (data) 02639 { 02640 case PD_task: 02641 all_data.task = value.task; 02642 break; 02643 case PD_class: 02644 all_data.object_class = value.object_class; 02645 break; 02646 case PD_tp: 02647 all_data.tp = value.tp; 02648 break; 02649 case PD_accesses: 02650 all_data.accesses = value.accesses; 02651 break; 02652 default: 02653 return -RSBAC_EINVALIDATTR; 02654 } 02655 err = rsbac_ta_list_add_ttl(ta_number, na_handle, 0, &tid.na, &all_data); 02656 return err; 02657 } 02658 02659 case PMT_CS: 02660 { 02661 struct rsbac_pm_cs_data_t all_data; 02662 int err; 02663 02664 /* 02665 #ifdef CONFIG_RSBAC_DEBUG 02666 if (rsbac_debug_ds_pm) 02667 rsbac_printk(KERN_DEBUG 02668 "rsbac_pm_set_data(): Setting cs data\n"); 02669 #endif 02670 */ 02671 err = rsbac_ta_list_get_data_ttl(ta_number, cs_handle, 02672 NULL, &tid.cs, &all_data); 02673 if(err) 02674 return err; 02675 02676 switch (data) 02677 { 02678 case PD_purpose: 02679 all_data.purpose = value.purpose; 02680 break; 02681 case PD_file: 02682 all_data.file = value.file; 02683 break; 02684 default: 02685 return -RSBAC_EINVALIDATTR; 02686 } 02687 err = rsbac_ta_list_add_ttl(ta_number, cs_handle, 0, &tid.cs, &all_data); 02688 return err; 02689 } 02690 02691 case PMT_TP: 02692 return -RSBAC_EINVALIDATTR; 02693 02694 case PMT_PP: 02695 { 02696 struct rsbac_pm_pp_data_t all_data; 02697 int err; 02698 02699 /* 02700 #ifdef CONFIG_RSBAC_DEBUG 02701 if (rsbac_debug_ds_pm) 02702 rsbac_printk(KERN_DEBUG 02703 "rsbac_pm_set_data(): Setting pp data\n"); 02704 #endif 02705 */ 02706 err = rsbac_ta_list_get_data_ttl(ta_number, pp_handle, 02707 NULL, &tid.pp, &all_data); 02708 if(err) 02709 return err; 02710 02711 switch (data) 02712 { 02713 case PD_def_class: 02714 all_data.def_class = value.def_class; 02715 break; 02716 default: 02717 return -RSBAC_EINVALIDATTR; 02718 } 02719 err = rsbac_ta_list_add_ttl(ta_number, pp_handle, 0, &tid.pp, &all_data); 02720 return err; 02721 } 02722 02723 case PMT_TKT: 02724 { 02725 struct rsbac_pm_tkt_data_t all_data; 02726 int err; 02727 02728 /* 02729 #ifdef CONFIG_RSBAC_DEBUG 02730 if (rsbac_debug_ds_pm) 02731 rsbac_printk(KERN_DEBUG 02732 "rsbac_pm_set_data(): Setting tkt data\n"); 02733 #endif 02734 */ 02735 err = rsbac_ta_list_get_data_ttl(ta_number, tkt_handle, 02736 NULL, &tid.tkt, &all_data); 02737 if(err) 02738 return err; 02739 02740 switch (data) 02741 { 02742 case PD_issuer: 02743 all_data.issuer = value.issuer; 02744 break; 02745 case PD_function_type: 02746 all_data.function_type = value.function_type; 02747 break; 02748 case PD_function_param: 02749 all_data.function_param = value.function_param; 02750 break; 02751 case PD_valid_until: 02752 all_data.valid_until = value.valid_until; 02753 break; 02754 default: 02755 return -RSBAC_EINVALIDATTR; 02756 } 02757 err = rsbac_ta_list_add_ttl(ta_number, tkt_handle, 0, &tid.tkt, &all_data); 02758 return err; 02759 } 02760 02761 /* switch target: no valid target */ 02762 default: 02763 return(-RSBAC_EINVALIDTARGET); 02764 } 02765 } /* end of rsbac_pm_set_data() */
|
|
Definition at line 2082 of file pm_data_structures.c. References FALSE, in_pp_set_handle, out_pp_set_handle, pp_set_handle, rsbac_ta_list_lol_exist(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by adjust_in_out_pp_ipc(). 02086 { 02087 switch (set) 02088 { 02089 case PS_TASK: 02090 return rsbac_ta_list_lol_exist(ta_number, task_set_handle, &id.task_set); 02091 case PS_TP: 02092 return rsbac_ta_list_lol_exist(ta_number, tp_set_handle, &id.tp_set); 02093 case PS_RU: 02094 return rsbac_ta_list_lol_exist(ta_number, ru_set_handle, &id.ru_set); 02095 case PS_PP: 02096 return rsbac_ta_list_lol_exist(ta_number, pp_set_handle, &id.pp_set); 02097 case PS_IN_PP: 02098 return rsbac_ta_list_lol_exist(ta_number, in_pp_set_handle, &id.in_pp_set); 02099 case PS_OUT_PP: 02100 return rsbac_ta_list_lol_exist(ta_number, out_pp_set_handle, &id.out_pp_set); 02101 02102 default: 02103 return FALSE; 02104 } 02105 }
|
|
Definition at line 1801 of file pm_data_structures.c. References FALSE, in_pp_set_handle, out_pp_set_handle, pp_set_handle, rsbac_ta_list_lol_subexist(), ru_set_handle, task_set_handle, and tp_set_handle. Referenced by na_and_pp_ipc(), na_and_pp_or_cs(), rsbac_adf_request_pm(), rsbac_pm(), rsbac_pm_change_current_task(), and rsbac_pm_create_file(). 01806 { 01807 switch(set) 01808 { 01809 case PS_TASK: 01810 return(rsbac_ta_list_lol_subexist(ta_number, task_set_handle, &id.task_set, &member.task)); 01811 case PS_TP: 01812 return(rsbac_ta_list_lol_subexist(ta_number, tp_set_handle, &id.tp_set, &member.tp)); 01813 case PS_RU: 01814 return(rsbac_ta_list_lol_subexist(ta_number, ru_set_handle, &id.ru_set, &member.ru)); 01815 case PS_PP: 01816 return(rsbac_ta_list_lol_subexist(ta_number, pp_set_handle, &id.pp_set, &member.pp)); 01817 case PS_IN_PP: 01818 return(rsbac_ta_list_lol_subexist(ta_number, in_pp_set_handle, &id.in_pp_set, &member.pp)); 01819 case PS_OUT_PP: 01820 return(rsbac_ta_list_lol_subexist(ta_number, out_pp_set_handle, &id.out_pp_set, &member.pp)); 01821 default: 01822 return(FALSE); 01823 } 01824 }
|
|
Definition at line 1593 of file pm_data_structures.c. 01594 { 01595 u_long tmp_count; 01596 u_long tmp_member_count; 01597 u_long all_set_count = 0; 01598 u_long all_member_count = 0; 01599 u_long all_count = 0; 01600 01601 if (!rsbac_is_initialized()) 01602 { 01603 rsbac_printk(KERN_WARNING "rsbac_stats_pm(): RSBAC not initialized\n"); 01604 return(-RSBAC_ENOTINITIALIZED); 01605 } 01606 01607 /****************/ 01608 /* Helper lists */ 01609 /****************/ 01610 01611 tmp_count = rsbac_list_lol_count(task_set_handle); 01612 tmp_member_count = rsbac_list_lol_all_subcount(task_set_handle); 01613 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu task-set-items, sum of %lu members\n", 01614 tmp_count, tmp_member_count); 01615 all_set_count += tmp_count; 01616 all_member_count += tmp_member_count; 01617 01618 tmp_count = rsbac_list_lol_count(tp_set_handle); 01619 tmp_member_count = rsbac_list_lol_all_subcount(tp_set_handle); 01620 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu tp set items, sum of %lu members\n", 01621 tmp_count, tmp_member_count); 01622 all_set_count += tmp_count; 01623 all_member_count += tmp_member_count; 01624 01625 tmp_count = rsbac_list_lol_count(ru_set_handle); 01626 tmp_member_count = rsbac_list_lol_all_subcount(ru_set_handle); 01627 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu ru set items, sum of %lu members\n", 01628 tmp_count, tmp_member_count); 01629 all_set_count += tmp_count; 01630 all_member_count += tmp_member_count; 01631 01632 tmp_count = rsbac_list_lol_count(pp_set_handle); 01633 tmp_member_count = rsbac_list_lol_all_subcount(pp_set_handle); 01634 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu pp set items, sum of %lu members\n", 01635 tmp_count, tmp_member_count); 01636 all_set_count += tmp_count; 01637 all_member_count += tmp_member_count; 01638 01639 tmp_count = rsbac_list_lol_count(in_pp_set_handle); 01640 tmp_member_count = rsbac_list_lol_all_subcount(in_pp_set_handle); 01641 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu input purpose set items, sum of %lu members\n", 01642 tmp_count, tmp_member_count); 01643 all_set_count += tmp_count; 01644 all_member_count += tmp_member_count; 01645 01646 tmp_count = rsbac_list_lol_count(out_pp_set_handle); 01647 tmp_member_count = rsbac_list_lol_all_subcount(out_pp_set_handle); 01648 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu output purpose set items, sum of %lu members\n", 01649 tmp_count, tmp_member_count); 01650 all_set_count += tmp_count; 01651 all_member_count += tmp_member_count; 01652 01653 rsbac_printk(KERN_INFO "rsbac_stats_pm(): Total of %lu registered rsbac-pm-set-items, %lu members\n", 01654 all_set_count, all_member_count); 01655 01656 /**************/ 01657 /* Main lists */ 01658 /**************/ 01659 tmp_count = rsbac_list_count(task_handle); 01660 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu task items\n", 01661 tmp_count); 01662 all_count += tmp_count; 01663 01664 tmp_count = rsbac_list_count(class_handle); 01665 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu class items\n", 01666 tmp_count); 01667 all_count += tmp_count; 01668 01669 tmp_count = rsbac_list_count(na_handle); 01670 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu na items\n", 01671 tmp_count); 01672 all_count += tmp_count; 01673 01674 tmp_count = rsbac_list_count(cs_handle); 01675 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu cs items\n", 01676 tmp_count); 01677 all_count += tmp_count; 01678 01679 tmp_count = rsbac_list_count(tp_handle); 01680 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu tp items\n", 01681 tmp_count); 01682 all_count += tmp_count; 01683 01684 tmp_count = rsbac_list_count(pp_handle); 01685 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu pp items\n", 01686 tmp_count); 01687 all_count += tmp_count; 01688 01689 tmp_count = rsbac_list_count(tkt_handle); 01690 rsbac_printk(KERN_INFO "rsbac_stats_pm(): %lu tkt items\n", 01691 tmp_count); 01692 all_count += tmp_count; 01693 01694 rsbac_printk(KERN_INFO "rsbac_stats_pm(): Total of %lu registered rsbac-pm-items\n", 01695 all_count); 01696 return 0; 01697 }
|