Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:21:02 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smack_inode_removexattr - Smack check on removexattr*@dentry: the object*@name: name of the attribute* Removing the Smack attribute requires CAP_MAC_ADMIN* Returns 0 if access is permitted, an error code otherwise
Proto:static int smack_inode_removexattr(struct dentry *dentry, const char *name)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct dentry * | dentry | |
| const char * | name |
| 1380 | rc = 0 |
| 1382 | If strcmp(name, XATTR_NAME_SMACK) == 0 || strcmp(name, XATTR_NAME_SMACKIPIN) == 0 || strcmp(name, XATTR_NAME_SMACKIPOUT) == 0 || strcmp(name, XATTR_NAME_SMACKEXEC) == 0 || strcmp(name, XATTR_NAME_SMACKTRANSMUTE) == 0 || strcmp(name, XATTR_NAME_SMACKMMAP) == 0 Then |
| 1388 | If Not smack_privileged(Allow MAC configuration or state changes) Then rc = -EPERM |
| 1397 | smk_ad_setfield_u_fs_path_dentry( & ad, dentry) |
| 1410 | If strcmp(name, XATTR_NAME_SMACK) == 0 Then |
| 1415 | Else if strcmp(name, XATTR_NAME_SMACKEXEC) == 0 Then label of the task = NULL |
| 1417 | Else if strcmp(name, XATTR_NAME_SMACKMMAP) == 0 Then label of the mmap domain = NULL |
| 1419 | Else if strcmp(name, XATTR_NAME_SMACKTRANSMUTE) == 0 Then smack inode flags &= ~directory is transmuting |
| 1422 | Return 0 |
| 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 |