Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sel_make_policycap

Proto:static int sel_make_policycap(struct selinux_fs_info *fsi)

Type:int

Parameter:

TypeParameterName
struct selinux_fs_info *fsi
1833  struct dentry * dentry = NULL
1834  struct inode * inode = NULL
1836  sel_remove_entries(policycap_dir)
1838  When iter <= POLICYDB_CAPABILITY_MAX cycle
1839  If iter < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(selinux_policycap_names) Then dentry = d_alloc_name(policycap_dir, selinux_policycap_names[iter])
1842  Else dentry = d_alloc_name(policycap_dir, "unknown")
1845  If (dentry == NULL) Then Return -ENOMEM
1848  inode = sel_make_inode(sb, S_IFREG | 0444)
1849  If (inode == NULL) Then
1850  dput(dentry)
1851  Return -ENOMEM
1854  rmer ->i_op->default_file_ops = sel_policycap_ops
1855  Stat data, not accessed from path walking = iter | SEL_POLICYCAP_INO_OFFSET
1856  d_add - add dentry to hash queues*@entry: dentry to add*@inode: The inode to attach to this dentry* This adds the entry to the hash queues and initializes @inode.* The entry was actually filled in earlier during d_alloc().
1859  Return 0
Caller
NameDescribe
sel_make_policy_nodes