Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_genfs_get_sid

Proto:static int selinux_genfs_get_sid(struct dentry *dentry, u16 tclass, u16 flags, unsigned int *sid)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
u16tclass
u16flags
unsigned int *sid
1337  sb = The root of the dentry tree
1340  buffer = __get_free_page(GFP_KERNEL)
1341  If Not buffer Then Return -ENOMEM
1344  path = dentry_path_raw(dentry, buffer, PAGE_SIZE)
1345  If IS_ERR(path) Then rc = PTR_ERR(path)
1347  Else
1348  If flags & SE_SBPROC Then
1352  When path[1] >= '0' && path[1] <= '9' cycle
1353  path[1] = '/'
1354  path++
1357  rc = security_genfs_sid( & selinux_state, name, path, tclass, sid)
1359  If rc == -ENOENT Then
1362  rc = 0
1365  free_page((unsignedlong)buffer)
1366  Return rc
Caller
NameDescribe
inode_doinit_with_dentry