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:Returns 0 if the acl can be exactly represented in the traditional* file mode permission bits, or else 1. Returns -E... on error.

Proto:int posix_acl_equiv_mode(const struct posix_acl *acl, umode_t *mode_p)

Type:int

Parameter:

TypeParameterName
const struct posix_acl *acl
umode_t *mode_p
282  mode = 0
283  not_equiv = 0
288  If Not acl Then Return 0
293  Case e_tag == _tag entry in struct posix_acl_entry
294  mode |= (e_perm & S_IRWXO) << 6
295  Break
296  Case e_tag == ACL_GROUP_OBJ
297  mode |= (e_perm & S_IRWXO) << 3
298  Break
299  Case e_tag == ACL_OTHER
300  mode |= e_perm & S_IRWXO
301  Break
302  Case e_tag == ACL_MASK
303  mode = mode & ~S_IRWXG | (e_perm & S_IRWXO) << 3
305  not_equiv = 1
306  Break
307  Case e_tag == ACL_USER
308  Case e_tag == ACL_GROUP
309  not_equiv = 1
310  Break
311  Default
312  Return -EINVAL
315  If mode_p Then mode_p = mode_p & ~S_IRWXUGO | mode
317  Return not_equiv
Caller
NameDescribe
posix_acl_update_modeposix_acl_update_mode - update mode in set_acl*@inode: target inode*@mode_p: mode (pointer) for update*@acl: acl pointer* Update the file mode when setting an ACL: compute the new file permission* bits based on the ACL