You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by rb...@covalent.net on 2001/02/21 10:34:43 UTC
RE: mod_userdir segfault (segfault type #3)
I would implement a new APR function that given a username, and returns
the uid/gid. Platforms can return APR_ENOTIMPL, but most will actually
implement something. this should solve the problem cleanly.
Ryan
On Wed, 21 Feb 2001, Cliff Woolley wrote:
> > -----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
>
>
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------