diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Server/Plugins/Account.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Plugins/Cfg.py | 8 | ||||
-rw-r--r-- | src/lib/Server/Plugins/Deps.py | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/Server/Plugins/Account.py b/src/lib/Server/Plugins/Account.py index ac2eba836..86cdab9f3 100644 --- a/src/lib/Server/Plugins/Account.py +++ b/src/lib/Server/Plugins/Account.py @@ -80,6 +80,6 @@ class Account(Bcfg2.Server.Plugin.Plugin): entry.text = self.repository.entries['static.sudoers'].data entry.text += "".join(["%s ALL=(ALL) ALL\n" % uname \ for uname in superusers]) - perms = {'owner':'root', 'group':'0', 'perms':'0400'} + perms = {'owner':'root', 'group':'0', 'perms':'0440'} [entry.attrib.__setitem__(key, value) for (key, value) \ in perms.iteritems()] diff --git a/src/lib/Server/Plugins/Cfg.py b/src/lib/Server/Plugins/Cfg.py index afda27cde..987cc2da8 100644 --- a/src/lib/Server/Plugins/Cfg.py +++ b/src/lib/Server/Plugins/Cfg.py @@ -133,15 +133,17 @@ class ConfigFileEntry(object): return try: - self.fragments.append(FileEntry(self.path, name)) - self.fragments.sort() + if name not in [ent.name for ent in self.fragments]: + self.fragments.append(FileEntry(self.path, name)) + self.fragments.sort() except SpecificityError: return def HandleEvent(self, event): '''Handle FAM updates''' action = event.code2str() - #logger.debug("Got event %s for %s" % (action, event.filename)) + #if self.path.endswith('/etc/passwd'): + # logger.debug("Got event %s for %s" % (action, event.filename)) if event.filename in [':info', 'info']: if action in ['changed', 'exists', 'created']: return self.read_info(event.filename) diff --git a/src/lib/Server/Plugins/Deps.py b/src/lib/Server/Plugins/Deps.py index d63f0b204..eb215a564 100644 --- a/src/lib/Server/Plugins/Deps.py +++ b/src/lib/Server/Plugins/Deps.py @@ -92,5 +92,8 @@ class Deps(Bcfg2.Server.Plugin.PrioDir): newstruct = lxml.etree.Element("Independant") for tag, name in prereqs: - lxml.etree.SubElement(newstruct, tag, name=name) + try: + lxml.etree.SubElement(newstruct, tag, name=name) + except: + self.logger("Failed to add dep entry for %s:%s" % (tag, name)) return newstruct |