MCPcopy Create free account
hub / github.com/F-Stack/f-stack / acl_copy_oldacl_into_acl

Function acl_copy_oldacl_into_acl

freebsd/kern/vfs_acl.c:85–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 acl_type_t type, const struct acl *aclp);
84
85int
86acl_copy_oldacl_into_acl(const struct oldacl *source, struct acl *dest)
87{
88 int i;
89
90 if (source->acl_cnt < 0 || source->acl_cnt > OLDACL_MAX_ENTRIES)
91 return (EINVAL);
92
93 bzero(dest, sizeof(*dest));
94
95 dest->acl_cnt = source->acl_cnt;
96 dest->acl_maxcnt = ACL_MAX_ENTRIES;
97
98 for (i = 0; i < dest->acl_cnt; i++) {
99 dest->acl_entry[i].ae_tag = source->acl_entry[i].ae_tag;
100 dest->acl_entry[i].ae_id = source->acl_entry[i].ae_id;
101 dest->acl_entry[i].ae_perm = source->acl_entry[i].ae_perm;
102 }
103
104 return (0);
105}
106
107int
108acl_copy_acl_into_oldacl(const struct acl *source, struct oldacl *dest)

Callers 1

acl_copyinFunction · 0.85

Calls 1

bzeroFunction · 0.85

Tested by

no test coverage detected