summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-12-04 13:02:10 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-12-04 13:02:10 +0000
commit7c59efda4bbaa46ccf97ec954eca3b738beca07a (patch)
treef7cd04c91c8ebd64f190ff1925acae554528faaf /src/lib/Server/Plugins
parent057874af0c9474a51e092784b9c19737dcea51ca (diff)
downloadbcfg2-7c59efda4bbaa46ccf97ec954eca3b738beca07a.tar.gz
bcfg2-7c59efda4bbaa46ccf97ec954eca3b738beca07a.tar.bz2
bcfg2-7c59efda4bbaa46ccf97ec954eca3b738beca07a.zip
Fix race when no keys exist and known_hosts is first in the bundle [bugfix]
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4046 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins')
-rw-r--r--src/lib/Server/Plugins/SSHbase.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py
index a2149611d..696393603 100644
--- a/src/lib/Server/Plugins/SSHbase.py
+++ b/src/lib/Server/Plugins/SSHbase.py
@@ -123,6 +123,8 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.DirectoryBacked):
def build_skn(self, entry, metadata):
'''This function builds builds a host specific known_hosts file'''
client = metadata.hostname
+ if not hasattr(self, 'static_skn'):
+ self.cache_skn()
entry.text = self.static_skn
hostkeys = [keytmpl % client for keytmpl in self.pubkeys \
if self.entries.has_key(keytmpl % client)]