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

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

krb5 commit: Fix leak in kadm5_flush with LDAP KDB

daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Apr 4 14:47:11 2014

Date: Fri, 4 Apr 2014 14:47:06 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201404041847.s34Il6QU026600@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/372e4cb6f5d4a603e6e3157c7b5d354953836136
commit 372e4cb6f5d4a603e6e3157c7b5d354953836136
Author: Tomas Kuthan <tkuthan@gmail.com>
Date:   Wed Apr 2 17:48:04 2014 +0200

    Fix leak in kadm5_flush with LDAP KDB
    
    Due to an inverted test in adb_policy_init, kadm5_flush calls
    krb5_db_open twice.  With the DB2 KDB module, the second open is a
    no-op, but with the LDAP module, a new DB handle is allocated and the
    old one is leaked.
    
    [ghudson@mit.edu: rewrote commit message]
    
    ticket: 7897 (new)
    target_version: 1.12.2
    tags: pullup

 src/lib/kadm5/srv/server_misc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/kadm5/srv/server_misc.c b/src/lib/kadm5/srv/server_misc.c
index 30a0b5a..18d047b 100644
--- a/src/lib/kadm5/srv/server_misc.c
+++ b/src/lib/kadm5/srv/server_misc.c
@@ -38,7 +38,7 @@ kadm5_ret_t
 adb_policy_init(kadm5_server_handle_t handle)
 {
     /* now policy is initialized as part of database. No seperate call needed */
-    if( krb5_db_inited( handle->context ) )
+    if (krb5_db_inited(handle->context) == 0)
         return KADM5_OK;
 
     return krb5_db_open( handle->context, NULL,
_______________________________________________
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