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-602 Remote KAdmin KrbUtil create admin user hard codes admin principal name. Contributed by Shawn Eion Smith.
Date Tue, 02 Aug 2016 07:38:53 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 4083f7e7b -> 699264f0a


DIRKRB-602 Remote KAdmin KrbUtil create admin user hard codes admin principal name. Contributed
by Shawn Eion Smith.


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

Branch: refs/heads/trunk
Commit: 699264f0a845ee9db66e822236e246cad385b405
Parents: 4083f7e
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Tue Aug 2 15:44:00 2016 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Tue Aug 2 15:44:00 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kerb/common/KrbUtil.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/699264f0/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbUtil.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbUtil.java
b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbUtil.java
index 40eda6b..c6e3ae7 100644
--- a/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbUtil.java
+++ b/kerby-kerb/kerb-common/src/main/java/org/apache/kerby/kerberos/kerb/common/KrbUtil.java
@@ -52,6 +52,17 @@ public class KrbUtil {
         return new PrincipalName(nameString, NameType.NT_PRINCIPAL);
     }
 
+    /**
+     * Construct the kadmin principal
+     * @param principal The principal name
+     * @param realm The realm
+     * @return principal
+     */
+    public static PrincipalName makeKadminPrincipal(String principal, String realm) {
+        String nameString = principal + "@" + realm;
+        return new PrincipalName(nameString, NameType.NT_PRINCIPAL);
+    }
+
     public static boolean pricipalCompareIgnoreRealm(PrincipalName princ1, PrincipalName
princ2)
             throws KrbException {
 


Mime
View raw message