The branch, master has been updated via 75a711dd713a90b74f0c0e372a20287ed3ace747 (commit) from e313c67ec94b6e86cd7de7623e9a538db739cedf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 75a711dd713a90b74f0c0e372a20287ed3ace747 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Jan 28 12:38:40 2013 +0100 speed-up libnss nameservice: only query all users and groups once ----------------------------------------------------------------------- Summary of changes: x2gobroker/nameservices/libnss_nameservice.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) The diff of changes is: diff --git a/x2gobroker/nameservices/libnss_nameservice.py b/x2gobroker/nameservices/libnss_nameservice.py index 5f11f4c..bb4f623 100644 --- a/x2gobroker/nameservices/libnss_nameservice.py +++ b/x2gobroker/nameservices/libnss_nameservice.py @@ -25,18 +25,20 @@ import grp # Python X2GoBroker modules import base_nameservice as base +_pwd = pwd.getpwall() +_grp = grp.getgrall() class X2GoBrokerNameService(base.X2GoBrokerNameService): def get_users(self): - return [ unicode(p.pw_name) for p in pwd.getpwall() ] + return [ unicode(p.pw_name) for p in _pwd ] def get_primary_group(self, username): - prim_gid_number = [ p.pw_gid for p in pwd.getpwall() if unicode(p.pw_name) == unicode(username) ][0] - return [ unicode(g.gr_name) for g in grp.getgrall() if g.gr_gid == prim_gid_number ][0] + prim_gid_number = [ p.pw_gid for p in _pwd if unicode(p.pw_name) == unicode(username) ][0] + return [ unicode(g.gr_name) for g in _grp if g.gr_gid == prim_gid_number ][0] def get_groups(self): - return [ unicode(g.gr_name) for g in grp.getgrall() ] + return [ unicode(g.gr_name) for g in _grp ] def get_group_members(self, group, primary_groups=False): _members_from_primgroups = [] hooks/post-receive -- x2gobroker.git (HTTP(S) Session broker for X2Go) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).