]> git.ipfire.org Git - thirdparty/samba.git/commit
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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 Aug 2020 12:18:21 +0000 (12:18 +0000)
commiteb14d8850f8356b0b48d2a8708107599c359121c
tree0047a577222c902af7f8df4a3cbaf52c5c56992e
parent37e4164781349c7a98d3bd336b9ea9411dfc2cba
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

(backported from commit 05d4466a6d1ad048fa86aea09ec0a56a7b961369)
[slow@samba.org: use share_mode_stale_pid() instead of share_entry_stale_pid()]
[metze@samba.org: use file_id_string_tos() instead of file_id_str_buf()]
source3/smbd/oplock.c