函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-27 20:28:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:selinux_bprm_set_creds

函数原型:static int selinux_bprm_set_creds(struct linux_binprm *bprm)

返回类型:int

参数:

类型参数名称
struct linux_binprm *bprm
2335  inode等于file_inode(file)
2340  如果called_set_creds则返回:0
2343  old_tsec等于selinux_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
2344  new_tsec等于selinux_cred(w credentials )
2345  isec等于Get the security label of an inode.
2348  current SID 等于 current SID
2349  SID prior to last execve 等于 current SID
2352  fscreate SID 等于0
2353  keycreate SID 等于0
2354  fscreate SID 等于0
2356  如果 exec SID
2357  current SID 等于 exec SID
2359  exec SID 等于0
2362  rc等于check_nnp_nosuid(bprm, old_tsec, new_tsec)
2363  如果rc则返回:rc
2365  否则
2367  rc等于security_transition_sid( & selinux_state, current SID , SID of this object , SECCLASS_PROCESS, NULL, & current SID )
2370  如果rc则返回:rc
2377  rc等于check_nnp_nosuid(bprm, old_tsec, new_tsec)
2378  如果rc current SID 等于 current SID
2382  type等于LSM_AUDIT_DATA_FILE
2383  file等于file
2385  如果 current SID 恒等于 current SID
2386  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
2389  如果rc则返回:rc
2391  否则
2393  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
2396  如果rc则返回:rc
2399  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
2402  如果rc则返回:rc
2411  如果rc则返回:负EPERM
2419  如果ptsid不等于0则
2430  s to clear in current->personality 或等于Security-relevant compatibility flags that must be* cleared upon setuid or setgid exec:
2435  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
2439  secureexec或等于非非rc
2442  返回:0