Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:54:43 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:inode_doinit_use_xattr
Proto:static int inode_doinit_use_xattr(struct inode *inode, struct dentry *dentry, unsigned int def_sid, unsigned int *sid)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct inode * | inode | |
struct dentry * | dentry | |
unsigned int | def_sid | |
unsigned int * | sid |
1377 | len = INITCONTEXTLEN |
1378 | context = Allocation memory |
1383 | rc = __vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, context, len) |
1388 | rc = __vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, NULL, 0) |
1393 | context = Allocation memory |
1398 | rc = __vfs_getxattr(dentry, inode, XATTR_NAME_SELINUX, context, len) |
1401 | If rc < 0 Then |
1404 | pr_warn("SELinux: %s: getxattr returned %d for dev=%s ino=%ld\n", __func__, - rc, s_id, Stat data, not accessed from path walking ) |
1406 | Return rc |
1409 | Return 0 |
1412 | rc = security_context_to_sid_default( & selinux_state, context, rc, sid, def_sid, GFP_NOFS) |
1414 | If rc Then |
1419 | pr_notice_ratelimited("SELinux: inode=%lu on dev=%s was found to have an invalid context=%s. This indicates you may need to relabel the inode or the filesystem in question.\n", ino, dev, context) |
1421 | Else |
1427 | Return 0 |
Name | Describe |
---|---|
inode_doinit_with_dentry |
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 |