Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-28 18:56:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:selinux_bprm_set_creds

Proto:static int selinux_bprm_set_creds(struct linux_binprm *bprm)

Type:int

Parameter:

TypeParameterName
struct linux_binprm *bprm
2335  inode = file_inode(file)
2340  If called_set_creds Then Return 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  If exec SID Then
2357  current SID = exec SID
2359  exec SID = 0
2362  rc = check_nnp_nosuid(bprm, old_tsec, new_tsec)
2363  If rc Then Return rc
2365  Else
2367  rc = security_transition_sid( & selinux_state, current SID , SID of this object , SECCLASS_PROCESS, NULL, & current SID )
2370  If rc Then Return rc
2377  rc = check_nnp_nosuid(bprm, old_tsec, new_tsec)
2378  If rc Then current SID = current SID
2382  type = LSM_AUDIT_DATA_FILE
2383  file = file
2385  If current SID == current SID Then
2386  rc = avc_has_perm - Check permissions and perform any appropriate auditing
2389  If rc Then Return rc
2391  Else
2393  rc = avc_has_perm - Check permissions and perform any appropriate auditing
2396  If rc Then Return rc
2399  rc = avc_has_perm - Check permissions and perform any appropriate auditing
2402  If rc Then Return rc
2411  If rc Then Return -EPERM
2419  If ptsid != 0 Then
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 |= Not Not rc
2442  Return 0