apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject RE: mod_userdir segfault (segfault type #3)
Date Wed, 21 Feb 2001 17:15:12 GMT
> -----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


Mime
View raw message