diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Account.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/Server/Plugins/Account.py b/src/lib/Server/Plugins/Account.py index d728566a4..7368f74e7 100644 --- a/src/lib/Server/Plugins/Account.py +++ b/src/lib/Server/Plugins/Account.py @@ -50,12 +50,10 @@ class Account(Plugin): def gen_root_keys_cb(self, entry, metadata): '''Build root authorized keys file based on current ACLs''' - entry.text = '' superusers = self.repository.entries['superusers'].data.split() rootlike = [line.split(':', 1) for line in self.repository.entries['rootlike'].data.split()] superusers += [user for (user, host) in rootlike if host == metadata.hostname.split('.')[0]] - for user in superusers: - if self.repository.entries.has_key("%s.key" % user): - entry.text += self.repository.entries["%s.key" % user].data + rdata = self.repository.entries + entry.text = "".join([rdata[user] for user in superusers if rdata.has_key(user)]) perms = {'owner':'root', 'group':'root', 'perms':'0600'} [entry.attrib.__setitem__(key, value) for (key, value) in perms.iteritems()] |