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 to print right message for Kadmin tool.
Date Fri, 12 Jun 2015 06:04:09 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 6b4d1b41a -> 9d1c0a670


Fix to print right message for Kadmin tool.


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

Branch: refs/heads/master
Commit: 9d1c0a67087e474edc631d00d90bbed9d2ebd8c2
Parents: 6b4d1b4
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Fri Jun 12 14:09:14 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Fri Jun 12 14:09:14 2015 +0800

----------------------------------------------------------------------
 .../kerberos/tool/kadmin/executor/AddPrincipalExecutor.java      | 2 +-
 .../kerberos/tool/kadmin/executor/DeletePrincipalExecutor.java   | 2 +-
 .../kerby/kerberos/tool/kadmin/executor/GetPrincipalExcutor.java | 4 ++--
 .../kerby/kerberos/tool/kadmin/executor/KeytabAddExecutor.java   | 2 +-
 .../kerberos/tool/kadmin/executor/ModifyPrincipalExecutor.java   | 2 +-
 .../kerberos/tool/kadmin/executor/RenamePrincipalExecutor.java   | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/9d1c0a67/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/AddPrincipalExecutor.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/AddPrincipalExecutor.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/AddPrincipalExecutor.java
index e646eda..063dbf6 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/AddPrincipalExecutor.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/AddPrincipalExecutor.java
@@ -91,7 +91,7 @@ public class AddPrincipalExecutor implements KadminCommandExecutor{
             kadmin.addPrincipal(principal, password, kOptions);
             System.out.println("Principal \"" + principal + "\" created.");
         } catch (KrbException e) {
-            System.err.println("Fail to add principal \"" + principal + "\"." + e.getMessage());
+            System.err.println("Fail to add principal \"" + principal + "\"." + e.getCause());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/9d1c0a67/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/DeletePrincipalExecutor.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/DeletePrincipalExecutor.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/DeletePrincipalExecutor.java
index 5a53599..1bd6bf1 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/DeletePrincipalExecutor.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/DeletePrincipalExecutor.java
@@ -82,7 +82,7 @@ public class DeletePrincipalExecutor implements KadminCommandExecutor{
             kadmin.deletePrincipal(principal);
             System.out.println("Principal \"" + principal + "\" deleted.");
         } catch (KrbException e) {
-            System.err.println("Fail to delete principal \"" + principal + "\" ." + e.getMessage());
+            System.err.println("Fail to delete principal \"" + principal + "\" ." + e.getCause());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/9d1c0a67/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/GetPrincipalExcutor.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/GetPrincipalExcutor.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/GetPrincipalExcutor.java
index 0c97da2..08057b3 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/GetPrincipalExcutor.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/GetPrincipalExcutor.java
@@ -52,11 +52,11 @@ public class GetPrincipalExcutor implements KadminCommandExecutor {
         try {
             identity = kadmin.getPrincipal(princName);
         } catch (KrbException e) {
-            System.err.println("Fail to get principal:" + princName + ".");
+            System.err.println("Fail to get principal: " + princName + ". " + e.getCause());
         }
 
         if (identity == null) {
-            System.err.println(princName + "doesn't exist\n");
+            System.err.println(princName + " doesn't exist\n");
             System.err.println(USAGE);
             return;
         }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/9d1c0a67/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/KeytabAddExecutor.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/KeytabAddExecutor.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/KeytabAddExecutor.java
index e4a2770..4b38f0f 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/KeytabAddExecutor.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/KeytabAddExecutor.java
@@ -73,7 +73,7 @@ public class KeytabAddExecutor implements KadminCommandExecutor{
             System.out.println(result.toString());
         } catch (KrbException e) {
             System.err.println("Principal \"" + principal + "\" fail to add entry to keytab."
+
-                e.getMessage());
+                e.getCause());
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/9d1c0a67/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/ModifyPrincipalExecutor.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/ModifyPrincipalExecutor.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/ModifyPrincipalExecutor.java
index bd2ee8c..3a581f6 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/ModifyPrincipalExecutor.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/ModifyPrincipalExecutor.java
@@ -62,7 +62,7 @@ public class ModifyPrincipalExecutor implements KadminCommandExecutor {
             kadmin.modifyPrincipal(principal, kOptions);
             System.out.println("Principal \"" + principal + "\" modified.");
         } catch (KrbException e) {
-            System.err.println("Principal \"" + principal + "\" fail to modify." + e.getMessage());
+            System.err.println("Principal \"" + principal + "\" fail to modify. " + e.getCause());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/9d1c0a67/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/RenamePrincipalExecutor.java
----------------------------------------------------------------------
diff --git a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/RenamePrincipalExecutor.java
b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/RenamePrincipalExecutor.java
index bc0abe0..300a70c 100644
--- a/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/RenamePrincipalExecutor.java
+++ b/kerby-tool/kdc-tool/src/main/java/org/apache/kerby/kerberos/tool/kadmin/executor/RenamePrincipalExecutor.java
@@ -77,7 +77,7 @@ public class RenamePrincipalExecutor implements KadminCommandExecutor{
             System.out.println("Principal \"" + oldPrincipalName + "\" renamed to \"" +
                 newPrincipalName + "\".");
         } catch (KrbException e) {
-            System.err.println("Principal rename failed! Exception happened." + e.getMessage());
+            System.err.println("Principal rename failed! Exception happened. " + e.getCause());
         }
     }
 }


Mime
View raw message