[27071] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Make kadmind iprop never return UPDATE_BUSY

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Oct 5 15:32:49 2012

Date: Fri, 5 Oct 2012 15:32:31 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201210051932.q95JWVEu014209@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/969331732b62e73d1e073ff3ad87bf1774ee9fd1
commit 969331732b62e73d1e073ff3ad87bf1774ee9fd1
Author: Nicolas Williams <nico@cryptonector.com>
Date:   Thu Sep 20 15:37:45 2012 -0400

    Make kadmind iprop never return UPDATE_BUSY
    
    Currently kadmind allows slaves to poll for updates as often as they
    like, but not within 10s of the last update.  This means that iprop will
    appear to fail to synchronize the KDC at any site whose master KDC
    processes at least one write transaction every 10 seconds consistently.
    
    The original intention must have been to throttle iprop clients (slave
    KDCs) that poll too often.  But UPDATE_BUSY as implemented is not that,
    and implementing a throttle would be difficult (requires keeping state
    in a table) and mostly useless (admins can manage their poll timers just
    fine without a throttle in kadmind).
    
    ticket: 7369

 src/lib/kdb/kdb_log.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/src/lib/kdb/kdb_log.c b/src/lib/kdb/kdb_log.c
index dc994dd..b800fa6 100644
--- a/src/lib/kdb/kdb_log.c
+++ b/src/lib/kdb/kdb_log.c
@@ -726,10 +726,9 @@ ulog_get_entries(krb5_context context,          /* input - krb5 lib config */
     XDR                 xdrs;
     kdb_ent_header_t    *indx_log;
     kdb_incr_update_t   *upd;
-    uint_t              indx, count, tdiff;
+    uint_t              indx, count;
     uint32_t            sno;
     krb5_error_code     retval;
-    struct timeval      timestamp;
     kdb_log_context     *log_ctx;
     kdb_hlog_t          *ulog = NULL;
     uint32_t            ulogentries;
@@ -750,15 +749,6 @@ ulog_get_entries(krb5_context context,          /* input - krb5 lib config */
         return (KRB5_LOG_CORRUPT);
     }
 
-    gettimeofday(&timestamp, NULL);
-
-    tdiff = timestamp.tv_sec - ulog->kdb_last_time.seconds;
-    if (tdiff <= ULOG_IDLE_TIME) {
-        ulog_handle->ret = UPDATE_BUSY;
-        (void) ulog_lock(context, KRB5_LOCKMODE_UNLOCK);
-        return (0);
-    }
-
     /*
      * We need to lock out other processes here, such as kadmin.local,
      * since we are looking at the last_sno and looking up updates.  So
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post