summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-10-10 14:14:44 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-10-10 14:14:44 +0000
commitd49ec0cce12b8da989b7efe75d612b0421155f63 (patch)
tree318947c46562ff5e9356a202b4066ed4368ba4cc /src/lib
parent4149b1ac63408f0c81bbb1ad56080c7c1e68f7af (diff)
downloadbcfg2-d49ec0cce12b8da989b7efe75d612b0421155f63.tar.gz
bcfg2-d49ec0cce12b8da989b7efe75d612b0421155f63.tar.bz2
bcfg2-d49ec0cce12b8da989b7efe75d612b0421155f63.zip
Plugin updates: Account sudoers perms, Cfg recreate bug, Deps error path
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3784 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Plugins/Account.py2
-rw-r--r--src/lib/Server/Plugins/Cfg.py8
-rw-r--r--src/lib/Server/Plugins/Deps.py5
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