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: DIRKRB-707 start has server with specific conf_dir failed bug. Contributed by weizhenyuan.
Date Fri, 03 Aug 2018 07:42:54 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/kerby-2.0.0 49b816935 -> 35efd2e76


DIRKRB-707 start has server with specific conf_dir failed bug. Contributed by weizhenyuan.


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

Branch: refs/heads/kerby-2.0.0
Commit: 35efd2e76fe9d10863387fc22008b4cf70a193bb
Parents: 49b8169
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Fri Aug 3 15:38:39 2018 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Fri Aug 3 15:38:39 2018 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kerby/has/common/HasConfig.java  | 10 ++++++++++
 .../main/java/org/apache/kerby/has/server/HasServer.java  |  1 +
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/35efd2e7/has-project/has-common/src/main/java/org/apache/kerby/has/common/HasConfig.java
----------------------------------------------------------------------
diff --git a/has-project/has-common/src/main/java/org/apache/kerby/has/common/HasConfig.java
b/has-project/has-common/src/main/java/org/apache/kerby/has/common/HasConfig.java
index e0f3f1e..bbc8e53 100644
--- a/has-project/has-common/src/main/java/org/apache/kerby/has/common/HasConfig.java
+++ b/has-project/has-common/src/main/java/org/apache/kerby/has/common/HasConfig.java
@@ -62,6 +62,16 @@ public class HasConfig extends Krb5Conf {
     }
 
     public String getSslServerConf() {
+        String value = getString(HasConfigKey.SSL_SERVER_CONF, false, "HAS");
+        if (value != null) {
+            return value;
+        }
+        if (getConfDir() != null) {
+            File sslSrvConf = new File(getConfDir(), "ssl-server.conf");
+            if (sslSrvConf.exists() && sslSrvConf.isFile()) {
+                return sslSrvConf.getAbsolutePath();
+            }
+        }
         return getString(HasConfigKey.SSL_SERVER_CONF, true, "HAS");
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/35efd2e7/has-project/has-server/src/main/java/org/apache/kerby/has/server/HasServer.java
----------------------------------------------------------------------
diff --git a/has-project/has-server/src/main/java/org/apache/kerby/has/server/HasServer.java
b/has-project/has-server/src/main/java/org/apache/kerby/has/server/HasServer.java
index 5991e55..f92f140 100644
--- a/has-project/has-server/src/main/java/org/apache/kerby/has/server/HasServer.java
+++ b/has-project/has-server/src/main/java/org/apache/kerby/has/server/HasServer.java
@@ -583,6 +583,7 @@ public class HasServer {
             // Parse has-server.conf to get http_host and http_port
             File confFile = new File(confDir, "has-server.conf");
             hasConfig = HasUtil.getHasConfig(confFile);
+            hasConfig.setConfDir(getConfDir().getAbsoluteFile());
             try {
                 String httpHost;
                 String httpPort;


Mime
View raw message