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: Fix the kinit tool issue.
Date Thu, 10 Sep 2015 03:19:46 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/pkinit-support b8c8819ae -> 6a41e79ef


Fix the kinit tool issue.


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

Branch: refs/heads/pkinit-support
Commit: 6a41e79ef63aaa59df20bcdc0aa5e9f9c76934ad
Parents: b8c8819
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Thu Sep 10 11:25:33 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Thu Sep 10 11:25:33 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/tool/kinit/KinitTool.java   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/6a41e79e/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/KinitTool.java
----------------------------------------------------------------------
diff --git a/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/KinitTool.java
b/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/KinitTool.java
index bd634d8..7eb49d7 100644
--- a/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/KinitTool.java
+++ b/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/KinitTool.java
@@ -213,10 +213,12 @@ public class KinitTool {
             ktOptions.add(kto);
         }
 
-        if (principal == null && ktOptions.contains(KinitOption.ANONYMOUS)) {
-            principal = getAnonymousPrincipal();
-        } else {
-            printUsage("No principal is specified");
+        if (principal == null) {
+            if (ktOptions.contains(KinitOption.ANONYMOUS)) {
+                principal = getAnonymousPrincipal();
+            } else {
+                printUsage("No principal is specified");
+            }
         }
 
         requestTicket(principal, ktOptions);


Mime
View raw message