This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goserver. from 4eb608e {debian/control,x2goserver.spec}: add new dependency on bash. new ba40fd7 x2goserver/bin/x2gosessionlimit: don't iterate over the whole groups file. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 4 ++++ x2goserver/bin/x2gosessionlimit | 21 +++++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit ba40fd74858aba63763b5c50746d60928980cc15 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Jun 6 03:44:18 2015 +0200 x2goserver/bin/x2gosessionlimit: don't iterate over the whole groups file. Only check the primary and secondary groups as returned by getgid()/getgroups(). Fixes long delays in session startup for UW, who are connected to an AD server with a gazillion of groups. --- debian/changelog | 4 ++++ x2goserver/bin/x2gosessionlimit | 21 +++++++-------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/debian/changelog b/debian/changelog index b9432d5..738dcd8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -183,6 +183,10 @@ x2goserver (4.0.1.20-0x2go1) UNRELEASED; urgency=low - x2goserver/bin/x2gogetapps: do not print spurious newlines. - Change string "X2go" to "X2Go" where appropriate. - Add runcommand.d hooks to x2goserver-extensions Makefile. + - x2goserver/bin/x2gosessionlimit: don't iterate over the whole groups + file. Only check the primary and secondary groups as returned by + getgid()/getgroups(). Fixes long delays in session startup for UW, who + are connected to an AD server with a gazillion of groups. * x2goserver.spec: - Add sudo and logcheck as BuildRequires and Requires. Don't own directories that are owned by sudo and logcheck. Logcheck is not diff --git a/x2goserver/bin/x2gosessionlimit b/x2goserver/bin/x2gosessionlimit index cafc786..0f57135 100755 --- a/x2goserver/bin/x2gosessionlimit +++ b/x2goserver/bin/x2gosessionlimit @@ -27,6 +27,8 @@ use X2Go::Config qw( get_config); use X2Go::Log qw( loglevel ); use X2Go::Utils qw( system_capture_merged_output ); +use English; + openlog($0,'cons,pid','user'); setlogmask( LOG_UPTO(loglevel()) ); @@ -81,25 +83,16 @@ if($strlimit ne "") } -my ($name, $pass, $uid, $pgid, $quota, $comment, $gcos, $dir, $shell, $expire) = getpwnam($uname); +my @assigned_groups = split (" ", $REAL_GROUP_ID); -while (my ($name, $passwd, $gid, $members) = getgrent()) -{ - if ( $pgid eq $gid) - { +foreach my $current_group (@assigned_groups) { + my $name = getgrgid ($current_group); + + if (defined ($name)) { getGroupLimit $name; } - my @memebers=split(" ",$members); - foreach my $member (@memebers) - { - if ($uname eq $member ) - { - getGroupLimit $name; - } - } } - if ($scount < $maxlimit) { print "$maxlimit\n"; -- Alioth's /srv/git/code.x2go.org/x2goserver.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git