| 105 | } |
| 106 | |
| 107 | int |
| 108 | acl_copy_acl_into_oldacl(const struct acl *source, struct oldacl *dest) |
| 109 | { |
| 110 | int i; |
| 111 | |
| 112 | if (source->acl_cnt > OLDACL_MAX_ENTRIES) |
| 113 | return (EINVAL); |
| 114 | |
| 115 | bzero(dest, sizeof(*dest)); |
| 116 | |
| 117 | dest->acl_cnt = source->acl_cnt; |
| 118 | |
| 119 | for (i = 0; i < dest->acl_cnt; i++) { |
| 120 | dest->acl_entry[i].ae_tag = source->acl_entry[i].ae_tag; |
| 121 | dest->acl_entry[i].ae_id = source->acl_entry[i].ae_id; |
| 122 | dest->acl_entry[i].ae_perm = source->acl_entry[i].ae_perm; |
| 123 | } |
| 124 | |
| 125 | return (0); |
| 126 | } |
| 127 | |
| 128 | /* |
| 129 | * At one time, "struct ACL" was extended in order to add support for NFSv4 |