Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 70548 invoked by uid 500); 21 Feb 2001 17:18:56 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 70527 invoked from network); 21 Feb 2001 17:18:52 -0000 From: Cliff Woolley To: new-httpd@apache.org MMDF-Warning: Parse error in original version of preceding line at mail.virginia.edu Cc: dev@apr.apache.org MMDF-Warning: Parse error in original version of preceding line at mail.virginia.edu Subject: RE: mod_userdir segfault (segfault type #3) Date: Wed, 21 Feb 2001 12:15:12 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Importance: Normal X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > -----Original Message----- > There is a bug report about this too. Please fix it. :-) There's a patch in the PR (actually very similar to what Manoj originally committed with the function and later removed). But it's not threadsafe (which seems to be why Manoj removed it in the first place). My first thought would be to take the code in APR's apr_get_user_directory() (in userinfo.c) that figures out which getpwnam to use and split out into its own function, apr_getpwnam(). But getpwnam seems to be an inherently Unix thing... so what does that mean for Win32? Just return APR_ENOTIMPL? What about the parameter list, which would include a 'passwd **'? Should it be a 'void **' on Win32? Or should I leave the function completely undefined on Win32? Alternatively, we could just duplicate the little bit of #ifdef magic from apr_get_user_directory() that figures out which version of getpwnam() is threadsafe and pull it into mod_userdir... but that doesn't seem like a very APR-ish way to do things. Thoughts? --Cliff