summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-04 15:48:05 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-04 15:48:05 -0400
commitbdcbded3236fa76f011c8d594c4b261c8b816199 (patch)
tree23d9886731ccbf52e8f3d3d9ccc0cfeb8dbb273a /src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
parent864bce0515b85f206381ac033875b12d06a2540d (diff)
parent5c9cd24767bcbc8cdb39eebf2fd81e9c814c01af (diff)
downloadbcfg2-bdcbded3236fa76f011c8d594c4b261c8b816199.tar.gz
bcfg2-bdcbded3236fa76f011c8d594c4b261c8b816199.tar.bz2
bcfg2-bdcbded3236fa76f011c8d594c4b261c8b816199.zip
Merge branch 'maint'
Conflicts: doc/client/tools/actions.txt schemas/authorizedkeys.xsd src/lib/Bcfg2/Client/Frame.py src/lib/Bcfg2/Server/Plugin/helpers.py src/lib/Bcfg2/Server/Plugins/Bundler.py testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
index 384d1bf12..895752c9c 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
@@ -38,10 +38,13 @@ class CfgAuthorizedKeysGenerator(CfgGenerator, StructFile):
spec = self.XMLMatch(metadata)
rv = []
for allow in spec.findall("Allow"):
- params = ''
- if allow.find("Params") is not None:
- params = ",".join("=".join(p)
- for p in allow.find("Params").attrib.items())
+ options = []
+ for opt in allow.findall("Option"):
+ if opt.get("value"):
+ options.append("%s=%s" % (opt.get("name"),
+ opt.get("value")))
+ else:
+ options.append(opt.get("name"))
pubkey_name = allow.get("from")
if pubkey_name:
@@ -85,6 +88,6 @@ class CfgAuthorizedKeysGenerator(CfgGenerator, StructFile):
(metadata.hostname,
lxml.etree.tostring(allow)))
continue
- rv.append(" ".join([params, pubkey]).strip())
+ rv.append(" ".join([",".join(options), pubkey]).strip())
return "\n".join(rv)
get_data.__doc__ = CfgGenerator.get_data.__doc__