ldb_mdb: prevent MDB_env reuse across forks
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 13 Mar 2018 02:08:10 +0000 (15:08 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Apr 2018 14:27:18 +0000 (16:27 +0200)
commitb067c4037e0f8821ca6a106f8328f320d0ad79b0
treef1af07feb424ffb9109f49d5098accab30381809
parent5a0e212285d4cbff4c4dff54a4dad98eda324e57
ldb_mdb: prevent MDB_env reuse across forks

MDB_env's may not be reused accross forks.  Check the pid that the lmdb
structure was created by, and return an error if it is being used by a
different process.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/ldb_mdb/ldb_mdb.c