Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:57:29 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:selinux_inode_setxattr
Proto:static int selinux_inode_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct dentry * | dentry | |
const char * | name | |
const void * | value | |
size_t | size | |
int | flags |
3143 | rc = 0 |
3145 | If strcmp(name, XATTR_NAME_SELINUX) Then |
3155 | If Not initialized Then Return If inode_owner_or_capable(inode) Then 0 Else -EPERM |
3158 | sbsec = s_security |
3159 | If Not ( which mount options were specified & SBLABEL_MNT) Then Return -EOPNOTSUPP |
3162 | If Not inode_owner_or_capable(inode) Then Return -EPERM |
3165 | type = LSM_AUDIT_DATA_DENTRY |
3175 | rc = security_context_to_sid( & selinux_state, value, size, & newsid, GFP_KERNEL) |
3178 | If Not has_cap_mac_admin(true) Then |
3184 | If value Then |
3187 | If str[size - 1] == '\0' Then audit_size = size - 1 |
3189 | Else audit_size = size |
3191 | Else |
3192 | audit_size = 0 |
3194 | ab = audit_log_start - obtain an audit buffer*@ctx: audit_context (may be NULL)*@gfp_mask: type of allocation*@type: audit message type* Returns audit_buffer pointer on success or NULL on error |
3200 | Return rc |
3202 | rc = security_context_to_sid_force( & selinux_state, value, size, & newsid) |
3214 | rc = security_validate_transition( & selinux_state, SID of this object , newsid, sid, security class of this object ) |
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 |