Make the KDC use a multi-process model.

We now fork(2) a number of separate KDC processes rather than a single
process.  By default, the number is selected by asking how many CPUs
the machine has.  We also have a master process which monitors all
of the children (which do the actual work) and it will restart kids
who die for any reason.  The children will die when the parent dies.

In the case of MacOS X, we also move the bonjour code into another
separate child as it creates threads and this is known to play
rather poorly with fork(2).  We could move this logic into a
designated child at some point in the future.

We slow down the spawning to one every 25ms to prevent instant crashes
and restarts from consuming all available system time.  This approach
may want to be revisited in the future.
This commit is contained in:
Roland C. Dowdeswell
2013-04-23 12:35:11 +01:00
parent 3544bbc0b3
commit 352a7e94a3
6 changed files with 287 additions and 38 deletions

View File

@@ -57,6 +57,8 @@ typedef struct krb5_kdc_configuration {
struct HDB **db;
int num_db;
int num_kdc_processes;
krb5_boolean encode_as_rep_as_tgs_rep; /* bug compatibility */
krb5_boolean tgt_use_strongest_session_key;