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

Function acl_copyin

freebsd/kern/vfs_acl.c:140–162  ·  view source on GitHub ↗

* At one time, "struct ACL" was extended in order to add support for NFSv4 * ACLs. Instead of creating compatibility versions of all the ACL-related * syscalls, they were left intact. It's possible to find out what the code * calling these syscalls (libc) expects basing on "type" argument - if it's * either ACL_TYPE_ACCESS_OLD or ACL_TYPE_DEFAULT_OLD (which previously were * known as ACL_TY

Source from the content-addressed store, hash-verified

138 * format.
139 */
140static int
141acl_copyin(const void *user_acl, struct acl *kernel_acl, acl_type_t type)
142{
143 int error;
144 struct oldacl old;
145
146 switch (type) {
147 case ACL_TYPE_ACCESS_OLD:
148 case ACL_TYPE_DEFAULT_OLD:
149 error = copyin(user_acl, &old, sizeof(old));
150 if (error != 0)
151 break;
152 acl_copy_oldacl_into_acl(&old, kernel_acl);
153 break;
154
155 default:
156 error = copyin(user_acl, kernel_acl, sizeof(*kernel_acl));
157 if (kernel_acl->acl_maxcnt != ACL_MAX_ENTRIES)
158 return (EINVAL);
159 }
160
161 return (error);
162}
163
164static int
165acl_copyout(const struct acl *kernel_acl, void *user_acl, acl_type_t type)

Callers 2

vacl_set_aclFunction · 0.85
vacl_aclcheckFunction · 0.85

Calls 2

acl_copy_oldacl_into_aclFunction · 0.85
copyinFunction · 0.50

Tested by

no test coverage detected