directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject directory-kerby git commit: DIRKRB-189 Add the default server configuration directory and work directory for kdc-server. Contributed by Jiajia
Date Mon, 23 Mar 2015 08:19:22 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master b1b28bbc3 -> e22038f7f


DIRKRB-189 Add the default server configuration directory and work directory for kdc-server.
Contributed by Jiajia


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

Branch: refs/heads/master
Commit: e22038f7f18cb84f042dc12bdcad24111e7ed7c0
Parents: b1b28bb
Author: hazel <linchen7@foxmail.com>
Authored: Mon Mar 23 16:19:13 2015 +0800
Committer: hazel <linchen7@foxmail.com>
Committed: Mon Mar 23 16:19:13 2015 +0800

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kdc/KerbyKdcServer.java    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/e22038f7/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 0c30fe8..3b903ff 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
@@ -38,7 +38,7 @@ public class KerbyKdcServer extends KdcServer {
 
     private static final String USAGE = "Usage: " +
             KerbyKdcServer.class.getSimpleName() +
-            " -start conf-dir working-dir|-stop";
+            " -start conf-dir working-dir|-start|-stop";
 
     public static void main(String[] args) {
         if (args.length == 0) {
@@ -47,13 +47,18 @@ public class KerbyKdcServer extends KdcServer {
         }
 
         if (args[0].equals("-start")) {
-            if (args.length != 3) {
+            String confDir;
+            String workDir;
+            if(args.length == 1) {
+                confDir = "/etc/kerby/";
+                workDir = "/tmp/";
+            } else if (args.length == 3) {
+                confDir = args[1];
+                workDir = args[2];
+            } else {
                 System.err.println(USAGE);
                 return;
             }
-            String confDir = args[1];
-            String workDir = args[2];
-
             server = new KerbyKdcServer();
             server.setWorkDir(new File(workDir));
             server.setConfDir(new File(confDir));


Mime
View raw message