From: Derrick Brashear Date: Tue, 23 Oct 2007 01:30:03 +0000 (+0000) Subject: darwin-modify-cp-workaround-20071022 X-Git-Tag: BP-openafs-windows-kdfs-ifs~423 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6aaca73002214ff8b7a757322a9bffa3d5af0e3e;p=packages%2Fo%2Fopenafs.git 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. --- diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index e04d02793..25c231f6c 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);