summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-08-27 15:20:58 -0400
committerScott Moser <smoser@ubuntu.com>2012-08-27 15:20:58 -0400
commitb81d5ed43e7ebed1d11d4b4109e22e9954316d4c (patch)
tree09ebe8f54feddc6215f0ef50414c0588ad9b9799
parente345c95b9851ada5062304a9a99364da9abb674b (diff)
downloadvyos-cloud-init-b81d5ed43e7ebed1d11d4b4109e22e9954316d4c.tar.gz
vyos-cloud-init-b81d5ed43e7ebed1d11d4b4109e22e9954316d4c.zip
DataSourceEc2: require 'instance-data' as top level domain
In searching for the metadata service, require 'instance-data' to be at the top level domain. Previously any misconfigured 'search' in /etc/resolv.conf could result in unintended use of a metadata server. LP: #1040200
-rw-r--r--ChangeLog1
-rw-r--r--cloudinit/sources/DataSourceEc2.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b28566e5..283d1464 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
0.7.0:
+ - search only top level dns for 'instance-data' in DataSourceEc2 (LP: #1040200)
- add support for config-drive-v2 (LP:#1037567)
- support creating users, including the default user.
[Ben Howard] (LP: #1028503)
diff --git a/cloudinit/sources/DataSourceEc2.py b/cloudinit/sources/DataSourceEc2.py
index 556dcafb..7e845571 100644
--- a/cloudinit/sources/DataSourceEc2.py
+++ b/cloudinit/sources/DataSourceEc2.py
@@ -40,7 +40,7 @@ DEF_MD_VERSION = '2009-04-04'
# Default metadata urls that will be used if none are provided
# They will be checked for 'resolveability' and some of the
# following may be discarded if they do not resolve
-DEF_MD_URLS = [DEF_MD_URL, "http://instance-data:8773"]
+DEF_MD_URLS = [DEF_MD_URL, "http://instance-data.:8773"]
class DataSourceEc2(sources.DataSource):