directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [09/48] directory-kerby git commit: o updated doAddIdentity() of memory backend to return the inserted identity instead of null o removed a spurious check on null in KdcRequest
Date Wed, 04 Nov 2015 08:25:35 GMT
o updated doAddIdentity() of memory backend to return the inserted identity instead of null
o removed a spurious check on null in KdcRequest


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/2167d16c
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/2167d16c
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/2167d16c

Branch: refs/heads/pkinit-support
Commit: 2167d16ce16aa5c643de4b2197f5c713c547c4b5
Parents: 6e15b50
Author: Kiran Ayyagari <kayyagari@apache.org>
Authored: Fri Sep 18 15:19:44 2015 +0800
Committer: Kiran Ayyagari <kayyagari@apache.org>
Committed: Fri Sep 18 15:19:44 2015 +0800

----------------------------------------------------------------------
 .../kerberos/kerb/identity/backend/MemoryIdentityBackend.java   | 5 ++++-
 .../apache/kerby/kerberos/kerb/server/request/KdcRequest.java   | 5 -----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2167d16c/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
index 5b4ee1e..88616ca 100644
--- a/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
+++ b/kerby-kerb/kerb-identity/src/main/java/org/apache/kerby/kerberos/kerb/identity/backend/MemoryIdentityBackend.java
@@ -66,7 +66,10 @@ public class MemoryIdentityBackend extends AbstractIdentityBackend {
      */
     @Override
     protected KrbIdentity doAddIdentity(KrbIdentity identity) {
-        return storage.put(identity.getPrincipalName(), identity);
+        storage.put(identity.getPrincipalName(), identity);
+        // return the same identity, cause Map.put() will return null 
+        // when a new element was added 
+        return identity;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2167d16c/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
index 47025aa..521ab51 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/KdcRequest.java
@@ -703,11 +703,6 @@ public abstract class KdcRequest {
     protected KrbIdentity getEntry(String principal) throws KrbException {
         KrbIdentity entry;
         entry = kdcContext.getIdentityService().getIdentity(principal);
-
-        if (entry == null) {
-            // Maybe it is the token preauth, now we ignore check client entry.
-            return null;
-        }
         return entry;
     }
 


Mime
View raw message