]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Use "replica" in iprop settings 851/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 27 Sep 2018 16:14:25 +0000 (12:14 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 3 Oct 2018 16:12:31 +0000 (12:12 -0400)
Change the default dump filename for iprop to "replica_datatrans", and
the iprop poll interval profile variable to "iprop_replica_poll",
preserving compatibility with the old name.

ticket: 8742 (new)

doc/admin/admin_commands/kprop.rst
doc/admin/admin_commands/kpropd.rst
doc/admin/conf_files/kdc_conf.rst
doc/admin/database.rst
doc/admin/install_kdc.rst
doc/mitK5defaults.rst
src/include/k5-int.h
src/include/osconf.hin
src/kprop/replica_update
src/lib/kadm5/alt_prof.c
src/tests/t_iprop.py

index 6365d853de61f4e635b304091756533ec26513d4..3fad2c6847736fc0707a6feb6642207beadefb68 100644 (file)
@@ -33,7 +33,7 @@ OPTIONS
 **-f** *file*
     Specifies the filename where the dumped principal database file is
     to be found; by default the dumped database file is normally
-    |kdcdir|\ ``/slave_datatrans``.
+    |kdcdir|\ ``/replica_datatrans``.
 
 **-P** *port*
     Specifies the port to use to contact the :ref:`kpropd(8)` server
index 37162c935c1ebd1534fdc9a0c9eb6725df121431..d3e4fb18689784195c30601a646299541c47b8d3 100644 (file)
@@ -53,7 +53,7 @@ compatibility but does nothing.
 Incremental propagation may be enabled with the **iprop_enable**
 variable in :ref:`kdc.conf(5)`.  If incremental propagation is
 enabled, the replica periodically polls the master KDC for updates, at
-an interval determined by the **iprop_slave_poll** variable.  If the
+an interval determined by the **iprop_replica_poll** variable.  If the
 replica receives updates, kpropd updates its log file with any updates
 from the master.  :ref:`kproplog(8)` can be used to view a summary of
 the update entry log on the replica KDC.  If incremental propagation
index ee17099067664370c5c9a21858d7a0cd9d8a019b..c73791ceb90a83ba929e267311a259d0b218adcc 100644 (file)
@@ -227,10 +227,15 @@ The following tags may be specified in a [realms] subsection:
     retained for incremental propagation.  The default value is 1000.
     Prior to release 1.11, the maximum value was 2500.
 
-**iprop_slave_poll**
+**iprop_replica_poll**
     (Delta time string.)  Specifies how often the replica KDC polls
     for new updates from the master.  The default value is ``2m``
-    (that is, two minutes).
+    (that is, two minutes).  New in release 1.17.
+
+**iprop_slave_poll**
+    (Delta time string.)  The name for **iprop_replica_poll** prior to
+    release 1.17.  Its value is used as a fallback if
+    **iprop_replica_poll** is not specified.
 
 **iprop_listen**
     (Whitespace- or comma-separated list.)  Specifies the iprop RPC
index 960f304360039247a6fb6a0608bf8cd56f025d1b..3007cfe35a20d72632f3bfc1b5def59c0e76fae1 100644 (file)
@@ -817,7 +817,7 @@ data in the KDC config file (See :ref:`kdc.conf(5)`):
 ====================== =============== ===========================================
 iprop_enable           *boolean*       If *true*, then incremental propagation is enabled, and (as noted below) normal kprop propagation is disabled. The default is *false*.
 iprop_master_ulogsize  *integer*       Indicates the number of entries that should be retained in the update log. The default is 1000; the maximum number is 2500.
-iprop_slave_poll       *time interval* Indicates how often the replica should poll the master KDC for changes to the database. The default is two minutes.
+iprop_replica_poll     *time interval* Indicates how often the replica should poll the master KDC for changes to the database. The default is two minutes.
 iprop_port             *integer*       Specifies the port number to be used for incremental propagation. This is required in both master and replica configuration files.
 iprop_resync_timeout   *integer*       Specifies the number of seconds to wait for a full propagation to complete. This is optional on replica configurations.  Defaults to 300 seconds (5 minutes).
 iprop_logfile          *file name*     Specifies where the update log file for the realm database is to be stored. The default is to use the *database_name* entry from the realms section of the config file :ref:`kdc.conf(5)`, with *.ulog* appended. (NOTE: If database_name isn't specified in the realms section, perhaps because the LDAP database back end is being used, or the file name is specified in the *dbmodules* section, then the hard-coded default for *database_name* is used. Determination of the *iprop_logfile*  default value will not use values from the *dbmodules* section.)
@@ -892,4 +892,4 @@ The Sun implementation hard-codes pathnames in ``/var/krb5`` for the
 update log and the per-replica kprop dump files.  In the MIT
 implementation, the pathname for the update log is specified in the
 config file, and the per-replica dump files are stored in
-|kdcdir|\ ``/slave_datatrans_hostname``.
+|kdcdir|\ ``/replica_datatrans_hostname``.
index c7eec1e07025109da077508116c0b88a8b2f33ab..5d1e70edec54e5468440fb7199d89d17e0caf070 100644 (file)
@@ -425,12 +425,12 @@ Propagate the database to each replica KDC
 First, create a dump file of the database on the master KDC, as
 follows::
 
-    shell% kdb5_util dump /usr/local/var/krb5kdc/slave_datatrans
+    shell% kdb5_util dump /usr/local/var/krb5kdc/replica_datatrans
 
 Then, manually propagate the database to each replica KDC, as in the
 following example::
 
-    shell% kprop -f /usr/local/var/krb5kdc/slave_datatrans kerberos-1.mit.edu
+    shell% kprop -f /usr/local/var/krb5kdc/replica_datatrans kerberos-1.mit.edu
 
     Database propagation to kerberos-1.mit.edu: SUCCEEDED
 
@@ -448,11 +448,11 @@ following is an example of a Bourne shell script that will do this.
 
     kdclist = "kerberos-1.mit.edu kerberos-2.mit.edu"
 
-    kdb5_util dump /usr/local/var/krb5kdc/slave_datatrans
+    kdb5_util dump /usr/local/var/krb5kdc/replica_datatrans
 
     for kdc in $kdclist
     do
-        kprop -f /usr/local/var/krb5kdc/slave_datatrans $kdc
+        kprop -f /usr/local/var/krb5kdc/replica_datatrans $kdc
     done
 
 You will need to set up a cron job to run this script at the intervals
index 308fbbd22a65dfeb911f9bc03e46894fac124fed..65d904ef6cff0a82e72d31fcad8378e195f74422 100644 (file)
@@ -35,16 +35,16 @@ Replica KDC propagation defaults
 This table shows defaults used by the :ref:`kprop(8)` and
 :ref:`kpropd(8)` programs.
 
-==========================  ==============================  ===========
-Description                 Default                         Environment
-==========================  ==============================  ===========
-kprop database dump file    |kdcdir|\ ``/slave_datatrans``
+==========================  ================================  ===========
+Description                 Default                           Environment
+==========================  ================================  ===========
+kprop database dump file    |kdcdir|\ ``/replica_datatrans``
 kpropd temporary dump file  |kdcdir|\ ``/from_master``
 kdb5_util location          |sbindir|\ ``/kdb5_util``
 kprop location              |sbindir|\ ``/kprop``
 kpropd ACL file             |kdcdir|\ ``/kpropd.acl``
-kprop port                  754                             KPROP_PORT
-==========================  ==============================  ===========
+kprop port                  754                               KPROP_PORT
+==========================  ================================  ===========
 
 
 .. _paths:
index bf324582c7b4ac86688b07691c4aae8b8fe94848..652242207aa4675af15053c9c0e1357a5e272d65 100644 (file)
@@ -226,6 +226,7 @@ typedef unsigned char   u_char;
 #define KRB5_CONF_IPROP_MASTER_ULOGSIZE        "iprop_master_ulogsize"
 #define KRB5_CONF_IPROP_PORT                   "iprop_port"
 #define KRB5_CONF_IPROP_RESYNC_TIMEOUT         "iprop_resync_timeout"
+#define KRB5_CONF_IPROP_REPLICA_POLL           "iprop_replica_poll"
 #define KRB5_CONF_IPROP_SLAVE_POLL             "iprop_slave_poll"
 #define KRB5_CONF_K5LOGIN_AUTHORITATIVE        "k5login_authoritative"
 #define KRB5_CONF_K5LOGIN_DIRECTORY            "k5login_directory"
index 391f48d7572a9feea9f4ef1e0ee14e91950391a8..c24717be67b93158357148b12f4d555c719050df 100644 (file)
  * krb5 replica support follows
  */
 
-#define KPROP_DEFAULT_FILE KDC_DIR "/slave_datatrans"
+#define KPROP_DEFAULT_FILE KDC_DIR "/replica_datatrans"
 #define KPROPD_DEFAULT_FILE KDC_DIR "/from_master"
 #define KPROPD_DEFAULT_KDB5_UTIL "@SBINDIR/kdb5_util"
 #define KPROPD_DEFAULT_KPROP "@SBINDIR/kprop"
index 69e7bd40890cf2d2b98d30fc838d151c64a50a94..a8b49446a2e9dbde04ae90721de4639831f82fe5 100644 (file)
@@ -7,7 +7,7 @@
 KDB_DIR=/usr/local/var/krb5kdc
 
 KDB_FILE=$KDB_DIR/principal.db
-DUMPFILE=$KDB_DIR/slave_datatrans
+DUMPFILE=$KDB_DIR/replica_datatrans
 KDB5_UTIL=/usr/local/sbin/kdb5_util
 KPROP=/usr/local/sbin/kprop
 
index e2d8f7789c744a25fa7209f7eb79f44d8959e025..3f6b536517803f822045aa9a997378f6094b3a2b 100644 (file)
@@ -804,7 +804,11 @@ krb5_error_code kadm5_get_config_params(krb5_context context,
     }
 
     GET_DELTAT_PARAM(iprop_poll_time, KADM5_CONFIG_POLL_TIME,
-                     KRB5_CONF_IPROP_SLAVE_POLL, 2 * 60); /* 2m */
+                     KRB5_CONF_IPROP_REPLICA_POLL, -1);
+    if (params.iprop_poll_time == -1) {
+        GET_DELTAT_PARAM(iprop_poll_time, KADM5_CONFIG_POLL_TIME,
+                         KRB5_CONF_IPROP_SLAVE_POLL, 2 * 60);
+    }
 
     *params_out = params;
 
index 92e22b95033bb3ee325f7e29aa7c0643995fa679..46cb07550266a22e7e6b82cb52dde5bfcd131299 100755 (executable)
@@ -114,27 +114,27 @@ def check_ulog(num, first, last, entries, env=None):
 # DB and ulog file.
 conf = {'realms': {'$realm': {'iprop_enable': 'true',
                               'iprop_logfile': '$testdir/db.ulog'}}}
-conf_rep1 = {'realms': {'$realm': {'iprop_slave_poll': '600',
+conf_rep1 = {'realms': {'$realm': {'iprop_replica_poll': '600',
                                    'iprop_logfile': '$testdir/ulog.replica1'}},
              'dbmodules': {'db': {'database_name': '$testdir/db.replica1'}}}
 conf_rep1m = {'realms': {'$realm': {'iprop_logfile': '$testdir/ulog.replica1',
                                     'iprop_port': '$port8'}},
               'dbmodules': {'db': {'database_name': '$testdir/db.replica1'}}}
-conf_rep2 = {'realms': {'$realm': {'iprop_slave_poll': '600',
+conf_rep2 = {'realms': {'$realm': {'iprop_replica_poll': '600',
                                    'iprop_logfile': '$testdir/ulog.replica2',
                                    'iprop_port': '$port8'}},
              'dbmodules': {'db': {'database_name': '$testdir/db.replica2'}}}
 
 conf_foo = {'libdefaults': {'default_realm': 'FOO'},
             'domain_realm': {hostname: 'FOO'}}
-conf_rep3 = {'realms': {'$realm': {'iprop_slave_poll': '600',
+conf_rep3 = {'realms': {'$realm': {'iprop_replica_poll': '600',
                                    'iprop_logfile': '$testdir/ulog.replica3',
                                    'iprop_port': '$port8'},
                         'FOO': {'iprop_logfile': '$testdir/ulog.replica3'}},
             'dbmodules': {'db': {'database_name': '$testdir/db.replica3'}}}
 
 krb5_conf_rep4 = {'domain_realm': {hostname: 'FOO'}}
-conf_rep4 = {'realms': {'$realm': {'iprop_slave_poll': '600',
+conf_rep4 = {'realms': {'$realm': {'iprop_replica_poll': '600',
                                    'iprop_logfile': '$testdir/ulog.replica4',
                                    'iprop_port': '$port8'}},
              'dbmodules': {'db': {'database_name': '$testdir/db.replica4'}}}