accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1451717 - in /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler: ZKAuthenticator.java ZKPermHandler.java
Date Fri, 01 Mar 2013 21:05:18 GMT
Author: vines
Date: Fri Mar  1 21:05:17 2013
New Revision: 1451717

URL: http://svn.apache.org/r1451717
Log:
ACCUMULO-1138 - syncing before uncached calls and ZKAuthenticator was kicking back the wrong
class in getTokenLoginClass


Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java?rev=1451717&r1=1451716&r2=1451717&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
Fri Mar  1 21:05:17 2013
@@ -200,7 +200,7 @@ public final class ZKAuthenticator exten
   
   @Override
   public String getTokenLoginClass() {
-    return this.getClass().getCanonicalName();
+    return super.getClass().getCanonicalName();
   }
 
   @Override

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java?rev=1451717&r1=1451716&r2=1451717&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
Fri Mar  1 21:05:17 2013
@@ -69,7 +69,9 @@ public class ZKPermHandler implements Pe
   public boolean hasTablePermission(String user, String table, TablePermission permission)
{
     byte[] serializedPerms;
     try {
-      serializedPerms = ZooReaderWriter.getRetryingInstance().getData(ZKUserPath + "/" +
user + ZKUserTablePerms + "/" + table, null);
+      String path = ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table;
+      ZooReaderWriter.getRetryingInstance().sync(path);
+      serializedPerms = ZooReaderWriter.getRetryingInstance().getData(path, null);
     } catch (KeeperException e) {
       if (e.code() == Code.NONODE) {
         return false;
@@ -306,7 +308,9 @@ public class ZKPermHandler implements Pe
   public boolean hasSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException
{
     byte[] perms;
     try {
-      perms = ZooReaderWriter.getRetryingInstance().getData(ZKUserPath + "/" + user + ZKUserSysPerms,
null);
+      String path = ZKUserPath + "/" + user + ZKUserSysPerms;
+      ZooReaderWriter.getRetryingInstance().sync(path);
+      perms = ZooReaderWriter.getRetryingInstance().getData(path, null);
     } catch (KeeperException e) {
       if (e.code() == Code.NONODE) {
         return false;



Mime
View raw message