Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:check_nnp_nosuid

Proto:static int check_nnp_nosuid(const struct linux_binprm *bprm, const struct task_security_struct *old_tsec, const struct task_security_struct *new_tsec)

Type:int

Parameter:

TypeParameterName
const struct linux_binprm *bprm
const struct task_security_struct *old_tsec
const struct task_security_struct *new_tsec
2279  nnp = how unsafe this exec is (mask of LSM_UNSAFE_*) & LSM_UNSAFE_NO_NEW_PRIVS
2280  nosuid = Not mnt_may_suid(mnt)
2284  If Not nnp && Not nosuid Then Return 0
2287  If current SID == current SID Then Return 0
2296  If selinux_policycap_nnp_nosuid_transition() Then
2297  av = 0
2298  If nnp Then av |= PROCESS2__NNP_TRANSITION
2300  If nosuid Then av |= PROCESS2__NOSUID_TRANSITION
2302  rc = avc_has_perm - Check permissions and perform any appropriate auditing
2305  If Not rc Then Return 0
2314  rc = security_bounded_transition( & selinux_state, current SID , current SID )
2316  If Not rc Then Return 0
2324  If nnp Then Return -EPERM
2326  Return -EACCES
Caller
NameDescribe
selinux_bprm_set_creds