summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-10-05 22:41:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:04:51 -0500
commit94fe079be747ea5899f483dd8d00fdd247de4e33 (patch)
treead0986d4cbd3469b87a1041a558d7e64dcf3c4c1 /source3/smbd/open.c
parentf1ece089caa1512b583b313b46d7f3888c65580b (diff)
downloadsamba-94fe079be747ea5899f483dd8d00fdd247de4e33.tar.gz
samba-94fe079be747ea5899f483dd8d00fdd247de4e33.tar.bz2
samba-94fe079be747ea5899f483dd8d00fdd247de4e33.zip
r10744: Fix for the second incarnation of bug #3088, pushed by Alex Masterov
<alex@infobit.ru>. A fcbopen specific part of the code was erroneously being called as part of the mainline open. Note, that this patch superceeds and replaces the fix that Volker added for this bug (which he added a Samba4 torture test for ) : "Fix a race condition in Samba 3. If two files are opened simultaneously with NTCREATEX_DISP_CREATE (create if not exists, else fail) they might end up with two or more times NT_STATUS_OK as EEXIST is not correctly handled." Jeremy. (This used to be commit 5d7ab9a17e793c05409a16675ac2aa2861c4f89e)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 56d31c6940..a8fb8ed38f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1507,22 +1507,6 @@ files_struct *open_file_ntcreate(connection_struct *conn,
fsp_open = open_file(fsp,conn,fname,psbuf,flags|flags2,unx_mode,
access_mask);
- if (!fsp_open && (flags2 & O_EXCL) && (errno == EEXIST)) {
- /*
- * Two smbd's tried to open exclusively, but only one of them
- * succeeded.
- */
- file_free(fsp);
- return NULL;
- }
-
- if (!fsp_open && (flags == O_RDWR) && (errno != ENOENT)) {
- if((fsp_open = open_file(fsp,conn,fname,psbuf,
- O_RDONLY,unx_mode,access_mask)) == True) {
- flags = O_RDONLY;
- }
- }
-
if (!fsp_open) {
if (lck != NULL) {
talloc_free(lck);