]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-darwin-modify-cp-workaround-20071022
authorDerrick Brashear <shadow@dementia.org>
Tue, 23 Oct 2007 01:31:23 +0000 (01:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 23 Oct 2007 01:31:23 +0000 (01:31 +0000)
more work will be needed to fool finder into just copying the d**n file, since
it's checking too hard.

(cherry picked from commit 6aaca73002214ff8b7a757322a9bffa3d5af0e3e)

src/afs/DARWIN/osi_vnodeops.c

index e04d02793fe8f90c1f8239a66368f23cd552b9b8..25c231f6c70b9e91b9238f23ed9ce39dfdf9e15e 100644 (file)
@@ -643,8 +643,14 @@ afs_vop_access(ap)
     if (code) {
         code= 0;               /* if access is ok */
     } else {
-       /* In 10.4 cp will loop forever on EACCES */
-        code = afs_CheckCode(EPERM, &treq, 57);        /* failure code */
+#if defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)
+       if (ap->a_action == KAUTH_VNODE_READ_DATA) {
+           /* In 10.4 cp will loop forever on EACCES */
+           code = afs_CheckCode(EACCES, &treq, 57);
+        } else 
+           /* but kinit wants EACCES or it gets dumb */
+#endif
+           code = afs_CheckCode(EACCES, &treq, 57);        /* failure code */
     }
 out:
      afs_PutFakeStat(&fakestate);