diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-09-09 16:00:43 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-09-09 16:00:43 -0400 |
commit | ece78e71a84c19da694d0122be2e6d78d08d8e8d (patch) | |
tree | 3008718e6ad81dee51dc04d501670ee247c2108f /src/lib/Bcfg2/Server | |
parent | 6b662945b58eafd8e27f0191f4d7a78e7cc4ad05 (diff) | |
parent | 8fd0dad3e99f4452a6cd3f27e5c97efd9fc308e7 (diff) | |
download | bcfg2-ece78e71a84c19da694d0122be2e6d78d08d8e8d.tar.gz bcfg2-ece78e71a84c19da694d0122be2e6d78d08d8e8d.tar.bz2 bcfg2-ece78e71a84c19da694d0122be2e6d78d08d8e8d.zip |
Merge branch 'maint'
Conflicts:
src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py
src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py
testsuite/Testsrc/Testlib/TestClient/TestTools/TestPOSIXUsers.py
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r-- | src/lib/Bcfg2/Server/Core.py | 3 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py | 8 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py index 4eb151c29..3eb84f45f 100644 --- a/src/lib/Bcfg2/Server/Core.py +++ b/src/lib/Bcfg2/Server/Core.py @@ -23,7 +23,6 @@ from Bcfg2.Compat import xmlrpclib # pylint: disable=W0622 from Bcfg2.Server.Plugin.exceptions import * # pylint: disable=W0401,W0614 from Bcfg2.Server.Plugin.interfaces import * # pylint: disable=W0401,W0614 from Bcfg2.Server.Plugin import track_statistics -from Bcfg2.Server.Plugins.Metadata import MetadataGroup try: import psyco @@ -858,7 +857,7 @@ class Core(object): groups = conn.get_additional_groups(imd) groupnames = [] for group in groups: - if isinstance(group, MetadataGroup): + if hasattr(group, "name"): groupname = group.name if groupname in self._dynamic_groups: if self._dynamic_groups[groupname] == conn.name: diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py index 895752c9c..7792d7e5c 100644 --- a/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py +++ b/src/lib/Bcfg2/Server/Plugins/Cfg/CfgAuthorizedKeysGenerator.py @@ -50,19 +50,19 @@ class CfgAuthorizedKeysGenerator(CfgGenerator, StructFile): if pubkey_name: host = allow.get("host") group = allow.get("group") + category = allow.get("category", + Bcfg2.Options.setup.sshkeys_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 (Bcfg2.Options.setup.sshkeys_category and - not metadata.group_in_category( - Bcfg2.Options.setup.sshkeys_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, - Bcfg2.Options.setup.sshkeys_category)) + category)) continue else: key_md = metadata diff --git a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py index 5b32a91c0..632a5c3bf 100644 --- a/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py +++ b/src/lib/Bcfg2/Server/Plugins/Cfg/__init__.py @@ -80,6 +80,8 @@ class CfgBaseFileMatcher(Bcfg2.Server.Plugin.SpecificData): experimental = False def __init__(self, name, specific): + if not self.__specific__ and not specific: + specific = Bcfg2.Server.Plugin.Specificity(all=True) Bcfg2.Server.Plugin.SpecificData.__init__(self, name, specific) __init__.__doc__ = Bcfg2.Server.Plugin.SpecificData.__init__.__doc__ + \ """ |