summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-08-16 00:22:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:29:51 -0500
commit522418ce16f8d0af8dcf4673a795b42e14ea9e9c (patch)
tree03dd87096d604c7033e2c9422f40577a2e4aa943 /source3
parent606f10945fc159d3e12f181b3e5137b3e035c450 (diff)
downloadsamba-522418ce16f8d0af8dcf4673a795b42e14ea9e9c.tar.gz
samba-522418ce16f8d0af8dcf4673a795b42e14ea9e9c.tar.bz2
samba-522418ce16f8d0af8dcf4673a795b42e14ea9e9c.zip
r24475: Fix the error mapping for SMB_POSIX_PATH_OPEN.
Jeremy. (This used to be commit 6dac315ba1d9b9582c2b573e0785b2f6d627f846)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 355c040a1c..a01e79b624 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6515,6 +6515,18 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
ERRSRV, ERRbadpath);
return;
}
+ if (info_level == SMB_POSIX_PATH_OPEN &&
+ 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.
+ */
+ return ERROR_BOTH(NT_STATUS_OBJECT_NAME_COLLISION,
+ ERRDOS, ERRfilexists);
+ }
+
reply_nterror(req, status);
return;
}