Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:53:53 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:selinux_sb_clone_mnt_opts
Proto:static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb, struct super_block *newsb, unsigned long kern_flags, unsigned long *set_kern_flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct super_block * | oldsb | |
struct super_block * | newsb | |
unsigned long | kern_flags | |
unsigned long * | set_kern_flags |
919 | rc = 0 |
920 | oldsbsec = s_security |
921 | newsbsec = s_security |
924 | set_context = which mount options were specified & BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts |
931 | If Not initialized Then Return 0 |
938 | If kern_flags && Not set_kern_flags Then Return -EINVAL |
945 | If which mount options were specified & Non-mount related flags Then |
946 | If kern_flags & LSM Agnostic defines for fs_context::lsm_flags && Not set_context Then set_kern_flags |= LSM Agnostic defines for fs_context::lsm_flags |
948 | Return selinux_cmp_sb_context(oldsb, newsb) |
951 | mutex_lock( & lock) |
959 | If labeling behavior == use native label support && Not (kern_flags & LSM Agnostic defines for fs_context::lsm_flags ) && Not set_context Then |
961 | rc = security_fs_use( & selinux_state, newsb) |
966 | If kern_flags & LSM Agnostic defines for fs_context::lsm_flags && Not set_context Then |
971 | If set_context Then |
974 | If Not set_fscontext Then SID of file system superblock = sid |
976 | If Not set_rootcontext Then |
982 | If set_rootcontext Then |
989 | sb_finish_set_opts(newsb) |
990 | out : |
992 | Return rc |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |