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: Implement kinit -F, -f
Date Tue, 08 Aug 2017 05:59:59 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 3c00bc97e -> 308e7b9b6


Implement kinit -F, -f


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

Branch: refs/heads/trunk
Commit: 308e7b9b6b1a5ad8aaae622640ad590cbc8bc50c
Parents: 3c00bc9
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Tue Aug 8 13:59:12 2017 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Tue Aug 8 14:00:02 2017 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kerb/client/KrbKdcOption.java    | 2 ++
 .../apache/kerby/kerberos/kerb/client/request/KdcRequest.java  | 6 +++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/308e7b9b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbKdcOption.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbKdcOption.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbKdcOption.java
index 4c29394..606a58e 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbKdcOption.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbKdcOption.java
@@ -31,6 +31,8 @@ public enum KrbKdcOption implements KOption {
     /* KDC flags */
     FORWARDABLE(new KOptionInfo("-f", "forwardable",
         KrbOptionGroup.KDC_FLAGS)),
+    NOT_FORWARDABLE(new KOptionInfo("-F", "not forwardable",
+        KrbOptionGroup.KDC_FLAGS)),
     PROXIABLE(new KOptionInfo("-p", "proxiable",
         KrbOptionGroup.KDC_FLAGS)),
     REQUEST_ANONYMOUS(new KOptionInfo("-n",

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/308e7b9b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
index 4b60d7b..a605b1e 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
@@ -429,8 +429,12 @@ public abstract class KdcRequest {
         for (KOption kOpt: requestOptions.getOptions()) {
             if (kOpt.getOptionInfo().getGroup() == KrbOptionGroup.KDC_FLAGS) {
                 KrbKdcOption krbKdcOption = (KrbKdcOption) kOpt;
-                KdcOption kdcOption = KdcOption.valueOf(krbKdcOption.name());
                 boolean flagValue = requestOptions.getBooleanOption(kOpt, true);
+                if (kOpt.equals(KrbKdcOption.NOT_FORWARDABLE)) {
+                    krbKdcOption = KrbKdcOption.FORWARDABLE;
+                    flagValue = !flagValue;
+                }
+                KdcOption kdcOption = KdcOption.valueOf(krbKdcOption.name());
                 kdcOptions.setFlag(kdcOption, flagValue);
             }
         }


Mime
View raw message