• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/xnu-2782.1.97/bsd/vfs/

Lines Matching refs:fsec

1997 	kauth_filesec_t fsec;
2005 fsec = NULL;
2034 if (((fsec = kauth_filesec_alloc(fsec_size)) == NULL) ||
2036 uio_addiov(fsec_uio, CAST_USER_ADDR_T(fsec), xsize)) {
2071 if (fsec->fsec_magic != host_fsec_magic) {
2077 host_acl_entrycount = ntohl(fsec->fsec_acl.acl_entrycount);
2089 kauth_filesec_acl_setendian(KAUTH_ENDIAN_HOST, fsec, NULL);
2091 *fsecp = fsec;
2092 fsec = NULL;
2095 if (fsec != NULL)
2096 kauth_filesec_free(fsec);
2108 * may or may not point to the `fsec->fsec_acl`, depending on whether the
2112 * fsec The filesec being set.
2113 * acl The acl to be associated with 'fsec'.
2120 * Notes: Both the fsec and the acl are always valid.
2122 * The kauth_filesec_t in 'fsec', if any, is in host byte order,
2136 vnode_set_filesec(vnode_t vp, kauth_filesec_t fsec, kauth_acl_t acl, vfs_context_t ctx)
2155 kauth_filesec_acl_setendian(KAUTH_ENDIAN_DISK, fsec, acl);
2157 uio_addiov(fsec_uio, CAST_USER_ADDR_T(fsec), KAUTH_FILESEC_SIZE(0) - KAUTH_ACL_SIZE(KAUTH_FILESEC_NOACL));
2166 kauth_filesec_acl_setendian(KAUTH_ENDIAN_HOST, fsec, acl);
2187 kauth_filesec_t fsec;
2224 fsec = NULL;
2228 if ((error = vnode_get_filesec(vp, &fsec, ctx)) != 0)
2232 if (fsec == NULL) {
2239 VATTR_RETURN(vap, va_uuuid, fsec->fsec_owner);
2240 VATTR_RETURN(vap, va_guuid, fsec->fsec_group);
2244 if (fsec->fsec_acl.acl_entrycount == KAUTH_FILESEC_NOACL) {
2247 facl = kauth_acl_alloc(fsec->fsec_acl.acl_entrycount);
2249 kauth_filesec_free(fsec);
2253 bcopy(&fsec->fsec_acl, facl, KAUTH_ACL_COPYSIZE(&fsec->fsec_acl));
2257 kauth_filesec_free(fsec);
2500 * as are the fsec and lfsec, if they are used.
2512 kauth_filesec_t fsec;
2545 fsec = NULL;
2549 if ((error = vnode_get_filesec(vp, &fsec, ctx)) != 0) {
2555 if (fsec == NULL) {
2557 fsec = &lfsec;
2562 facl = &fsec->fsec_acl;
2565 if (fsec == &lfsec) {
2566 fsec->fsec_magic = KAUTH_FILESEC_MAGIC;
2567 fsec->fsec_owner = kauth_null_guid;
2568 fsec->fsec_group = kauth_null_guid;
2578 fsec->fsec_owner = vap->va_uuuid;
2583 fsec->fsec_group = vap->va_guuid;
2602 kauth_guid_equal(&fsec->fsec_owner, &kauth_null_guid) &&
2603 kauth_guid_equal(&fsec->fsec_group, &kauth_null_guid)) {
2611 error = vnode_set_filesec(vp, fsec, facl, ctx);
2616 if (fsec != &lfsec)
2617 kauth_filesec_free(fsec);