directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject directory-kerby git commit: DIRKRB-656 Compatibility problem with Kerberos when getting service ticket. Contributed by Frank Zeng.
Date Tue, 12 Sep 2017 03:30:02 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 276905dde -> 2b0e56920


DIRKRB-656 Compatibility problem with Kerberos when getting service ticket. Contributed by
Frank Zeng.


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

Branch: refs/heads/trunk
Commit: 2b0e56920d935c00b4a7bd6a90e93dafd11254cc
Parents: 276905d
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Tue Sep 12 11:29:54 2017 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Tue Sep 12 11:29:54 2017 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kerb/client/KrbClientBase.java   | 6 ++++--
 .../java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2b0e5692/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClientBase.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClientBase.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClientBase.java
index cc05a25..602024a 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClientBase.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClientBase.java
@@ -222,12 +222,14 @@ public class KrbClientBase {
     public SgtTicket requestSgt(File ccFile, String servicePrincipal) throws KrbException
{
         Credential credential = getCredentialFromFile(ccFile);
         TgtTicket tgt = getTgtTicketFromCredential(credential);
+        KOptions requestOptions = new KOptions();
+
+        // Renew ticket if argument named servicePrincipal is null
         if (servicePrincipal == null) {
+            requestOptions.add(KrbKdcOption.RENEW);
             servicePrincipal = credential.getServicePrincipal().getName();
         }
 
-        KOptions requestOptions = new KOptions();
-        requestOptions.add(KrbKdcOption.RENEW);
         requestOptions.add(KrbOption.USE_TGT, tgt);
         requestOptions.add(KrbOption.SERVER_PRINCIPAL, servicePrincipal);
         SgtTicket sgtTicket = innerClient.requestSgt(requestOptions);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/2b0e5692/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
index 32fad41..81dc163 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbHandler.java
@@ -93,7 +93,7 @@ public abstract class KrbHandler {
     }
 
     /**
-     * Process the response messabe from kdc.
+     * Process the response message from kdc.
      *
      * @param kdcRequest The kdc request
      * @param responseMessage The message from kdc


Mime
View raw message