Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sel_make_class_dir_entries

Proto:static int sel_make_class_dir_entries(char *classname, int index, struct dentry *dir)

Type:int

Parameter:

TypeParameterName
char *classname
intindex
struct dentry *dir
1761  sb = The root of the dentry tree
1762  fsi = Filesystem private info
1763  struct dentry * dentry = NULL
1764  struct inode * inode = NULL
1767  dentry = d_alloc_name(dir, "index")
1768  If Not dentry Then Return -ENOMEM
1771  inode = sel_make_inode( The root of the dentry tree , S_IFREG | S_IRUGO)
1772  If Not inode Then
1773  dput(dentry)
1774  Return -ENOMEM
1777  rmer ->i_op->default_file_ops = sel_class_ops
1778  Stat data, not accessed from path walking = sel_class_to_ino(index)
1779  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().
1781  dentry = declaration for sel_make_class_dirs
1782  If IS_ERR(dentry) Then Return PTR_ERR(dentry)
1785  rc = sel_make_perm_files(classname, index, dentry)
1787  Return rc
Caller
NameDescribe
sel_make_classes