directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [10/48] directory-kerby git commit: DIRKRB-407 Fix tool's usage in windows
Date Wed, 04 Nov 2015 08:25:36 GMT
DIRKRB-407 Fix tool's usage in windows


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

Branch: refs/heads/pkinit-support
Commit: 675e792e1b65d753a8f5ec4ca92dc78f7d6d0290
Parents: 2167d16
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Wed Sep 23 09:39:19 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Wed Sep 23 09:39:19 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kdc/KerbyKdcServer.java   |  9 ++++++---
 .../org/apache/kerby/kerberos/tool/kinit/KinitTool.java |  4 ++--
 .../org/apache/kerby/kerberos/tool/klist/KlistTool.java |  4 ++--
 .../apache/kerby/kerberos/tool/kadmin/KadminTool.java   |  9 ++++++---
 .../apache/kerby/kerberos/tool/kdcinit/KdcInitTool.java | 12 ++++++++----
 5 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/675e792e/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
----------------------------------------------------------------------
diff --git a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
index 70c87d9..ac789b5 100644
--- a/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
+++ b/kerby-kdc/src/main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java
@@ -49,11 +49,14 @@ public class KerbyKdcServer extends KdcServer {
         kadmin.checkBuiltinPrincipals();
     }
 
-    private static final String USAGE = OSUtil.isWindows()
-            ? "Usage: bin/start-kdc.cmd" : "Usage: sh bin/start-kdc.sh"
+    private static final String USAGE = (OSUtil.isWindows()
+            ? "Usage: bin\\start-kdc.cmd" : "Usage: sh bin/start-kdc.sh")
             + " [conf-dir] [working-dir] \n"
             + "\tExample:\n"
-            + "\t\tsh bin/start-kdc.sh conf runtime\n";
+            + "\t\t"
+            + (OSUtil.isWindows()
+            ? "bin\\start-kdc.cmd" : "sh bin/start-kdc.sh")
+            + " conf runtime\n";
 
     public static void main(String[] args) throws KrbException {
         if (args.length != 3) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/675e792e/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 a2c5a7a..0a4ed6d 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
@@ -39,8 +39,8 @@ import java.util.Scanner;
  */
 public class KinitTool {
 
-    private static final String USAGE = OSUtil.isWindows()
-            ? "Usage: bin/kinit.cmd" : "Usage: sh bin/kinit.sh"
+    private static final String USAGE = (OSUtil.isWindows()
+            ? "Usage: bin\\kinit.cmd" : "Usage: sh bin/kinit.sh")
             + " [-conf conf_dir] [-V] [-l lifetime] [-s start_time]\n"
             + "\t\t[-r renewable_life] [-f | -F] [-p | -P] -n [-a | -A] [-C] [-E]\n"
             + "\t\t[-v] [-R] [-k [-i|-t keytab_file]] [-c cachename]\n"

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/675e792e/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/klist/KlistTool.java
----------------------------------------------------------------------
diff --git a/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/klist/KlistTool.java
b/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/klist/KlistTool.java
index 6df39c9..9ddb291 100644
--- a/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/klist/KlistTool.java
+++ b/kerby-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/klist/KlistTool.java
@@ -43,8 +43,8 @@ import java.util.List;
  */
 public class KlistTool {
 
-    private static  final String USAGE = OSUtil.isWindows()
-            ? "Usage: bin/klist.cmd" : "Usage: sh bin/klist.sh"
+    private static  final String USAGE = (OSUtil.isWindows()
+            ? "Usage: bin\\klist.cmd" : "Usage: sh bin/klist.sh")
             + " [-e] [-V] [[-c] [-l] [-A] [-d] [-f] [-s] "
             + "[-a [-n]]] [-k [-t] [-K]] [name]\n"
             + "\t-c specifies credentials cache\n"

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/675e792e/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/KadminTool.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/KadminTool.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/KadminTool.java
index 6b071ee..34b75b4 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/KadminTool.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/KadminTool.java
@@ -87,11 +87,14 @@ public class KadminTool {
             + "list_requests, lr, ?     List available requests.\n"
             + "quit, exit, q            Exit program.";
 
-    private static  final String USAGE = OSUtil.isWindows()
-            ? "Usage: bin/kadmin.cmd" : "Usage: sh bin/kadmin.sh"
+    private static  final String USAGE = (OSUtil.isWindows()
+            ? "Usage: bin\\kadmin.cmd" : "Usage: sh bin/kadmin.sh")
             + " [conf-dir] [-c cache_name]|[-k keytab]\n"
             + "\tExample:\n"
-            + "\t\tsh bin/kadmin.sh conf -k /home/admin.keytab\n";
+            + "\t\t"
+            + (OSUtil.isWindows()
+            ? "bin\\kadmin.cmd" : "sh bin/kadmin.sh")
+            + " conf -k admin.keytab\n";
 
     private static void printUsage(String error) {
         System.err.println(error + "\n");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/675e792e/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kdcinit/KdcInitTool.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kdcinit/KdcInitTool.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kdcinit/KdcInitTool.java
index e34c497..13a83eb 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kdcinit/KdcInitTool.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kdcinit/KdcInitTool.java
@@ -32,12 +32,16 @@ public class KdcInitTool {
     private Kadmin kadmin;
     private static File keytabFile;
 
-    private static  final String USAGE = OSUtil.isWindows()
-            ? "Usage: bin/kdcinit.cmd" : "Usage: sh bin/kdcinit.sh"
+    private static  final String USAGE = (OSUtil.isWindows()
+            ? "Usage: bin\\kdcinit.cmd" : "Usage: sh bin/kdcinit.sh")
             + " [conf-dir] [output-keytab]\n"
             + "\tThis tool initializes KDC backend and should only be performed the first
time,\n"
-            + "\tand the output keytab should be carefully kept to administrate/kadmin KDC
later.\nExample:\n"
-            + "\t\tbin/kdcinit.sh conf /home/admin.keytab\n";
+            + "\tand the output keytab should be carefully kept to administrate/kadmin KDC
later.\n"
+            + "\tExample:\n"
+            + "\t\t"
+            + (OSUtil.isWindows()
+            ? "bin\\kdcinit.cmd" : "sh bin/kdcinit.sh")
+            + " conf admin.keytab\n";
 
     void initKdc(File confDir) throws KrbException {
         kadmin = new Kadmin(confDir);


Mime
View raw message