Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:57:43 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Copy the inode security context value to the user.* Permission check is handled by selinux_inode_getxattr hook.
Proto:static int selinux_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct inode * | inode | |
const char * | name | |
void ** | buffer | |
bool | alloc |
3353 | char * context = NULL |
3356 | If strcmp(name, XATTR_SELINUX_SUFFIX) Then Return -EOPNOTSUPP |
3369 | If has_cap_mac_admin(false) Then error = security_sid_to_context_force( & selinux_state, SID of this object , & context, & size) |
3373 | Else error = security_sid_to_context( & selinux_state, SID of this object , & context, & size) |
3379 | If alloc Then |
3381 | Go to out_nofree |
3384 | out_nofree : |
3385 | Return error |
Name | Describe |
---|---|
selinux_inode_getsecctx |
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 |