函数逻辑报告 |
Source Code:security\apparmor\policy_unpack.c |
Create Date:2022-07-27 21:36:00 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:aa_unpack - unpack packed binary profile(s) data loaded from user space*@udata: user data copied to kmem (NOT NULL)*@lh: list to place unpacked profiles in a aa_repl_ws*@ns: Returns namespace profile is in if specified else NULL (NOT NULL)* Unpack user
函数原型:int aa_unpack(struct aa_loaddata *udata, struct list_head *lh, const char **ns)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct aa_loaddata * | udata | |
struct list_head * | lh | |
const char ** | ns |
1163 | struct aa_profile * profile = NULL |
1171 | * ns = NULL |
1173 | char * ns_name = NULL |
1180 | profile等于pack_profile - unpack a serialized profile*@e: serialized data extent information (NOT NULL)* NOTE: unpack profile sets audit struct if there is a failure |
1181 | 如果是错误则 |
1186 | error等于verify_profile - Do post unpack analysis to verify profile consistency*@profile: profile to verify (NOT NULL)* Returns: 0 if passes verification else error |
1187 | 如果error则转到:fail_profile |
1190 | 如果aa_g_hash_policy则error等于aa_calc_profile_hash(profile, version, start, pointer to current position in the buffer - start) |
1193 | 如果error则转到:fail_profile |
1196 | ent等于aa_load_ent_alloc() |
1197 | 如果非ent则 |
1199 | 转到:fail_profile |
1204 | 添加链表项 |
1206 | abi等于version按位与K_ABI_MASK |
1207 | 如果aa_g_hash_policy则 |
1209 | 如果是错误则 |
1215 | error等于compress_loaddata(udata) |
1218 | 返回:0 |
1220 | fail_profile : |
1223 | fail : |
1225 | 删除链表项并重新初始化 |
1226 | aa_load_ent_free(ent) |
1229 | 返回:error |
名称 | 描述 |
---|---|
aa_replace_profiles | 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 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |