| 83 | acl_type_t type, const struct acl *aclp); |
| 84 | |
| 85 | int |
| 86 | acl_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 | |
| 107 | int |
| 108 | acl_copy_acl_into_oldacl(const struct acl *source, struct oldacl *dest) |