smbd: check for stale pid in get_lease_type()
authorRalph Boehme <slow@samba.org>
Thu, 2 Jul 2020 12:47:12 +0000 (14:47 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 2 Jul 2020 16:45:42 +0000 (16:45 +0000)
commit05d4466a6d1ad048fa86aea09ec0a56a7b961369
treeb0b225cc670b48d99401371a6d730d3b52189f0f
parent3f4a865821da27efbed4f7c38ad3efbcaae77a02
smbd: check for stale pid in get_lease_type()

If leases_db_get() failed the leases_db record might have been cleaned up for
stale processes. Check if the share-mode-entry owner is stale in this case and
return a 0 lease state. In any other case, log a debug messages and panic.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul  2 16:45:42 UTC 2020 on sn-devel-184
source3/smbd/oplock.c