Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:xdr_nfsace_decode

Proto:static int xdr_nfsace_decode(struct xdr_array2_desc *desc, void *elem)

Type:int

Parameter:

TypeParameterName
struct xdr_array2_desc *desc
void *elem
148  nfsacl_desc = desc
150  p = elem
154  If Not acl Then
155  If array_len > Maximum number of ACL entries over NFS Then Return -EINVAL
157  acl = Allocate a new ACL with the specified number of entries.
158  If Not acl Then Return -ENOMEM
160  count = 0
163  entry = a_entries[count++]
164  e_tag = ntohl( * p++) & ~Flag for Default ACL entries
165  id = ntohl( * p++)
166  e_perm = ntohl( * p++)
169  Case e_tag == ACL_USER
170  e_uid = make_kuid - Map a user-namespace uid pair into a kuid
171  If Not uid_valid(e_uid) Then Return -EINVAL
173  Break
174  Case e_tag == ACL_GROUP
175  e_gid = make_kgid - Map a user-namespace gid pair into a kgid
176  If Not gid_valid(e_gid) Then Return -EINVAL
178  Break
179  Case e_tag == _tag entry in struct posix_acl_entry
180  Case e_tag == ACL_GROUP_OBJ
181  Case e_tag == ACL_OTHER
182  If e_perm & ~S_IRWXO Then Return -EINVAL
184  Break
185  Case e_tag == ACL_MASK
187  e_perm &= S_IRWXO
188  Break
189  Default
190  Return -EINVAL
193  Return 0