Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Return 0 if current is granted want access to the inode* by the acl. Returns -E... otherwise.

Proto:int posix_acl_permission(struct inode *inode, const struct posix_acl *acl, int want)

Type:int

Parameter:

TypeParameterName
struct inode *inode
const struct posix_acl *acl
intwant
351  found = 0
353  want &= MAY_READ | MAY_WRITE | MAY_EXEC | called from RCU mode, don't block
357  Case e_tag == _tag entry in struct posix_acl_entry
359  If uid_eq(i_uid, current_fsuid()) Then Go to check_perm
361  Break
362  Case e_tag == ACL_USER
363  If uid_eq(e_uid, current_fsuid()) Then Go to mask
365  Break
366  Case e_tag == ACL_GROUP_OBJ
368  found = 1
369  If (e_perm & want) == want Then Go to mask
372  Break
373  Case e_tag == ACL_GROUP
375  found = 1
376  If (e_perm & want) == want Then Go to mask
379  Break
380  Case e_tag == ACL_MASK
381  Break
382  Case e_tag == ACL_OTHER
383  If found Then Return -EACCES
385  Else Go to check_perm
387  Default
388  Return -EIO
391  Return -EIO
393  mask :
394  When mask_obj != pe cycle
395  If e_tag == ACL_MASK Then
396  If ( e_perm & e_perm & want) == want Then Return 0
398  Return -EACCES
402  check_perm :
403  If (e_perm & want) == want Then Return 0
405  Return -EACCES
Caller
NameDescribe
check_acl