s3: smbd: change file_set_dosmode() to use get_file_handle_for_metadata() instead...
commit690aab23955bb6d69a0def7f77e35a4b713622d4
authorJeremy Allison <jra@samba.org>
Thu, 1 May 2014 18:07:44 +0000 (1 11:07 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 19 May 2014 10:19:52 +0000 (19 12:19 +0200)
tree28ab548a5e0a72947d34dbbe105a3f79b98a12e0
parentdb4743a8a17280432cff496dce5b2bc354546973
s3: smbd: change file_set_dosmode() to use get_file_handle_for_metadata() instead of open_file_fchmod().

get_file_handle_for_metadata() is a new function that
finds an existing open handle (fsp->fh->fd != -1) for
a given dev/ino if there is one available, and uses
INTERNAL_OPEN_ONLY with WRITE_DATA access if not.

Allows open_file_fchmod() to be removed next.

Bug 10564 - Lock order violation and file lost

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
source3/smbd/dosmode.c