Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

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:

TypeParameterName
struct inode *inode
intmask
1171  sbsp = s_security
1173  no_block = mask & called from RCU mode, don't block
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
1189  If no_block Then Return -ECHILD
1191  some inline functions to set up audit data* they do nothing if CONFIG_AUDIT is not set
1192  smk_ad_setfield_u_fs_inode( & ad, inode)
1193  rc = smk_curacc - determine if current has a specific access to an object*@obj_known: a pointer to the object's Smack label entry*@mode: the access requested, in "MAY" format*@a : common audit data* This function checks the current subject label/object label
1194  rc = smk_bu_inode(inode, mask, rc)
1195  Return rc