函数逻辑报告 |
Source Code:security\apparmor\domain.c |
Create Date:2022-07-27 21:31:24 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:apparmor_bprm_set_creds - set the new creds on the bprm struct*@bprm: binprm for the exec (NOT NULL)* Returns: %0 or error on failure* TODO: once the other paths are done see if we can't refactor into a fn
函数原型:int apparmor_bprm_set_creds(struct linux_binprm *bprm)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct linux_binprm * | bprm |
| 869 | char * buffer = NULL |
| 870 | const char * info = NULL |
| 871 | error等于0 |
| 872 | bool unsafe = false |
| 878 | 如果called_set_creds则返回:0 |
| 882 | AA_BUG(!cred_label(w credentials )) |
| 894 | 如果how unsafe this exec is (mask of LSM_UNSAFE_*) 按位与LSM_UNSAFE_NO_NEW_PRIVS且非unconfined(label)且非nnp则nnp等于aa_get_label(label) |
| 899 | buffer等于aa_get_buffer(false) |
| 900 | 如果非buffer则 |
| 915 | 如果是错误则 |
| 918 | 否则如果非new则 |
| 938 | 如果how unsafe this exec is (mask of LSM_UNSAFE_*) 按位与prm->unsafe reasons 则如果how unsafe this exec is (mask of LSM_UNSAFE_*) 按位与LSM_UNSAFE_PTRACE则 |
| 950 | 如果unsafe则 |
| 952 | dbg_printk("scrubbing environment variables for %s label=", Name of binary as seen by procps ) |
| 954 | aa_label_printk(new, GFP_KERNEL) |
| 955 | dbg_printk("\n") |
| 957 | secureexec等于1 |
| 963 | dbg_printk("apparmor: clearing unsafe personality bits. %s label=", Name of binary as seen by procps ) |
| 965 | aa_label_printk(new, GFP_KERNEL) |
| 966 | dbg_printk("\n") |
| 970 | aa_put_label(cred_label(w credentials )) |
| 972 | set_cred_label(w credentials , new) |
| 974 | done : |
| 975 | aa_put_label(label) |
| 976 | aa_put_buffer(buffer) |
| 978 | 返回:error |
| 980 | audit : |
| 986 | aa_put_label(new) |
| 987 | 转到:done |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |