summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2012-09-24 21:09:17 -0500
committerGreg Hudson <ghudson@mit.edu>2012-10-05 13:33:18 -0400
commitf1c85fbb0ab9e62b2790647b2681aec4d5fa4585 (patch)
tree22737dc9984a268c2b55c7229190d6e0ff5f27c6 /src/lib
parent70a119d4dc7ed7a94cfc32c523352af1d000e1c7 (diff)
downloadkrb5-f1c85fbb0ab9e62b2790647b2681aec4d5fa4585.tar.gz
krb5-f1c85fbb0ab9e62b2790647b2681aec4d5fa4585.tar.xz
krb5-f1c85fbb0ab9e62b2790647b2681aec4d5fa4585.zip
Improve kpropd behavior in iprop mode
- Make kpropd in iprop mode fork a child to listen for kprops from the master. The child writes progress and outcome reports to the parent for each kprop. This fixes a race between asking for a full resync and setting up a listener socket for it. - Add runonce (-t) for kpropd do_standalone() too. - Add a new iprop parameter: iprop_resync_timeout. kpropd will keep asking for incremental updates while waiting for a full resync to finish, and will re-request a full resync if kadmind continues to indicate that one is needed after this timeout passes since the previous full resync was requested. - Allow polling intervals less than 10 seconds. [ghudson@mit.edu: split out debug output changes; note polling interval change in commit message] ticket: 7373
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/kadm5/admin.h2
-rw-r--r--src/lib/kadm5/alt_prof.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/kadm5/admin.h b/src/lib/kadm5/admin.h
index 037e2f96e..9260cb576 100644
--- a/src/lib/kadm5/admin.h
+++ b/src/lib/kadm5/admin.h
@@ -164,6 +164,7 @@ typedef long kadm5_ret_t;
#define KADM5_CONFIG_IPROP_LOGFILE 0x08000000
#define KADM5_CONFIG_IPROP_PORT 0x10000000
#define KADM5_CONFIG_KVNO 0x20000000
+#define KADM5_CONFIG_IPROP_RESYNC_TIMEOUT 0x40000000
/*
* permission bits
*/
@@ -274,6 +275,7 @@ typedef struct _kadm5_config_params {
char * iprop_logfile;
/* char * iprop_server;*/
int iprop_port;
+ int iprop_resync_timeout;
} kadm5_config_params;
/***********************************************************************
diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c
index 2198cd1b1..769f5f93f 100644
--- a/src/lib/kadm5/alt_prof.c
+++ b/src/lib/kadm5/alt_prof.c
@@ -802,6 +802,10 @@ krb5_error_code kadm5_get_config_params(context, use_kdc_config,
GET_PORT_PARAM(iprop_port, KADM5_CONFIG_IPROP_PORT,
KRB5_CONF_IPROP_PORT, 0);
+ /* 5 min for large KDBs */
+ GET_DELTAT_PARAM(iprop_resync_timeout, KADM5_CONFIG_IPROP_RESYNC_TIMEOUT,
+ KRB5_CONF_IPROP_RESYNC_TIMEOUT, 60 * 5);
+
hierarchy[2] = KRB5_CONF_IPROP_MASTER_ULOGSIZE;
params.iprop_ulogsize = DEF_ULOGENTRIES;