Mercurial > hg > nginx-vendor-1-0
comparison src/core/nginx.c @ 318:fc223117327f NGINX_0_6_3
nginx 0.6.3
*) Feature: the "proxy_store" and "fastcgi_store" directives.
*) Bugfix: a segmentation fault might occur in worker process if the
"auth_http_header" directive was used.
Thanks to Maxim Dounin.
*) Bugfix: a segmentation fault occurred in worker process if the
CRAM-MD5 authentication method was used, but it was not enabled.
*) Bugfix: a segmentation fault might occur in worker process when the
HTTPS protocol was used in the "proxy_pass" directive.
*) Bugfix: a segmentation fault might occur in worker process if the
eventport method was used.
*) Bugfix: the "proxy_ignore_client_abort" and
"fastcgi_ignore_client_abort" directives did not work; bug appeared
in 0.5.13.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 12 Jul 2007 00:00:00 +0400 |
parents | fa73fb2d9427 |
children | d16d691432c9 |
comparison
equal
deleted
inserted
replaced
317:fcdf0e42c859 | 318:fc223117327f |
---|---|
794 | 794 |
795 #if !(NGX_WIN32) | 795 #if !(NGX_WIN32) |
796 | 796 |
797 if (ccf->user == (uid_t) NGX_CONF_UNSET_UINT && geteuid() == 0) { | 797 if (ccf->user == (uid_t) NGX_CONF_UNSET_UINT && geteuid() == 0) { |
798 | 798 |
799 ngx_set_errno(0); | |
799 pwd = getpwnam(NGX_USER); | 800 pwd = getpwnam(NGX_USER); |
800 if (pwd == NULL) { | 801 if (pwd == NULL) { |
801 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, | 802 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, |
802 "getpwnam(\"" NGX_USER "\") failed"); | 803 "getpwnam(\"" NGX_USER "\") failed"); |
803 return NGX_CONF_ERROR; | 804 return NGX_CONF_ERROR; |
804 } | 805 } |
805 | 806 |
806 ccf->username = NGX_USER; | 807 ccf->username = NGX_USER; |
807 ccf->user = pwd->pw_uid; | 808 ccf->user = pwd->pw_uid; |
808 | 809 |
810 ngx_set_errno(0); | |
809 grp = getgrnam(NGX_GROUP); | 811 grp = getgrnam(NGX_GROUP); |
810 if (grp == NULL) { | 812 if (grp == NULL) { |
811 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, | 813 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, |
812 "getgrnam(\"" NGX_GROUP "\") failed"); | 814 "getgrnam(\"" NGX_GROUP "\") failed"); |
813 return NGX_CONF_ERROR; | 815 return NGX_CONF_ERROR; |
918 | 920 |
919 value = (ngx_str_t *) cf->args->elts; | 921 value = (ngx_str_t *) cf->args->elts; |
920 | 922 |
921 ccf->username = (char *) value[1].data; | 923 ccf->username = (char *) value[1].data; |
922 | 924 |
925 ngx_set_errno(0); | |
923 pwd = getpwnam((const char *) value[1].data); | 926 pwd = getpwnam((const char *) value[1].data); |
924 if (pwd == NULL) { | 927 if (pwd == NULL) { |
925 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, | 928 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, |
926 "getpwnam(\"%s\") failed", value[1].data); | 929 "getpwnam(\"%s\") failed", value[1].data); |
927 return NGX_CONF_ERROR; | 930 return NGX_CONF_ERROR; |
929 | 932 |
930 ccf->user = pwd->pw_uid; | 933 ccf->user = pwd->pw_uid; |
931 | 934 |
932 group = (char *) ((cf->args->nelts == 2) ? value[1].data : value[2].data); | 935 group = (char *) ((cf->args->nelts == 2) ? value[1].data : value[2].data); |
933 | 936 |
937 ngx_set_errno(0); | |
934 grp = getgrnam(group); | 938 grp = getgrnam(group); |
935 if (grp == NULL) { | 939 if (grp == NULL) { |
936 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, | 940 ngx_conf_log_error(NGX_LOG_EMERG, cf, ngx_errno, |
937 "getgrnam(\"%s\") failed", group); | 941 "getgrnam(\"%s\") failed", group); |
938 return NGX_CONF_ERROR; | 942 return NGX_CONF_ERROR; |