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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.9.GA, 7.1.6.GA, 7.2.9.GA, 7.3.x
    • Fix Version/s: 7.3.9.CR1, 7.3.9.GA
    • Component/s: Scripts
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      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

              Assignee:
              rchakrab Ranabir Chakraborty
              Reporter:
              rhn-support-mkawakam Manabu Kawakami
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: