smbd: Only check dev/inode in open_directory, not the full stat()
authorAndrew Bartlett <abartlet@samba.org>
Fri, 11 Mar 2016 01:27:53 +0000 (14:27 +1300)
committerJeremy Allison <jra@samba.org>
Sat, 12 Mar 2016 08:43:21 +0000 (09:43 +0100)
commit5fc6d2dabdf2aeef74fdefaa67eae0348bbf7a44
tree206dc789f2762a36802a44b465c2a4d2124aecf9
parent2e2f81134c86ef3146781d62d9f561f496b74ee2
smbd: Only check dev/inode in open_directory, not the full stat()

This is needed because the smb2.create.mkdir-dup test creates a race,
and against an AD DC this can cause a flapping test if the lstat() and
stat() calls are made either side of the chown() due to creation of a
file by administrator.

Fix based on original patches by myself, by Douglas Bagnall
<douglas.bagnall@catalyst.net.nz>.  and Jeremy Allison <jra@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11780

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Mar 12 09:43:21 CET 2016 on sn-devel-144
source3/smbd/open.c