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 bug of creating tgt principal.
Date Mon, 18 May 2015 02:53:39 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master b9a3d08f1 -> f0acc95c8


Fix the bug of creating tgt principal.


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

Branch: refs/heads/master
Commit: f0acc95c8c1c03634e0a97664d9393c9ab40e13e
Parents: b9a3d08
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Mon May 18 10:58:21 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Mon May 18 10:58:21 2015 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kerby/kerberos/kdc/KerbyKdcServer.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/f0acc95c/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 aaee9c4..8ece746 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
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kdc;
 import org.apache.kerby.kerberos.kdc.impl.NettyKdcServerImpl;
 import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.common.EncryptionUtil;
+import org.apache.kerby.kerberos.kerb.common.KrbUtil;
 import org.apache.kerby.kerberos.kerb.identity.KrbIdentity;
 import org.apache.kerby.kerberos.kerb.server.KdcServer;
 import org.apache.kerby.kerberos.kerb.spec.base.EncryptionKey;
@@ -50,7 +51,7 @@ public class KerbyKdcServer extends KdcServer {
      * If no, add it to identity backend.
      */
     private void createTgtPrincipal() {
-        String tgtPrincipal = fixPrincipal("krbtgt");
+        String tgtPrincipal = KrbUtil.makeTgsPrincipal(getSetting().getKdcRealm()).getName();
         KrbIdentity tgtIdentity = getIdentityService().getIdentity(tgtPrincipal);
         if (tgtIdentity == null) {
             createPrincipals(tgtPrincipal);


Mime
View raw message