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:26 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/1.0.x-fixes ffc5ddbd4 -> 0f499e72f


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/0f499e72
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/0f499e72
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/0f499e72

Branch: refs/heads/1.0.x-fixes
Commit: 0f499e72f1cdb326c98cfe234e73f86dded74039
Parents: ffc5ddb
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 13:59:12 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/0f499e72/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/0f499e72/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