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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 21 Mar 2016 14:33:32 +0000 (15:33 +0100)
commit0dd174954988b1e4d6f59863088e95f5aa07eba6
tree49ea5757c4e28cf2cfd9e54f7d72f3f745b05cc9
parentffccce57263390a74f56bda6fd03b3ee33ae9d89
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

(cherry picked from commit 5fc6d2dabdf2aeef74fdefaa67eae0348bbf7a44)

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Mon Mar 21 15:33:32 CET 2016 on sn-devel-104
source3/smbd/open.c