s3/smbd: fix schedule_async_open() timer
commit5e94b38e14ea8090f904cc2d270ebdbb2f583e16
authorRalph Boehme <slow@samba.org>
Tue, 7 Mar 2017 14:33:55 +0000 (7 15:33 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 14 Mar 2017 11:49:24 +0000 (14 12:49 +0100)
tree586432e9a92efb42b1a93c8f33ae84541d90968d
parent621abab71fd9457bc6586b7e7111e465cdbbe369
s3/smbd: fix schedule_async_open() timer

schedule_async_open() was calling defer_open with sharemode lock = NULL,
as a result there was never an active 20 s timeout.

This has been broken since the commits in

$ git log --reverse -p -10 8283fd0e0090ed12b0b12d5acb550642d621b026

Just roll our own deferred record instead of calling defer_open() and
also set up timer that, as a last resort, catches stuck opens and just
exits for now.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ad8c36125f72e0d5f9ebfc94037a4ae9e7608aad)
source3/smbd/open.c