Lines Matching refs:vsecattr

851 smb_fsacl_from_vsa(vsecattr_t *vsecattr, acl_type_t acl_type)
858 ASSERT(vsecattr);
869 numacls = vsecattr->vsa_aclcnt + vsecattr->vsa_dfaclcnt;
870 aclbsize = vsecattr->vsa_aclcnt * sizeof (aclent_t);
871 dfaclbsize = vsecattr->vsa_dfaclcnt * sizeof (aclent_t);
876 (void) memcpy(acl_info->acl_aclp, vsecattr->vsa_aclentp,
879 vsecattr->vsa_dfaclentp, dfaclbsize);
887 aclbsize = vsecattr->vsa_aclcnt * sizeof (ace_t);
888 acl_info->acl_cnt = vsecattr->vsa_aclcnt;
889 acl_info->acl_flags = vsecattr->vsa_aclflags;
891 (void) memcpy(acl_info->acl_aclp, vsecattr->vsa_aclentp,
903 if (aclbsize && vsecattr->vsa_aclentp)
904 kmem_free(vsecattr->vsa_aclentp, aclbsize);
905 if (dfaclbsize && vsecattr->vsa_dfaclentp)
906 kmem_free(vsecattr->vsa_dfaclentp, dfaclbsize);
922 smb_fsacl_to_vsa(acl_t *acl_info, vsecattr_t *vsecattr, int *aclbsize)
929 ASSERT(vsecattr);
932 bzero(vsecattr, sizeof (vsecattr_t));
950 vsecattr->vsa_mask = VSA_ACL;
952 vsecattr->vsa_aclcnt = numacls;
954 vsecattr->vsa_aclentp = kmem_alloc(*aclbsize, KM_SLEEP);
955 (void) memcpy(vsecattr->vsa_aclentp, acl_info->acl_aclp,
959 ksort((caddr_t)vsecattr->vsa_aclentp,
960 vsecattr->vsa_aclcnt, sizeof (aclent_t), cmp2acls);
963 for (numacls = 0, aclp = vsecattr->vsa_aclentp;
964 numacls < vsecattr->vsa_aclcnt;
971 if (numacls < vsecattr->vsa_aclcnt) {
972 vsecattr->vsa_mask |= VSA_DFACL;
973 vsecattr->vsa_dfaclcnt = vsecattr->vsa_aclcnt - numacls;
974 vsecattr->vsa_dfaclentp = aclp;
975 vsecattr->vsa_aclcnt = numacls;
979 if (vsecattr->vsa_aclcnt == 0) {
980 vsecattr->vsa_mask &= ~VSA_ACL;
981 vsecattr->vsa_aclentp = NULL;
985 if (vsecattr->vsa_dfaclcnt &&
999 vsecattr->vsa_mask = VSA_ACE | VSA_ACE_ACLFLAGS;
1000 vsecattr->vsa_aclcnt = acl_info->acl_cnt;
1001 vsecattr->vsa_aclflags = acl_info->acl_flags & ACL_FLAGS_ALL;
1002 *aclbsize = vsecattr->vsa_aclcnt * sizeof (ace_t);
1003 vsecattr->vsa_aclentsz = *aclbsize;
1004 vsecattr->vsa_aclentp = kmem_alloc(*aclbsize, KM_SLEEP);
1005 (void) memcpy(vsecattr->vsa_aclentp, acl_info->acl_aclp,