Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 827227

Summary: x11-wm/openbox-3.6.1-r3: OpenBox should not enumerate all groups at startup.
Product: Gentoo Linux Reporter: Dmitry A. Bakshaev <dab1818>
Component: Current packagesAssignee: LxQt maintainers <lxqt>
Status: RESOLVED FIXED    
Severity: normal CC: sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: replace getgrent -> getgroups

Description Dmitry A. Bakshaev 2021-11-25 06:22:21 UTC
Openbox iterates through all groups on startup. In our LDAP environment with
activated user private groups, this slows down the startup of openbox
significantly.

Reproducible: Always

Steps to Reproduce:
1. start openbox (or obconf)

Actual Results:  
took a long time to get started 


Expected Results:  
appeared instantly

The usage of getgrent is responsible for these delays. The patch
supplied uses getgroups instead of getgrent, with performs much better and
respects local nscd caches.

our enviroment:
getent group|wc -l
22831
getent passwd|wc -l
14592

patch available on:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808138
https://bugzilla.icculus.org/show_bug.cgi?id=5978
Comment 1 Dmitry A. Bakshaev 2021-11-25 06:24:17 UTC
Created attachment 756148 [details, diff]
replace getgrent -> getgroups
Comment 2 Larry the Git Cow gentoo-dev 2023-03-09 16:29:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7ad157920317e70d19389d9f3601d3cc7f599be

commit c7ad157920317e70d19389d9f3601d3cc7f599be
Author:     Jimi Huotari <chiitoo@gentoo.org>
AuthorDate: 2023-03-09 14:22:09 +0000
Commit:     Jimi Huotari <chiitoo@gentoo.org>
CommitDate: 2023-03-09 16:29:48 +0000

    x11-wm/openbox: patch getgrent to getgroups
    
    Upstream: https://bugzilla.icculus.org/show_bug.cgi?id=5978
    Closes: https://bugs.gentoo.org/827227
    Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>

 .../openbox-3.6.1-getgrent-to-getgroups.patch      |  67 ++++++++++++
 x11-wm/openbox/openbox-3.6.1-r4.ebuild             | 121 +++++++++++++++++++++
 x11-wm/openbox/openbox-9999.ebuild                 |   4 +-
 3 files changed, 191 insertions(+), 1 deletion(-)