Your message dated Tue, 24 Jun 2008 18:47:03 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#478950: fixed in desktop-profiles 1.4.15
has caused the Debian Bug report #478950,
regarding desktop-profiles: Very slow with large LDAP database and NSS 
LDAPthanks
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [EMAIL PROTECTED]
immediately.)


-- 
478950: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478950
Debian Bug Tracking System
Contact [EMAIL PROTECTED] with problems
--- Begin Message ---
Package: desktop-profiles
Version: 1.4.13
Tags: patch

I ran into this problem when using desktop-profiles in Debian Edu with
a large LDAP directory from MS Active Directory.  Because of the way
the NSS API is structured, getting the group membership if a random
user is a very slow process (need to call setgrent(), loop over
getgrent() and finish off with endgrent()), and with 15000 groups and
70 000 users, this proved to take 20-30 minutes.  On the other hand,
just running 'groups' to get the current users group membership is a
quick process, because the kernel already know the group membership,
fetched at login using initgroups() which is a quick operation.

The result is that a login with desktop-profile installed takes 20-30
minutes.  To avoid the problem in the common case, where the current
users membership is looked up, I propose to rewrite the listingmodule
script to call 'groups' with no argument unless a different user is
requested.  I am also working on trying to speed up nss-ldapd, but
suspect it require a redesign of the NSS API, and thus will not happen
any time soon. :)

As a further optimization, I replace the groups call to use 'id -gN'
instead.  This is the call used by /usr/bin/groups internally to get
the groups, and it remove the need to reformat of the output using
sed.

diff -Nru /tmp/ffrOaTouSm/desktop-profiles-1.4.14/listingmodule 
/tmp/uvXTuP9rHd/desktop-profiles-1.4.15/listingmodule
--- /tmp/ffrOaTouSm/desktop-profiles-1.4.14/listingmodule       2006-06-06 
11:14:23.000000000 +0200
+++ /tmp/uvXTuP9rHd/desktop-profiles-1.4.15/listingmodule       2008-05-01 
23:08:04.000000000 +0200
@@ -51,9 +51,15 @@
     exit;
   fi;

-  # initialize needed variables
-  OUR_USER=${2:-$USER}
-  OUR_GROUPS=`groups $OUR_USER | sed "s/^\$OUR_USER : //"`
+  # initialize needed variables.  Do not give argument to groups when looking 
up the current
+  # user, to avoid expensive lookup with LDAP NSS.
+  if [ -z "$2" ] || [ "$USER" = "$2" ]; then
+    OUR_USER="$USER"
+    OUR_GROUPS="`id -Gn`"
+  else
+    OUR_USER=$2
+    OUR_GROUPS="`id -Gn -- $OUR_USER`"
+  fi

   # !... requirement
   if (echo "$1" | grep '^!' > /dev/null) ; then

Happy hacking,
-- 
Petter Reinholdtsen



--- End Message ---
--- Begin Message ---
Source: desktop-profiles
Source-Version: 1.4.15

We believe that the bug you reported is fixed in the latest version of
desktop-profiles, which is due to be installed in the Debian FTP archive:

desktop-profiles_1.4.15.dsc
  to pool/main/d/desktop-profiles/desktop-profiles_1.4.15.dsc
desktop-profiles_1.4.15.tar.gz
  to pool/main/d/desktop-profiles/desktop-profiles_1.4.15.tar.gz
desktop-profiles_1.4.15_all.deb
  to pool/main/d/desktop-profiles/desktop-profiles_1.4.15_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bart Cornelis (cobaco) <[EMAIL PROTECTED]> (supplier of updated 
desktop-profiles package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 18 Jun 2008 12:10:42 +0200
Source: desktop-profiles
Binary: desktop-profiles
Architecture: source all
Version: 1.4.15
Distribution: unstable
Urgency: low
Maintainer: Bart Cornelis (cobaco) <[EMAIL PROTECTED]>
Changed-By: Bart Cornelis (cobaco) <[EMAIL PROTECTED]>
Description: 
 desktop-profiles - framework for setting up desktop profiles
Closes: 435986 454495 478950 486669 486735
Changes: 
 desktop-profiles (1.4.15) unstable; urgency=low
 .
   [ Guillem Jover ]
   * Translations:
     - Added Catalan translations by Guillem Jover.
 .
   [ Bart Cornelis (cobaco) ]
   * Fix cronjob checking profile-cache so it doesn't complain if package is
     deinstalled (Closes: #435986)
   * Corrected links to documentation where necessary:
     - KDE docs are now on techbase wiki
     - location of freedesktop docs changed (though old links were redirected)
     - XFCE doc is on different server (though old link was redirected)
   * Comply with policy version 3.7.3:
     Change menu entry from Apps/System to Applications/System/Administration
   * Comply with policy version 3.8.0:
     No changes needed
   * Removed lintian overrides that are no longer necessary as of lintian 
1.23.37
   * Add Vcs-Svn and Vcs-Browser fields to debian/control
   * Use proposed machine-parsable format for debian/copyright (as documented
     on http://wiki.debian.org/Proposals/CopyrightFormat)
   * Added Russian translation by Yuri Kozlov (Closes: #454495)
   * Added Turkish translation by Mert Dirik (Closes: #486669)
   * Added Galician translation by Jacobo Tarrio (Closes: #486735)
   * Use correct capitalisation of Xfce
 .
   [ Petter Reinholdtsen ]
   * Rewrite listingmodule to not call groups with a username as argument
     when looking up the current user, to avoid expencive NSS lookup with
     LDAP (Closes: #478950).
Checksums-Sha1: 
 35e4ead7e1e987168bdbddea7ce4fc752958d334 997 desktop-profiles_1.4.15.dsc
 b126bcc0bb58476aa681c182d6a4c6db66a5fadd 84743 desktop-profiles_1.4.15.tar.gz
 193c7e59101a3a85e38f39392610568754c8d095 77640 desktop-profiles_1.4.15_all.deb
Checksums-Sha256: 
 b7fd7b3464d37832bf76dbf44a4039a626b92e98e97010baf6a831d52a0b167f 997 
desktop-profiles_1.4.15.dsc
 426de3620ef8c181207198df2ce289031ba0f575d01b550ac32a3fd3874e300a 84743 
desktop-profiles_1.4.15.tar.gz
 8a7c8a80b243d3dad871dc3cf05e660dc559f595bd0b643ff36bb01ad3b30675 77640 
desktop-profiles_1.4.15_all.deb
Files: 
 627475fd2a8f55486a8ab5e9f30ed5cc 997 x11 optional desktop-profiles_1.4.15.dsc
 c37170e9a71d7a99fc5d34c2864c003b 84743 x11 optional 
desktop-profiles_1.4.15.tar.gz
 7296b6fa9acf93f4206d954354dfdfea 77640 x11 optional 
desktop-profiles_1.4.15_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkhhP7sACgkQ1OXtrMAUPS2+QgCePV+PL9e+8DhrKNXk1IfvCQr8
/yEAoLoiYGL8pncxELClF6QSYJ1Etf/Y
=4QM9
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to