函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smack_lsm.c Create Date:2022-07-27 20:49:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static int smack_inode_permission(struct inode *inode, int mask)

返回类型:int

参数:

类型参数名称
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  如果mask恒等于0则返回:0
1183  如果smk_flags按位与SMK_SB_UNTRUSTED
1184  如果Present a pointer to the smack label entry in an inode blob.不等于smk_root则返回:负EACCES
1189  如果no_block则返回:负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  返回:rc