summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Account.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-11-28 20:18:16 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-11-28 20:18:16 +0000
commitee908766e9704749d00845f0b14cbfa5681850fd (patch)
tree96b8b6d16c189085dc0174e46e1e995fe977d912 /src/lib/Server/Plugins/Account.py
parentc62e5282a63c64712b9653ac3ffc1e2364f73845 (diff)
downloadbcfg2-ee908766e9704749d00845f0b14cbfa5681850fd.tar.gz
bcfg2-ee908766e9704749d00845f0b14cbfa5681850fd.tar.bz2
bcfg2-ee908766e9704749d00845f0b14cbfa5681850fd.zip
work around lxml bug
(Logical change 1.367) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1537 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Plugins/Account.py')
-rw-r--r--src/lib/Server/Plugins/Account.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/Server/Plugins/Account.py b/src/lib/Server/Plugins/Account.py
index f30039d33..d728566a4 100644
--- a/src/lib/Server/Plugins/Account.py
+++ b/src/lib/Server/Plugins/Account.py
@@ -33,7 +33,8 @@ class Account(Plugin):
fname = entry.attrib['name'].split('/')[-1]
entry.text = self.repository.entries["static.%s" % (fname)].data
entry.text += self.repository.entries["dyn.%s" % (fname)].data
- entry.attrib.update({'owner':'root', 'group':'root', 'perms':'0644'})
+ perms = {'owner':'root', 'group':'root', 'perms':'0644'}
+ [entry.attrib.__setitem__(key, value) for (key, value) in perms.iteritems()]
def gen_limits_cb(self, entry, metadata):
'''Build limits entries based on current ACLs'''
@@ -41,7 +42,8 @@ class Account(Plugin):
superusers = self.repository.entries["superusers"].data.split()
useraccess = [line.split(':') for line in self.repository.entries["useraccess"].data.split()]
users = [user for (user, host) in useraccess if host == metadata.hostname.split('.')[0]]
- entry.attrib.update({'owner':'root', 'group':'root', 'perms':'0600'})
+ perms = {'owner':'root', 'group':'root', 'perms':'0600'}
+ [entry.attrib.__setitem__(key, value) for (key, value) in perms.iteritems()]
entry.text += "".join(["%s hard maxlogins 1024\n" % uname for uname in superusers + users])
if "*" not in users:
entry.text += "* hard maxlogins 0\n"
@@ -55,4 +57,5 @@ class Account(Plugin):
for user in superusers:
if self.repository.entries.has_key("%s.key" % user):
entry.text += self.repository.entries["%s.key" % user].data
- entry.attrib.update({'owner':'root', 'group':'root', 'perms':'0600'})
+ perms = {'owner':'root', 'group':'root', 'perms':'0600'}
+ [entry.attrib.__setitem__(key, value) for (key, value) in perms.iteritems()]