From fd9c413786e54f07a1db992c2a103c6f1be832e2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 15 Aug 2007 23:05:49 +0000 Subject: r24470: Start fixing up the mapping of OBJECT_NAME_COLLISION to DOS error ERRDOS, ERRfilexists on open calls. Jeremy. (This used to be commit 4674486450bbe79ec9b22bcbc23c534365d6798a) --- source3/smbd/trans2.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 74c287c757..355c040a1c 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -907,12 +907,23 @@ static void call_trans2open(connection_struct *conn, open_attr, oplock_request, &smb_action, &fsp); - + if (!NT_STATUS_IS_OK(status)) { if (open_was_deferred(req->mid)) { /* We have re-scheduled this call. */ 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); return; } -- cgit