hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r800652 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/src/zookeeper.c src/c/tests/TestClient.cc
Date Tue, 04 Aug 2009 01:58:03 GMT
Author: phunt
Date: Tue Aug  4 01:58:02 2009
New Revision: 800652

URL: http://svn.apache.org/viewvc?rev=800652&view=rev
Log:
ZOOKEEPER-466. crash on zookeeper_close() when using auth with empty cert

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/src/zookeeper.c
    hadoop/zookeeper/trunk/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=800652&r1=800651&r2=800652&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Tue Aug  4 01:58:02 2009
@@ -27,11 +27,13 @@
   ZOOKEEPER-457. Make ZookeeperMain public, support for HBase (and other)
   embedded clients (ryan rawson via phunt)
 
-  ZOOKEEPER-481. Add lastMessageSent to QuorumCnxManager. (flavio via
-mahadev)
+  ZOOKEEPER-481. Add lastMessageSent to QuorumCnxManager. (flavio via mahadev)
 
-  ZOOKEEPER-479.  QuorumHierarchical does not count groups correctly (flavio
-via mahadev)
+  ZOOKEEPER-479.  QuorumHierarchical does not count groups correctly
+  (flavio via mahadev)
+
+  ZOOKEEPER-466. crash on zookeeper_close() when using auth with empty cert
+  (Chris Darroch via phunt)
 
 IMPROVEMENTS:
   ZOOKEEPER-473. cleanup junit tests to eliminate false positives due to

Modified: hadoop/zookeeper/trunk/src/c/src/zookeeper.c
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/src/zookeeper.c?rev=800652&r1=800651&r2=800652&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/src/zookeeper.c (original)
+++ hadoop/zookeeper/trunk/src/c/src/zookeeper.c Tue Aug  4 01:58:02 2009
@@ -2674,8 +2674,7 @@
     zoo_lock_auth(zh);
     authinfo = (auth_info*) malloc(sizeof(auth_info));
     authinfo->scheme=strdup(scheme);
-    if(auth.buff)
-        authinfo->auth=auth;
+    authinfo->auth=auth;
     authinfo->completion=completion;
     authinfo->data=data;
     authinfo->next = NULL;

Modified: hadoop/zookeeper/trunk/src/c/tests/TestClient.cc
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/TestClient.cc?rev=800652&r1=800651&r2=800652&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/trunk/src/c/tests/TestClient.cc Tue Aug  4 01:58:02 2009
@@ -423,7 +423,7 @@
     void testAuth() {
         int rc;
         count = 0;
-        watchctx_t ctx1, ctx2, ctx3;
+        watchctx_t ctx1, ctx2, ctx3, ctx4;
         zhandle_t *zk = createClient(&ctx1);
         struct ACL_vector nodeAcl;
         struct ACL acl_val;
@@ -444,6 +444,21 @@
         rc = zoo_create(zk, "/tauth1", "", 0, &ZOO_CREATOR_ALL_ACL, 0, 0, 0);
         CPPUNIT_ASSERT_EQUAL((int)ZOK, rc);
 
+        {
+            //create a new client
+            zk = createClient(&ctx4);
+            rc = zoo_add_auth(zk, "digest", "", 0, voidCompletion, (void*)ZOK);
+            CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+            waitForVoidCompletion(3);
+            CPPUNIT_ASSERT(count == 0);
+
+            rc = zoo_add_auth(zk, "digest", "", 0, voidCompletion, (void*)ZOK);
+            CPPUNIT_ASSERT_EQUAL((int) ZOK, rc);
+            waitForVoidCompletion(3);
+            CPPUNIT_ASSERT(count == 0);
+        }
+
+        //create a new client
         zk = createClient(&ctx2);
 
         rc = zoo_add_auth(zk, "digest", "pat:passwd2", 11, voidCompletion,



Mime
View raw message