| 92 | #endif |
| 93 | |
| 94 | int sys_acl_get_info(SMB_ACL_ENTRY_T entry, SMB_ACL_TAG_T *tag_type_p, uint32 *bits_p, id_t *u_g_id_p) |
| 95 | { |
| 96 | acl_permset_t permset; |
| 97 | |
| 98 | if (acl_get_tag_type(entry, tag_type_p) != 0 |
| 99 | || acl_get_permset(entry, &permset) != 0) |
| 100 | return -1; |
| 101 | |
| 102 | *bits_p = (acl_get_perm(permset, ACL_READ) ? 4 : 0) |
| 103 | | (acl_get_perm(permset, ACL_WRITE) ? 2 : 0) |
| 104 | | (acl_get_perm(permset, ACL_EXECUTE) ? 1 : 0); |
| 105 | |
| 106 | if (*tag_type_p == SMB_ACL_USER || *tag_type_p == SMB_ACL_GROUP) { |
| 107 | void *qual; |
| 108 | if ((qual = acl_get_qualifier(entry)) == NULL) |
| 109 | return -1; |
| 110 | *u_g_id_p = *(id_t*)qual; |
| 111 | acl_free(qual); |
| 112 | } |
| 113 | |
| 114 | return 0; |
| 115 | } |
| 116 | |
| 117 | SMB_ACL_T sys_acl_init(int count) |
| 118 | { |
no test coverage detected