summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-09 14:47:48 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-09-09 14:47:48 -0400
commit8fd0dad3e99f4452a6cd3f27e5c97efd9fc308e7 (patch)
treea717cec4bb6478367eb514f9920d1e9bd2d34e15 /src/lib/Bcfg2
parent3f5d0f6424eb2cc37bb962777995af341ef2b2dc (diff)
downloadbcfg2-8fd0dad3e99f4452a6cd3f27e5c97efd9fc308e7.tar.gz
bcfg2-8fd0dad3e99f4452a6cd3f27e5c97efd9fc308e7.tar.bz2
bcfg2-8fd0dad3e99f4452a6cd3f27e5c97efd9fc308e7.zip
Cfg: allow changing category specific-ness of generated authorized_keys
Diffstat (limited to 'src/lib/Bcfg2')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
index f304891d5..41d5588e4 100644
--- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
+++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
@@ -68,18 +68,18 @@ class CfgAuthorizedKeysGenerator(CfgGenerator, StructFile):
if pubkey_name:
host = allow.get("host")
group = allow.get("group")
+ category = allow.get("category", self.category)
if host:
key_md = self.core.build_metadata(host)
elif group:
key_md = ClientMetadata("dummy", group, [group], [],
set(), set(), dict(), None,
None, None, None)
- elif (self.category and
- not metadata.group_in_category(self.category)):
+ elif category and not metadata.group_in_category(category):
self.logger.warning("Cfg: %s ignoring Allow from %s: "
"No group in category %s" %
(metadata.hostname, pubkey_name,
- self.category))
+ category))
continue
else:
key_md = metadata