Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:57:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kernfs node operations
Proto:static int selinux_kernfs_init_security(struct kernfs_node *kn_dir, struct kernfs_node *kn)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kernfs_node * | kn_dir | |
struct kernfs_node * | kn |
3472 | tsec = selinux_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.()) |
3477 | rc = kernfs_xattr_get(kn_dir, XATTR_NAME_SELINUX, NULL, 0) |
3484 | context = Allocation memory |
3488 | rc = kernfs_xattr_get(kn_dir, XATTR_NAME_SELINUX, context, clen) |
3489 | If rc < 0 Then |
3494 | rc = security_context_to_sid( & selinux_state, context, clen, & parent_sid, GFP_KERNEL) |
3500 | If fscreate SID Then |
3501 | newsid = fscreate SID |
3502 | Else |
3503 | secclass = inode_mode_to_security_class(mode) |
3509 | rc = security_transition_sid( & selinux_state, current SID , parent_sid, secclass, & q, & newsid) |
3516 | rc = security_sid_to_context_force( & selinux_state, newsid, & context, & clen) |
3521 | rc = kernfs_xattr_set(kn, XATTR_NAME_SELINUX, context, clen, set value, fail if attr already exists ) |
3524 | 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 |