git.samba.org
/
bbaumbach
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
755486e
)
Fix spotted by Nadav Danieli <nadavd@exanet.com> - ensure dev and inode
author
Jeremy Allison
<jra@samba.org>
Mon, 7 Jul 2003 22:29:40 +0000
(22:29 +0000)
committer
Jeremy Allison
<jra@samba.org>
Mon, 7 Jul 2003 22:29:40 +0000
(22:29 +0000)
to fix open mode race condition.
Jeremy.
(This used to be commit
cbde1c8dfcd9d3bef956fe073e7108a54b48844b
)
source3/smbd/open.c
patch
|
blob
|
history
diff --git
a/source3/smbd/open.c
b/source3/smbd/open.c
index 85d115a3bf4fe7552dbce18addeae271da7ef696..6d03eaa29ac6350a7064b510573242444493746a 100644
(file)
--- a/
source3/smbd/open.c
+++ b/
source3/smbd/open.c
@@
-1024,6
+1024,16
@@
flags=0x%X flags2=0x%X mode=0%o returned %d\n",
if (!file_existed) {
+ /*
+ * Now the file exists and fsp is successfully opened,
+ * fsp->dev and fsp->inode are valid and should replace the
+ * dev=0,inode=0 from a non existent file. Spotted by
+ * Nadav Danieli <nadavd@exanet.com>. JRA.
+ */
+
+ dev = fsp->dev;
+ inode = fsp->inode;
+
lock_share_entry_fsp(fsp);
num_share_modes = open_mode_check(conn, fname, dev, inode,