Просмотр исходного кода

Revert "AMBARI-11169. Kerberos: Principals fail to be created if whitespace exists in generated passwords (rlevas)"

This reverts commit e07d8c9316bcc10fe13b1f7e7ca6628edb755cb3.
Mahadev Konar 10 лет назад
Родитель
Сommit
423df95917

+ 2 - 2
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/MITKerberosOperationHandler.java

@@ -171,7 +171,7 @@ public class MITKerberosOperationHandler extends KerberosOperationHandler {
       throw new KerberosOperationException("Failed to create new principal - no password specified");
     } else {
       // Create the kdamin query:  add_principal <-randkey|-pw <password>> <principal>
-      ShellCommandUtil.Result result = invokeKAdmin(String.format("add_principal -pw \"%s\" %s", password, principal));
+      ShellCommandUtil.Result result = invokeKAdmin(String.format("add_principal -pw %s %s", password, principal));
 
       // If there is data from STDOUT, see if the following string exists:
       //    Principal "<principal>" created
@@ -211,7 +211,7 @@ public class MITKerberosOperationHandler extends KerberosOperationHandler {
       throw new KerberosOperationException("Failed to set password - no password specified");
     } else {
       // Create the kdamin query:  change_password <-randkey|-pw <password>> <principal>
-      invokeKAdmin(String.format("change_password -pw \"%s\" %s", password, principal));
+      invokeKAdmin(String.format("change_password -pw %s %s", password, principal));
 
       return getKeyNumber(principal);
     }