Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sb_finish_set_opts

Proto:static int sb_finish_set_opts(struct super_block *sb)

Type:int

Parameter:

TypeParameterName
struct super_block *sb
539  sbsec = s_security
540  root = s_root
541  root_inode = d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
542  rc = 0
544  If labeling behavior == use xattr Then
550  If Not (i_opflags & IOP_XATTR) Then
551  pr_warn("SELinux: (dev %s, type %s) has no xattr support\n", Informational name , name)
553  rc = -EOPNOTSUPP
554  Go to out
557  rc = __vfs_getxattr(root, root_inode, XATTR_NAME_SELINUX, NULL, 0)
558  If rc < 0 && rc != -ENODATA Then
559  If rc == -EOPNOTSUPP Then pr_warn("SELinux: (dev %s, type %s) has no security xattr handler\n", Informational name , name)
563  Else pr_warn("SELinux: (dev %s, type %s) getxattr errno %d\n", Informational name , name, - rc)
567  Go to out
571  which mount options were specified |= Non-mount related flags
578  If selinux_is_sblabel_mnt(sb) Then which mount options were specified |= SBLABEL_MNT
580  Else which mount options were specified &= ~SBLABEL_MNT
584  rc = inode_doinit_with_dentry(root_inode, root)
590  spin_lock( & isec_lock)
591  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
592  isec = list_first_entry - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.* Note, that list is expected to be not empty.( & isec_head, structinode_security_struct, list)
595  inode = back pointer to inode object
596  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
597  spin_unlock( & isec_lock)
598  inode = igrab(inode)
599  If inode Then
600  If Not IS_PRIVATE(inode) Then inode_doinit(inode)
602  put an inode
604  spin_lock( & isec_lock)
606  spin_unlock( & isec_lock)
607  out :
608  Return rc
Caller
NameDescribe
selinux_set_mnt_optsAllow filesystems with binary mount data to explicitly set mount point* labeling information.
selinux_sb_clone_mnt_opts