1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r24470: Start fixing up the mapping of OBJECT_NAME_COLLISION

to DOS error ERRDOS, ERRfilexists on open calls.
Jeremy.
(This used to be commit 4674486450)
This commit is contained in:
Jeremy Allison 2007-08-15 23:05:49 +00:00 committed by Gerald (Jerry) Carter
parent ed70bc0d8e
commit fd9c413786

View File

@ -907,12 +907,23 @@ static void call_trans2open(connection_struct *conn,
open_attr, open_attr,
oplock_request, oplock_request,
&smb_action, &fsp); &smb_action, &fsp);
if (!NT_STATUS_IS_OK(status)) { if (!NT_STATUS_IS_OK(status)) {
if (open_was_deferred(req->mid)) { if (open_was_deferred(req->mid)) {
/* We have re-scheduled this call. */ /* We have re-scheduled this call. */
return; return;
} }
if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) {
/*
* We hit an existing file, and if we're returning DOS
* error codes OBJECT_NAME_COLLISION would map to
* ERRDOS/183, we need to return ERRDOS/80, see bug
* 4852.
*/
reply_botherror(req, NT_STATUS_OBJECT_NAME_COLLISION,
ERRDOS, ERRfilexists);
return;
}
reply_nterror(req, status); reply_nterror(req, status);
return; return;
} }