From: Jeffrey Altman Date: Mon, 11 Feb 2008 14:46:36 +0000 (+0000) Subject: DEVEL15-windows-freelance-20080211 X-Git-Tag: openafs-devel-1_5_32~30 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b8aeb52fdb9a110f92196283dd5e8e7d86fac347;p=packages%2Fo%2Fopenafs.git DEVEL15-windows-freelance-20080211 LICENSE MIT Do not return BAD_NETWORK_ERROR in response to attempts to create directories or files in the Freelance root.afs volume. Instead return ACCESS_DENIED. BAD_NETWORK_ERROR was being sent because the Freelance cell has no vldb servers. Short circuit the error by testing for freelance in CreateFile and MakeDir (cherry picked from commit 61bb3b7f096f3b10075dcb1403879e3ec518276b) --- diff --git a/src/WINNT/afsd/cm_vnodeops.c b/src/WINNT/afsd/cm_vnodeops.c index f9c309f91..3f274b0b0 100644 --- a/src/WINNT/afsd/cm_vnodeops.c +++ b/src/WINNT/afsd/cm_vnodeops.c @@ -2689,6 +2689,16 @@ long cm_Create(cm_scache_t *dscp, char *namep, long flags, cm_attr_t *attrp, return CM_ERROR_ATSYS; } +#ifdef AFS_FREELANCE_CLIENT + /* Freelance root volume does not hold files */ + if (cm_freelanceEnabled && + dscp->fid.cell==AFS_FAKE_ROOT_CELL_ID && + dscp->fid.volume==AFS_FAKE_ROOT_VOL_ID ) + { + return CM_ERROR_NOACCESS; + } +#endif /* AFS_FREELANCE_CLIENT */ + /* before starting the RPC, mark that we're changing the file data, so * that someone who does a chmod will know to wait until our call * completes. @@ -2839,6 +2849,16 @@ long cm_MakeDir(cm_scache_t *dscp, char *namep, long flags, cm_attr_t *attrp, return CM_ERROR_ATSYS; } +#ifdef AFS_FREELANCE_CLIENT + /* Freelance root volume does not hold subdirectories */ + if (cm_freelanceEnabled && + dscp->fid.cell==AFS_FAKE_ROOT_CELL_ID && + dscp->fid.volume==AFS_FAKE_ROOT_VOL_ID ) + { + return CM_ERROR_NOACCESS; + } +#endif /* AFS_FREELANCE_CLIENT */ + /* before starting the RPC, mark that we're changing the directory * data, so that someone who does a chmod on the dir will wait until * our call completes.