Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:may_o_create

Proto:static int may_o_create(const struct path *dir, struct dentry *dentry, umode_t mode)

Type:int

Parameter:

TypeParameterName
const struct path *dir
struct dentry *dentry
umode_tmode
2970  error = security_path_mknod(dir, dentry, mode, 0)
2971  If error Then Return error
2974  s_user_ns = s_user_ns
2975  If Not kuid_has_mapping(s_user_ns, current_fsuid()) || Not kgid_has_mapping(s_user_ns, current_fsgid()) Then Return -EOVERFLOW
2979  error = de_permission - Check for access rights to a given inode*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)* Check for read/write/execute permissions on an inode
2980  If error Then Return error
2983  Return security_inode_create( Where the name belongs to - NULL is * negative , dentry, mode)
Caller
NameDescribe
lookup_openLook up and maybe create and open the last component