Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 26270 invoked from network); 19 Jul 2005 09:39:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jul 2005 09:39:06 -0000 Received: (qmail 65534 invoked by uid 500); 19 Jul 2005 09:39:05 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 65493 invoked by uid 500); 19 Jul 2005 09:39:04 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 65480 invoked by uid 99); 19 Jul 2005 09:39:04 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 19 Jul 2005 02:38:53 -0700 Received: (qmail 26079 invoked by uid 65534); 19 Jul 2005 09:38:51 -0000 Message-ID: <20050719093851.26067.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r219635 - in /apr/apr/trunk: CHANGES user/unix/groupinfo.c user/unix/userinfo.c Date: Tue, 19 Jul 2005 09:38:49 -0000 To: commits@apr.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.0.2 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: pquerna Date: Tue Jul 19 02:38:36 2005 New Revision: 219635 URL: http://svn.apache.org/viewcvs?rev=219635&view=rev Log: These functions can return no-error, but still contain a NULL entry, on some crazy unix that some people use called Linux. PR: 34053 Modified: apr/apr/trunk/CHANGES apr/apr/trunk/user/unix/groupinfo.c apr/apr/trunk/user/unix/userinfo.c Modified: apr/apr/trunk/CHANGES URL: http://svn.apache.org/viewcvs/apr/apr/trunk/CHANGES?rev=219635&r1=219634&r2=219635&view=diff ============================================================================== --- apr/apr/trunk/CHANGES (original) +++ apr/apr/trunk/CHANGES Tue Jul 19 02:38:36 2005 @@ -1,5 +1,8 @@ Changes for APR 1.2.0 + *) If getpwuid_r or getgrgid_r set their results to NULL, it is an error. + PR 34053. [Paul Querna] + *) Switch to lazy initialization of the pollset that's used within apr_file_t on platforms where apr_wait_for_io_or_timeout() doesn't use poll(2). (This fixes a performance problem observed in httpd-2.x Modified: apr/apr/trunk/user/unix/groupinfo.c URL: http://svn.apache.org/viewcvs/apr/apr/trunk/user/unix/groupinfo.c?rev=219635&r1=219634&r2=219635&view=diff ============================================================================== --- apr/apr/trunk/user/unix/groupinfo.c (original) +++ apr/apr/trunk/user/unix/groupinfo.c Tue Jul 19 02:38:36 2005 @@ -37,7 +37,7 @@ struct group grp; char grbuf[512]; - if (getgrgid_r(groupid, &grp, grbuf, sizeof(grbuf), &gr)) { + if (getgrgid_r(groupid, &grp, grbuf, sizeof(grbuf), &gr) || gr == NULL) { #else if ((gr = getgrgid(groupid)) == NULL) { #endif Modified: apr/apr/trunk/user/unix/userinfo.c URL: http://svn.apache.org/viewcvs/apr/apr/trunk/user/unix/userinfo.c?rev=219635&r1=219634&r2=219635&view=diff ============================================================================== --- apr/apr/trunk/user/unix/userinfo.c (original) +++ apr/apr/trunk/user/unix/userinfo.c Tue Jul 19 02:38:36 2005 @@ -115,7 +115,7 @@ struct passwd pwd; char pwbuf[PWBUF_SIZE]; - if (getpwuid_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw)) { + if (getpwuid_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw) || pw == NULL) { #else if ((pw = getpwuid(userid)) == NULL) { #endif