mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-21 17:11:58 +00:00
Add localhost to ssh principals/equiv
It shouldn't be possible to hijack localhost, so allow such addresses to be principaled and be listed in equiv.
This commit is contained in:
parent
523d5920bc
commit
d8c633a7d5
@ -53,7 +53,7 @@ def listdump(input):
|
||||
|
||||
|
||||
def get_extra_names(nodename, cfg, myip=None):
|
||||
names = set([])
|
||||
names = set(['127.0.0.1', '::1', 'localhost', 'localhost.localdomain'])
|
||||
dnsinfo = cfg.get_node_attributes(nodename, ('dns.*', 'net.*hostname'))
|
||||
dnsinfo = dnsinfo.get(nodename, {})
|
||||
domain = dnsinfo.get('dns.domain', {}).get('value', None)
|
||||
@ -631,4 +631,8 @@ def get_cluster_list(nodename=None, cfg=None):
|
||||
nodes.add(myname)
|
||||
if domain and domain not in myname:
|
||||
nodes.add('{0}.{1}'.format(myname, domain))
|
||||
nodes.add('::1')
|
||||
nodes.add('127.0.0.1')
|
||||
nodes.add('localhost')
|
||||
nodes.add('localhost.domain')
|
||||
return nodes, domain
|
||||
|
Loading…
Reference in New Issue
Block a user