From 83db1a90e4ac60118228d472003ed7f1bd054440 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Tue, 23 Oct 2007 01:31:23 +0000 Subject: [PATCH] DEVEL15-darwin-modify-cp-workaround-20071022 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 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index e04d02793f..25c231f6c7 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -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);