summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-03-27 02:28:22 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-03-27 02:28:22 +0000
commit1e598c1483530efd904cbf9c5f1c9b4e98052834 (patch)
treed6ae2a6a4760f6d8b061e493bcbda5dc11c09f00
parent387165b8651d60f61517997a735e1e9c03894a15 (diff)
downloadbcfg2-1e598c1483530efd904cbf9c5f1c9b4e98052834.tar.gz
bcfg2-1e598c1483530efd904cbf9c5f1c9b4e98052834.tar.bz2
bcfg2-1e598c1483530efd904cbf9c5f1c9b4e98052834.zip
Fix SSHbase key managment in arbitrary locations
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4458 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/SSHbase.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/SSHbase.py b/src/lib/Server/Plugins/SSHbase.py
index 89767cf85..005b52988 100644
--- a/src/lib/Server/Plugins/SSHbase.py
+++ b/src/lib/Server/Plugins/SSHbase.py
@@ -95,11 +95,16 @@ class SSHbase(Bcfg2.Server.Plugin.Plugin, Bcfg2.Server.Plugin.DirectoryBacked):
def HandlesEntry(self, entry):
'''Handle key entries dynamically'''
return entry.tag == 'ConfigFile' and \
- [fpat for fpat in self.keypatterns if entry.get('name').endswith(fpat)]
+ ([fpat for fpat in self.keypatterns
+ if entry.get('name').endswith(fpat)]
+ or entry.get('name').endswith('ssh_known_hosts'))
def HandleEntry(self, entry, metadata):
- '''Bind key data'''
- return self.build_hk(entry, metadata)
+ '''Bind data'''
+ if entry.get('name').endswith('ssh_known_hosts'):
+ return self.build_skn(entry, metadata)
+ else:
+ return self.build_hk(entry, metadata)
def get_ipcache_entry(self, client):
'''build a cache of dns results'''