summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-01-23 19:39:57 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-01-23 19:39:57 +0000
commit691632e555274853dbefccf4accc6f5ee5e42e27 (patch)
treebcb81aec930f00e704dc244d12720569d1fca11d
parent869f24e0b1915ec8d3e14f8850417474200e687e (diff)
downloadsamba-691632e555274853dbefccf4accc6f5ee5e42e27.tar.gz
samba-691632e555274853dbefccf4accc6f5ee5e42e27.tar.bz2
samba-691632e555274853dbefccf4accc6f5ee5e42e27.zip
Added fix for file descriptor re-use failing when
file_exists is false. Jeremy (jra@cygnus.com). (This used to be commit b587f18247537577764a1e28169bf6307ff292e9)
-rw-r--r--source3/smbd/server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 623a3fb2bd..2d47816ff7 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1469,10 +1469,10 @@ void open_file_shared(int fnum,int cnum,char *fname,int share_mode,int ofun,
DEBUG(4,("calling open_file with flags=0x%X flags2=0x%X mode=0%o\n",
flags,flags2,mode));
- open_file(fnum,cnum,fname,flags|(flags2&~(O_TRUNC)),mode,&sbuf);
+ open_file(fnum,cnum,fname,flags|(flags2&~(O_TRUNC)),mode,file_existed ? &sbuf : 0);
if (!Files[fnum].open && flags==O_RDWR && errno!=ENOENT && fcbopen) {
flags = O_RDONLY;
- open_file(fnum,cnum,fname,flags,mode,&sbuf);
+ open_file(fnum,cnum,fname,flags,mode,file_existed ? &sbuf : 0 );
}
if (Files[fnum].open) {