summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-08-15 23:05:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:50 -0500
commitfd9c413786e54f07a1db992c2a103c6f1be832e2 (patch)
tree5e039571f3fbd2f78108186bbff444b3314385f3 /source3
parented70bc0d8eef17af75ffcafd0c4b90ea403002fc (diff)
downloadsamba-fd9c413786e54f07a1db992c2a103c6f1be832e2.tar.gz
samba-fd9c413786e54f07a1db992c2a103c6f1be832e2.tar.bz2
samba-fd9c413786e54f07a1db992c2a103c6f1be832e2.zip
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)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c13
1 files changed, 12 insertions, 1 deletions
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;
}