]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-finder-and-tiger-cp-deal-with-dropboxes-20071024
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Wed, 24 Oct 2007 06:33:16 +0000 (06:33 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 24 Oct 2007 06:33:16 +0000 (06:33 +0000)
FIXES 69363

this way copying finishes

(cherry picked from commit f814c8a9636b2939da9d0f17de4d71c6fd23ae6c)

src/afs/DARWIN/osi_vnodeops.c

index e04d02793fe8f90c1f8239a66368f23cd552b9b8..feda2e95a5a11f7b06de2e3b053a98f66119fd50 100644 (file)
@@ -634,12 +634,18 @@ afs_vop_access(ap)
     /* we can't check for KAUTH_VNODE_TAKE_OWNERSHIP, so we always permit it */
     
     code = afs_AccessOK(tvc, bits, &treq, cmb);
-
+#if defined(AFS_DARWIN80_ENV)
+    /* In a dropbox, cp on 10.4 behaves badly, looping on EACCES */
+    /* In a dropbox, Finder may reopen the file. Let it. */
+    if (code == 0 && ((bits &~(PRSFS_READ|PRSFS_WRITE)) == 0)) {
+       code = afs_AccessOK(tvc, PRSFS_ADMINISTER|PRSFS_INSERT|bits, &treq, cmb);
+    }
+#endif
     if (code == 1 && vnode_vtype(ap->a_vp) == VREG &&
         ap->a_action & KAUTH_VNODE_EXECUTE &&
         (tvc->m.Mode & 0100) != 0100) {
         code = 0;
-     }
+    }
     if (code) {
         code= 0;               /* if access is ok */
     } else {