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

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

krb5 commit [krb5-1.9]: Fix KDC lock persistence on error conditions

daemon@ATHENA.MIT.EDU (Tom Yu)
Fri Oct 11 20:28:41 2013

Date: Fri, 11 Oct 2013 20:28:36 -0400
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201310120028.r9C0SaN2003640@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/047afa2244c33ef54805ebf0436db42c12e83332
commit 047afa2244c33ef54805ebf0436db42c12e83332
Author: Tom Yu <tlyu@mit.edu>
Date:   Thu Oct 10 13:59:27 2013 -0400

    Fix KDC lock persistence on error conditions
    
    If k5db2_dbopen() returns an error, krb5_db2_lock() can return an
    error without unlocking the lock file.  This lock will persist until
    krb5_db2_lock() executes successfully, preventing kadmind from making
    changes to the KDB.  One possible trigger is running out of file
    descriptors.
    
    ticket: 7717 (new)
    version_fixed: 1.9.6

 src/plugins/kdb/db2/kdb_db2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/plugins/kdb/db2/kdb_db2.c b/src/plugins/kdb/db2/kdb_db2.c
index 210afff..73ee803 100644
--- a/src/plugins/kdb/db2/kdb_db2.c
+++ b/src/plugins/kdb/db2/kdb_db2.c
@@ -611,7 +611,7 @@ policy_lock:
 lock_error:;
     db_ctx->db_lock_mode = 0;
     db_ctx->db_locks_held = 0;
-    krb5_db2_unlock(context);
+    krb5_lock_file(context, db_ctx->db_lf_file, KRB5_LOCKMODE_UNLOCK);
     return retval;
 }
 
_______________________________________________
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