Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:20:41 |
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_permission - Smack version of permission()*@inode: the inode in question*@mask: the access requested* This is the important Smack hook.* Returns 0 if access is permitted, an error code otherwise
Proto:static int smack_inode_permission(struct inode *inode, int mask)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct inode * | inode | |
int | mask |
1171 | sbsp = s_security |
1176 | mask &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_APPEND |
1180 | If mask == 0 Then Return 0 |
1183 | If smk_flags & SMK_SB_UNTRUSTED Then |
1184 | If Present a pointer to the smack label entry in an inode blob. != smk_root Then Return -EACCES |
1192 | smk_ad_setfield_u_fs_inode( & ad, inode) |
1194 | rc = smk_bu_inode(inode, mask, rc) |
1195 | 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 |