Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-21999

[GSS](7.4.z) "servicepass" is not correctly passed to the parameter to run prunsrv.exe in service.bat

    XMLWordPrintable

Details

    • False
    • False
    • +
    • Undefined
    • Hide
      1. running "service.bat" with the parameters, install /name aaa /serviceuser "test" /servicepass "password^^!1^^!".
      2. then you can check the following output, incorrect password
        C:\path\jbcs-jsvc\sbin\prunsrv.exe install aaa --ServiceUser="test" --ServicePassword="password" --DisplayName=aaa --Description="JBoss Enterprise Application Platform 7" --LogLevel=INFO ...

      After updating [TO BE] in the description then running "service.bat", password would be passed correctly.

      1. running updated "service.bat" with the parameters, install /name aaa /serviceuser "test" /servicepass "password^^!1^^!".
      2. then you can check the correct password
        C:\path\jbcs-jsvc-1.1\sbin\prunsrv.exe install aaa --ServiceUser="test" --ServicePassword="password!1!" --DisplayName=aaa --Description="JBoss Enterprise Application Platform 7" --LogLevel=INFO...
      Show
      running "service.bat" with the parameters, install /name aaa /serviceuser "test" /servicepass "password^^!1^^!". then you can check the following output, incorrect password C:\path\jbcs-jsvc\sbin\prunsrv.exe install aaa --ServiceUser="test" --ServicePassword=" password " --DisplayName=aaa --Description="JBoss Enterprise Application Platform 7" --LogLevel=INFO ... After updating [TO BE] in the description then running "service.bat", password would be passed correctly. running updated "service.bat" with the parameters, install /name aaa /serviceuser "test" /servicepass "password^^!1^^!". then you can check the correct password C:\path\jbcs-jsvc-1.1\sbin\prunsrv.exe install aaa --ServiceUser="test" --ServicePassword=" password!1! " --DisplayName=aaa --Description="JBoss Enterprise Application Platform 7" --LogLevel=INFO...

    Description

      The "service.bat" can handle "servicepass" incorrectly and pass a wrong value to run prunsrv.exe. For example, when the specified password contains "!".
      If specifying the parameter [/servicepass "password^^!1^^!"] to set the password "password!1!", the script shows incorrect password like [--ServicePassword="password"].
      Updating the way to refer the parameter surrounded by "!" would be effective("%SERVICE_PASS%" would be "!SERVICE_PASS!").

      The variable "RUNAS" in the "service.bat" script can be fixed.
      [AS IS]

      468 set RUNAS=--ServiceUser="%SERVICE_USER%" --ServicePassword="%SERVICE_PASS%"
      :
      507 echo RUNAS=%RUNAS%
      :
      529 echo %PRUNSRV% install %SHORTNAME% %RUNAS% --DisplayName=%DISPLAYNAME% ...
      :
      531 %PRUNSRV% install %SHORTNAME% %RUNAS% --DisplayName=%DISPLAYNAME% ...

      [TO BE]

      468 set RUNAS=--ServiceUser="%SERVICE_USER%" --ServicePassword="!SERVICE_PASS!"
      :
      507 echo RUNAS=!RUNAS!
      :
      529 echo %PRUNSRV% install %SHORTNAME% !RUNAS! --DisplayName=%DISPLAYNAME% ...
      :
      531 %PRUNSRV% install %SHORTNAME% !RUNAS! --DisplayName=%DISPLAYNAME% ...
      :
      532 @rem %PRUNSRV% install "%SHORTNAME%" "!RUNAS!" --DisplayName="%DISPLAYNAME%" ...

      Attachments

        Issue Links

          Activity

            People

              rchakrab Ranabir Chakraborty
              rchakrab Ranabir Chakraborty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: