diff options
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | debian/patches/lp-1506244-azure-ssh-key-values.patch | 46 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 55 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 9d759845..00a8dcf3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +cloud-init (0.6.3-0ubuntu1.24) precise; urgency=medium + + * d/patches/lp-1506244-azure-ssh-key-values.patch: AZURE: Add support + and preference for fabric provided public SSH public key values over + fingerprints (LP: #1506244). + + -- Ben Howard <ben.howard@ubuntu.com> Tue, 17 Nov 2015 10:02:08 -0700 + cloud-init (0.6.3-0ubuntu1.23) precise; urgency=medium * d/patches/lp-1177432-same-archives-as-ubuntu-server.patch: use the diff --git a/debian/patches/lp-1506244-azure-ssh-key-values.patch b/debian/patches/lp-1506244-azure-ssh-key-values.patch new file mode 100644 index 00000000..c7e18502 --- /dev/null +++ b/debian/patches/lp-1506244-azure-ssh-key-values.patch @@ -0,0 +1,46 @@ +Description: AZURE: add support/preference for SSH public key values + Azure has started to support SSH public key values in addition to SSH + public key fingerprints. Per MS, this patch prefers fabric provided + values instead of fingerprints. +Author: Ben Howard <ben.howard@ubuntu.com> +Origin: upstream, http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/revision/1149 +Bug: https://bugs.launchpad.net/cloud-init/+bug/1506244 +--- a/cloudinit/DataSourceAzure.py ++++ b/cloudinit/DataSourceAzure.py +@@ -189,9 +189,15 @@ + wait_for = [shcfgxml] + + fp_files = [] ++ key_value = None + for pk in self.cfg.get('_pubkeys', []): +- bname = pk['fingerprint'] + ".crt" +- fp_files += [os.path.join(mycfg['data_dir'], bname)] ++ if pk.get('value', None): ++ key_value = pk['value'] ++ LOG.debug("ssh authentication: using value from fabric") ++ else: ++ bname = str(pk['fingerprint'] + ".crt") ++ fp_files += [os.path.join(ddir, bname)] ++ LOG.debug("ssh authentication: using fingerprint from fabric") + + start = time.time() + missing = wait_for_files(wait_for + fp_files) +@@ -209,7 +215,7 @@ + except ValueError as e: + LOG.warn("failed to get instance id in %s: %s" % (shcfgxml, e)) + +- pubkeys = pubkeys_from_crt_files(fp_files) ++ pubkeys = key_value or pubkeys_from_crt_files(fp_files) + + self.metadata['public-keys'] = pubkeys + +@@ -474,7 +480,8 @@ + for pk_node in pubkeys: + if not pk_node.hasChildNodes(): + continue +- cur = {'fingerprint': "", 'path': ""} ++ ++ cur = {'fingerprint': "", 'path': "", 'value': ""} + for child in pk_node.childNodes: + if (child.nodeType == text_node or not child.localName): + continue diff --git a/debian/patches/series b/debian/patches/series index 76adf59e..d1b9275c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -39,3 +39,4 @@ lp-1492468-config-drive_alternative-interface-path.patch lp-1458052-redact-azure-password.patch lp-1382481-cloudstack-vr.patch lp-1177432-same-archives-as-ubuntu-server.patch +lp-1506244-azure-ssh-key-values.patch |