apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41105] New: - apr_gid_name_get using getgrgid_r fails for large groups
Date Mon, 04 Dec 2006 21:54:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41105>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41105

           Summary: apr_gid_name_get using getgrgid_r fails for large groups
           Product: APR
           Version: 1.2.7
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: colin_simmonds@Mac.lover.org


Building apr 1.2.7 on Linux, the tests failed with 

testuser            :  Line 87: apr_gid_name_get failed (34): Numerical result
out of range

/tmp/rpm-tmp.34736: line 28: 17392 Segmentation fault      (core dumped)
./testall -v -q

The problem appears to be that my primary Unix group is too large for the 512
byte buffer passed into getgrgid_r(), since the group has over 100 user IDs in
it. getgrgid_r() is returning ERANGE, which according to its manpage means that
the passed in buffer was too small for the group's data. When I changed groups
using newgrp, this test then passed.

I think that if getgrgid_r() returns ERANGE, APR should either fallback to using
plain getgrgid() or else retry getgrgid_r() with a larger buffer.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message