DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10095>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10095

Within userinfo.c, getpwnam_r does not work as expected on IRIX





------- Additional Comments From [EMAIL PROTECTED]  2002-06-21 01:07 -------
Is this essentially what you tested?

Index: srclib/apr/user/unix/userinfo.c
===================================================================
RCS file: /home/cvs/apr/user/unix/userinfo.c,v
retrieving revision 1.18
diff -u -r1.18 userinfo.c
--- srclib/apr/user/unix/userinfo.c     13 Mar 2002 20:39:31 -0000      1.18
+++ srclib/apr/user/unix/userinfo.c     21 Jun 2002 01:06:22 -0000
@@ -76,7 +76,8 @@
 {
     struct passwd *pwptr;
 #if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) &&
defined(HAVE_GETPWNAM_R)
-    if (!getpwnam_r(username, pw, pwbuf, PWBUF_SIZE, &pwptr)) {
+    /* IRIX getpwnam_r() returns 0 and sets pwptr to NULL on failure */
+    if (!getpwnam_r(username, pw, pwbuf, PWBUF_SIZE, &pwptr) && pwptr) {
         /* nothing extra to do on success */
 #else
     if ((pwptr = getpwnam(username)) != NULL) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to