Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-884

Windows.pm fails to set computer hostname

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.2
    • 2.5
    • vcld (backend)
    • None

    Description

      The Windows.pm::set_computer_hostname subroutine does not work properly because the command it assembles contains single quotes. The following warning is generated in vcld.log:

      ---- WARNING ----
      2015-07-14 13:28:57|Windows.pm:set_computer_hostname|12392|failed to set computer name of <vcl db name> to <resolved hostname>, exit status: 218, command:
      echo | cmd.exe /c "C:/Windows/Sysnative/Wbem/wmic.exe COMPUTERSYSTEM WHERE Name='%COMPUTERNAME%' Rename '<resolved hostname>'"
      output:
      Invalid Verb Switch.
      ( 0) Windows.pm, set_computer_hostname (line: 12392)
      (-1) test.pm, process (line: 89)
      (-2) vcld, make_new_child (line: 600)
      (-3) vcld, main (line: 357)
      

      The single quotes around %COMPUTERNAME% and the intended hostname need to be changed to double quotes and properly escaped.

      Attachments

        Activity

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: