]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/vfs/vfs_xattr.c
xnu-1504.9.17.tar.gz
[apple/xnu.git] / bsd / vfs / vfs_xattr.c
index a1288ffc6155853b55ac54506fba581e6e720105..d15711685e7157fc0e96442185cee836ba2fc094 100644 (file)
@@ -703,6 +703,7 @@ getshadowfile(vnode_t vp, vnode_t *svpp, int makestream, size_t *rsrcsize,
        /* Create the shadow stream file. */
        error = VNOP_CREATE(dvp, &svp, &cn, &va, context);
        if (error == 0) {
+               vnode_recycle(svp);
                *creator = 1;
        } else if ((error == EEXIST) && !makestream) {
                error = VNOP_LOOKUP(dvp, &svp, &cn, context);
@@ -945,8 +946,8 @@ get_shadow_dir(vnode_t *sdvpp, vfs_context_t context)
                }
        }
 
-       /* Obtain the vnode for "/tmp" directory. */
-       if (vnode_lookup("/tmp", 0, &dvp, context) != 0) {
+       /* Obtain the vnode for "/var/run" directory. */
+       if (vnode_lookup("/var/run", 0, &dvp, context) != 0) {
                error = ENOTSUP;
                goto out;
        }
@@ -994,7 +995,7 @@ get_shadow_dir(vnode_t *sdvpp, vfs_context_t context)
                        if (sdvp->v_type != VDIR) {
                                goto baddir;
                        }
-                       /* Obtain the fsid for /tmp directory */
+                       /* Obtain the fsid for /var/run directory */
                        VATTR_INIT(&va);
                        VATTR_WANTED(&va, va_fsid);
                        if (VNOP_GETATTR(dvp, &va, context) != 0  ||