Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
libqt4
0167-fix-group-reading.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0167-fix-group-reading.diff of Package libqt4
qt-bugs@ issue : none Trolltech task ID : none yet bugs.kde.org number : None applied: no author: Dirk Mueller <mueller@kde.org> in big user environments, getgrgid_r() needs more memory than sysconf() returns. Try a bit harder. --- src/corelib//io/qfsfileengine_unix.cpp +++ src/corelib//io/qfsfileengine_unix.cpp @@ -835,9 +835,13 @@ size_max = sysconf(_SC_GETGR_R_SIZE_MAX); if (size_max == -1) size_max = 1024; - buf.resize(size_max); - struct group entry; - getgrgid_r(ownerId(own), &entry, buf.data(), buf.size(), &gr); + for (;size_max < 256000; size_max += size_max) { + buf.resize(size_max); + struct group entry; + if (!getgrgid_r(ownerId(own), &entry, buf.data(), buf.size(), &gr) || errno != ERANGE) + break; + + } #else gr = getgrgid(ownerId(own)); #endif
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor