mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
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
This commit is contained in:
parent
a5dbdd03b8
commit
61bb3b7f09
@ -2687,6 +2687,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.
|
||||
@ -2837,6 +2847,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.
|
||||
|
Loading…
Reference in New Issue
Block a user