Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Modify acl when creating a new inode. The caller must ensure the acl is* only referenced once.* mode_p initially must contain the mode parameter to the open() / creat()* system calls. All permissions that are not granted by the acl are removed.

Proto:static int posix_acl_create_masq(struct posix_acl *acl, umode_t *mode_p)

Type:int

Parameter:

TypeParameterName
struct posix_acl *acl
umode_t *mode_p
419  struct posix_acl_entry * group_obj = NULL, * mask_obj = NULL
420  mode = mode_p
421  not_equiv = 0
427  Case e_tag == _tag entry in struct posix_acl_entry
428  e_perm &= mode >> 6 | ~S_IRWXO
429  mode &= e_perm << 6 | ~S_IRWXU
430  Break
432  Case e_tag == ACL_USER
433  Case e_tag == ACL_GROUP
434  not_equiv = 1
435  Break
437  Case e_tag == ACL_GROUP_OBJ
438  group_obj = pa
439  Break
441  Case e_tag == ACL_OTHER
442  e_perm &= mode | ~S_IRWXO
443  mode &= e_perm | ~S_IRWXO
444  Break
446  Case e_tag == ACL_MASK
447  mask_obj = pa
448  not_equiv = 1
449  Break
451  Default
452  Return -EIO
456  If mask_obj Then
457  e_perm &= mode >> 3 | ~S_IRWXO
458  mode &= e_perm << 3 | ~S_IRWXG
459  Else
460  If Not group_obj Then Return -EIO
462  e_perm &= mode >> 3 | ~S_IRWXO
463  mode &= e_perm << 3 | ~S_IRWXG
466  mode_p = mode_p & ~S_IRWXUGO | mode
467  Return not_equiv
Caller
NameDescribe
__posix_acl_create
posix_acl_create