accumulo-commits mailing list archives

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

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


Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1451716-1451717

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1451716-1451717

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java?rev=1451718&r1=1451717&r2=1451718&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
Fri Mar  1 21:05:59 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/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java?rev=1451718&r1=1451717&r2=1451718&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
Fri Mar  1 21:05:59 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