Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sel_make_perm_files

Proto:static int sel_make_perm_files(char *objclass, int classvalue, struct dentry *dir)

Type:int

Parameter:

TypeParameterName
char *objclass
intclassvalue
struct dentry *dir
1721  fsi = s_fs_info
1725  rc = security_get_permissions(state, objclass, & perms, & nperms)
1726  If rc Then Return rc
1729  When i < nperms cycle
1733  rc = -ENOMEM
1734  dentry = d_alloc_name(dir, perms[i])
1735  If Not dentry Then Go to out
1738  rc = -ENOMEM
1739  inode = sel_make_inode( The root of the dentry tree , S_IFREG | S_IRUGO)
1740  If Not inode Then
1741  dput(dentry)
1742  Go to out
1745  rmer ->i_op->default_file_ops = sel_perm_ops
1747  Stat data, not accessed from path walking = sel_perm_to_ino(classvalue, i + 1)
1748  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().
1750  rc = 0
1751  out :
1752  When i < nperms cycle kfree(perms[i])
1754  kfree(perms)
1755  Return rc
Caller
NameDescribe
sel_make_class_dir_entries