]> git.ipfire.org Git - thirdparty/krb5.git/commit
Avoid using LMDB environments across forks 1088/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 19 Jun 2020 19:05:37 +0000 (15:05 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 6 Jul 2020 20:18:28 +0000 (16:18 -0400)
commit38b98a14433b8858a3ca5979a0afa194df0df1e9
tree4cda2159ebc960bb9d0009f6c4ff502b27f776be
parentf2e28f13156785851819fc74cae52100e0521690
Avoid using LMDB environments across forks

In krb5kdc and kadmind, reinitialize the DB state after daemonizing,
to prevent using an LMDB environment in a different process than it
was created.  Otherwise the daemon's reader table slot appears to be
stale and can be claimed by another process.

In kadmind, this change means that global_server_handle changes value
after the loop setup.  Add an extra level of pointer indirection so
that the handle passed to the loop remains valid.

kdb_init_hist() is now called twice by kadmind.  Change it to avoid
leaking hist_princ on the second invocation.

ticket: 8918
tags: pullup
target_version: 1.18-next
target_version: 1.17-next
src/kadmin/server/misc.c
src/kadmin/server/ovsec_kadmd.c
src/kadmin/server/schpw.c
src/kdc/main.c
src/lib/kadm5/srv/server_kdb.c