ldb_mdb: Use mdb_env_get_fd() to get the FD for fstat() and FD_CLOEXEC
authorAndrew Bartlett <abartlet@samba.org>
Thu, 17 May 2018 01:10:25 +0000 (13:10 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 23 May 2018 00:27:11 +0000 (02:27 +0200)
commit4dc44659dd290035a5500a13197e9fcee7d9a21b
treef6f4939c4fa2c67d3bfea971b393311059ca93c1
parent322e42818b144249084dc3a8d4f7988cd8fcab3e
ldb_mdb: Use mdb_env_get_fd() to get the FD for fstat() and FD_CLOEXEC

This ensures we leave the FD behind if we exec() in a child process.

This deliberatly the same as TDB, as we want the same behaviour as
we have come to expect with that backend.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
lib/ldb/ldb_mdb/ldb_mdb.c