You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/03/23 10:41:03 UTC

DO NOT REPLY [Bug 39075] New: - getpwnam_r call has to small buffer => my LDAP lookups fails

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=39075>.
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=39075

           Summary: getpwnam_r call has to small buffer => my LDAP lookups
                    fails
           Product: APR
           Version: 1.2.2
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: major
          Priority: P4
         Component: APR
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: johan@stromnet.org


My setup is a FreeBSD 6.0 box, using LDAP for users (running via lookupd for
LDAP caching). I got problem with apache2.2.0 and mod_userdir, my user (in ldap)
was not found. This has been working fine with apache2.0 before. Might be the
same as mentioned in #35742?

I've hunted the bug down:
Using APR with Apache 2.2.0, the file
httpd-2.2.0/srclib/apr/user/unix/userinfo.c specifies a PWBUF_SIZE of 512 bytes.
On FreeBSD 6.0 when using LDAP users, this is not enough. Rising it to 1024
seems to do the trick, my mod_userdir now works.
I'm not sure what value is appropriate here, but 512 is not enough, and 1024
seems to work. getpwnam_r returns error ERANGE when 512 is used.

So, fix for this problem seems to be to change PWBUF_SIZE in
apr/user/unix/userinfo.c from 512 to 1024.

-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 39075] - getpwnam_r call has to small buffer => my LDAP lookups fails

Posted by bu...@apache.org.
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=39075>.
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=39075


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From jorton@redhat.com  2006-03-31 13:45 -------
Thanks for the report and analysis.  I've bumped it to 2048 for good measure; I
guess it should really increase the size and loop given an ERANGE error, but
that's sounds like a lot of effort.

http://svn.apache.org/viewcvs?rev=390410&view=rev

It would be useful to see whether the userinfo tests work in that configuration:

  $ cd test; make testall
  $ ./testall -v testuser



-- 
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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org