← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1201969] Re: cloud-init parses Azure setting "DisableSshPassword" incorrectly

 

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

** Changed in: cloud-init
     Assignee: (unassigned) => Ben Howard (utlemming)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1201969

Title:
  cloud-init parses Azure setting "DisableSshPassword" incorrectly

Status in Init scripts for use on cloud images:
  Fix Released
Status in “cloud-init” package in Ubuntu:
  Fix Released

Bug description:
  Cloud-init is parsing ovf-env.xml incorrecltly.  Currently cloud-init
  takes the value of DisableSshPasswordAuthentication and uses it to set
  ssh_pwauth. However, DisableSshPasswordAuthentication describes the
  state of whether or not SSH password authentication should be
  disabled, while ssh_psauth is asking if it should be enabled or not.

  To illustration: Setting DisableSshPasswordAuthentication to true
  means that password authentication should be disabled. While setting
  cloud-init ssh_pwauth to true means that password authentication
  should be enabled.

  The fix for this is to set "ssh_pwauth" to the inverse of
  DisableSshPasswordAuthentication

  Patch:

  === modified file 'cloudinit/sources/DataSourceAzure.py'
  --- cloudinit/sources/DataSourceAzure.py	2013-07-11 14:16:18 +0000
  +++ cloudinit/sources/DataSourceAzure.py	2013-07-16 21:13:26 +0000
  @@ -313,7 +313,10 @@
           elif name == "ssh":
               cfg['_pubkeys'] = load_azure_ovf_pubkeys(child)
           elif name == "disablesshpasswordauthentication":
  -            cfg['ssh_pwauth'] = util.is_true(value)
  +            # The verb 'disablessh..." asks whether to disable password auth.
  +            # Since it is disabled by default, "false" indicates that
  +            # password authentication should be enabled.
  +            cfg['ssh_pwauth'] = util.is_false(value)
           elif simple:
               if name in md_props:
                   md[name] = value

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1201969/+subscriptions