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:posix_acl_create

Proto:int posix_acl_create(struct inode *dir, umode_t *mode, struct posix_acl **default_acl, struct posix_acl **acl)

Type:int

Parameter:

TypeParameterName
struct inode *dir
umode_t *mode
struct posix_acl **default_acl
struct posix_acl **acl
589  * acl = NULL
590  * default_acl = NULL
592  If S_ISLNK( * mode) || Not IS_POSIXACL(dir) Then Return 0
595  p = get_acl(dir, ACL_TYPE_DEFAULT)
596  If Not p || p == ERR_PTR( - EOPNOTSUPP) Then
597  mode &= ~current_umask()
598  Return 0
600  If IS_ERR(p) Then Return PTR_ERR(p)
603  ret = -ENOMEM
604  clone = Clone an ACL.
605  If Not clone Then Go to err_release
608  ret = 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.
609  If ret < 0 Then Go to err_release_clone
612  If ret == 0 Then Free an ACL handle.
614  Else acl = clone
617  If Not S_ISDIR( * mode) Then Free an ACL handle.
619  Else default_acl = p
622  Return 0
624  err_release_clone :
625  Free an ACL handle.
626  err_release :
627  Free an ACL handle.
628  Return ret
Caller
NameDescribe
simple_acl_create