Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_sb_remount

Proto:static int selinux_sb_remount(struct super_block *sb, void *mnt_opts)

Type:int

Parameter:

TypeParameterName
struct super_block *sb
void *mnt_opts
2680  opts = mnt_opts
2681  sbsec = s_security
2685  If Not ( which mount options were specified & Non-mount related flags ) Then Return 0
2688  If Not opts Then Return 0
2691  If fscontext Then
2692  rc = parse_sid(sb, fscontext, & sid)
2693  If rc Then Return rc
2695  If bad_option(sbsec, FSCONTEXT_MNT, SID of file system superblock , sid) Then Go to out_bad_option
2698  If context Then
2699  rc = parse_sid(sb, context, & sid)
2700  If rc Then Return rc
2702  If bad_option(sbsec, BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts , SECURITY_FS_USE_MNTPOINT context for files , sid) Then Go to out_bad_option
2705  If rootcontext Then
2707  root_isec = Get the security label of a dentry's backing inode.
2708  rc = parse_sid(sb, rootcontext, & sid)
2709  If rc Then Return rc
2711  If bad_option(sbsec, ROOTCONTEXT_MNT, SID of this object , sid) Then Go to out_bad_option
2714  If defcontext Then
2715  rc = parse_sid(sb, defcontext, & sid)
2716  If rc Then Return rc
2718  If bad_option(sbsec, DEFCONTEXT_MNT, default SID for labeling , sid) Then Go to out_bad_option
2721  Return 0
2723  out_bad_option :
2724  pr_warn("SELinux: unable to change security options during remount (dev %s, type=%s)\n", Informational name , name)
2727  Return -EINVAL