mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
windows-mkdir-root-exists-20051021
If a request is received to create the root directory of a device, return CM_ERROR_EXISTS instead of CM_ERROR_NOTFOUND for the nul-string file name.
This commit is contained in:
parent
3491c0ffc5
commit
47cc7643e1
@ -5804,6 +5804,13 @@ long smb_ReceiveNTCreateX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
|
|||||||
osi_LogSaveString(smb_logp, treeStartp));
|
osi_LogSaveString(smb_logp, treeStartp));
|
||||||
openAction = 2; /* created directory */
|
openAction = 2; /* created directory */
|
||||||
|
|
||||||
|
/* if the request is to create the root directory
|
||||||
|
* it will appear as a directory name of the nul-string
|
||||||
|
* and a code of CM_ERROR_NOSUCHFILE
|
||||||
|
*/
|
||||||
|
if ( !*treeStartp && code == CM_ERROR_NOSUCHFILE)
|
||||||
|
code = CM_ERROR_EXISTS;
|
||||||
|
|
||||||
setAttr.mask = CM_ATTRMASK_CLIENTMODTIME;
|
setAttr.mask = CM_ATTRMASK_CLIENTMODTIME;
|
||||||
setAttr.clientModTime = time(NULL);
|
setAttr.clientModTime = time(NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user