Apache 2.0 STATUS:
-Last modified at [$Date: 2000/11/10 01:35:38 $]
+Last modified at [$Date: 2000/11/10 18:16:51 $]
Release:
BIND v9.
Status: Greg asks, "why? doesn't gethostbyname_r() handle this?"
- * There are still thread-unsafe functions used in the server.
- - getpwnam in mod_userdir
- - more?
-
* Modify mod_cgi and mod_cgid to deal with directories. This allows
a lot of directives to be removed from the core.
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
return DECLINED;
#else /* WIN32 */
struct passwd *pw;
+
+/*#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)*/
+ struct passwd pwd;
+ size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
+ char *buf = apr_pcalloc(r->pool, buflen);
+
+ if (!getpwnam_r(w, &pwd, buf, buflen, &pw)) {
+/*#else
if ((pw = getpwnam(w))) {
+#endif*/
#ifdef OS2
/* Need to manually add user name for OS/2 */
filename = apr_pstrcat(r->pool, pw->pw_dir, w, "/", userdir, NULL);