函数逻辑报告 |
Source Code:security\apparmor\policy.c |
Create Date:2022-07-27 21:33:47 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:aa_replace_profiles - replace profile(s) on the profile list*@policy_ns: namespace load is occurring on*@label: label that is attempting to load/replace policy*@mask: permission mask*@udata: serialized data stream (NOT NULL)* unpack and replace a profile
函数原型:ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label, unsigned int mask, struct aa_loaddata *udata)
返回类型:ssize_t
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct aa_ns * | policy_ns | |
| struct aa_label * | label | |
| unsigned int | mask | |
| struct aa_loaddata * | udata |
| 867 | op等于如果mask按位与AA_MAY_REPLACE_POLICY则OP_PROF_REPL否则OP_PROF_LOAD |
| 879 | count等于0 |
| 881 | 如果ns_name则 |
| 888 | 否则如果ns_name则 |
| 889 | 如果count则 |
| 895 | 否则count自加 |
| 898 | 如果ns_name则 |
| 901 | 如果是错误则 |
| 912 | mutex_lock_nested( & lock, level) |
| 915 | 如果aa_rawdata_eq(rawdata_ent, udata)则 |
| 920 | 如果tmp则 |
| 921 | aa_put_loaddata(udata) |
| 923 | 退出 |
| 938 | 如果rename则 |
| 954 | 如果非policy则 |
| 956 | p等于__list_lookup_parent( & lh, new) |
| 957 | 如果非p则 |
| 971 | 如果非dents[AAFS_LOADDATA_DIR]则 |
| 972 | error等于__aa_fs_create_rawdata(ns, udata) |
| 973 | 如果error则 |
| 974 | info等于"failed to create raw_data dir and files" |
| 975 | ent = NULL |
| 976 | 转到:fail_lock |
| 980 | 如果非old则 |
| 991 | 如果error则 |
| 998 | __aa_bump_ns_revision(ns) |
| 1001 | 删除链表项并重新初始化 |
| 1002 | op等于如果非old且非rename则OP_PROF_LOAD否则OP_PROF_REPL |
| 1022 | 如果old则 |
| 1023 | share_name(old, new) |
| 1025 | 否则 |
| 1037 | skip : |
| 1038 | aa_load_ent_free(ent) |
| 1043 | out : |
| 1045 | aa_put_loaddata(udata) |
| 1046 | 释放内存 |
| 1050 | 返回:he original size of the payload |
| 1052 | fail_lock : |
| 1056 | op等于如果ent且非old则OP_PROF_LOAD否则OP_PROF_REPL |
| 1057 | fail : |
| 1061 | info等于"valid profile in failed atomic policy load" |
| 1064 | info等于"unchecked profile in failed atomic policy load" |
| 1066 | 继续下一循环 |
| 1068 | op等于如果非old则OP_PROF_LOAD否则OP_PROF_REPL |
| 1073 | 删除链表项并重新初始化 |
| 1074 | aa_load_ent_free(ent) |
| 1077 | 转到:out |
| 名称 | 描述 |
|---|---|
| policy_update |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |