Changeset 1584
- Timestamp:
- 06/20/08 17:31:02 (4 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/connection.c (modified) (1 diff)
- cherokee/trunk/cherokee/util.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1583 r1584 1 1 2008-06-20 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/util.c (cherokee_getpwnam): Stabilizes the function on 4 Linux and MacOS X. 2 5 3 6 * cherokee/handler_cgi_base.c (xsendfile_add_headers): Fixes the cherokee/trunk/cherokee/connection.c
r1557 r1584 1220 1220 /* Default: it is inside the UserDir in home 1221 1221 */ 1222 ret = cherokee_getpwnam (conn->userdir.buf, &pwd, tmp, 1024);1222 ret = cherokee_getpwnam (conn->userdir.buf, &pwd, tmp, sizeof(tmp)); 1223 1223 if ((ret != ret_ok) || (pwd.pw_dir == NULL)) { 1224 1224 conn->error_code = http_not_found; cherokee/trunk/cherokee/util.c
r1571 r1584 1058 1058 #elif HAVE_GETPWNAM_R_5 1059 1059 int re; 1060 struct passwd *tmp; 1061 1060 struct passwd *tmp = NULL; 1061 1062 /* MacOS X: 1063 * int getpwnam_r (const char *login, 1064 * struct passwd *pwd, 1065 * char *buffer, 1066 * size_t bufsize, 1067 * struct passwd **result); 1068 * 1069 * Linux: 1070 * int getpwnam_r (const char *name, 1071 * struct passwd *pwbuf, 1072 * char *buf, 1073 * size_t buflen, 1074 * struct passwd **pwbufp); 1075 */ 1062 1076 re = getpwnam_r (name, pwbuf, buf, buflen, &tmp); 1063 if (re != 0) return ret_error; 1077 if ((re != 0) || (tmp == NULL)) 1078 return ret_error; 1079 1080 printf ("pwbuf=%p tmp=%p\n", pwbuf, tmp); 1064 1081 1065 1082 return ret_ok;