diff src/core/ngx_file.c @ 218:1bf60f8c5c9e NGINX_0_3_56

nginx 0.3.56 *) Feature: the "dav_access" directive. *) Feature: the "if" directive supports the "-d", "!-d", "-e", "!-e", "-x", and "!-x" operators. *) Bugfix: a segmentation fault occurred if an request returned an redirect and some sent to client header lines were logged in the access log.
author Igor Sysoev <http://sysoev.ru>
date Fri, 04 Aug 2006 00:00:00 +0400
parents fa32d59d9a15
children fbf2b2f66c9f
line wrap: on
line diff
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -166,7 +166,7 @@ ngx_create_path(ngx_file_t *file, ngx_pa
         ngx_log_debug1(NGX_LOG_DEBUG_CORE, file->log, 0,
                        "temp file: \"%s\"", file->name.data);
 
-        if (ngx_create_dir(file->name.data) == NGX_FILE_ERROR) {
+        if (ngx_create_dir(file->name.data, 0700) == NGX_FILE_ERROR) {
             err = ngx_errno;
             if (err != NGX_EEXIST) {
                 ngx_log_error(NGX_LOG_CRIT, file->log, err,
@@ -184,7 +184,7 @@ ngx_create_path(ngx_file_t *file, ngx_pa
 
 
 ngx_err_t
-ngx_create_full_path(u_char *dir)
+ngx_create_full_path(u_char *dir, ngx_uint_t access)
 {
     u_char     *p, ch;
     ngx_err_t   err;
@@ -198,7 +198,7 @@ ngx_create_full_path(u_char *dir)
 
         *p = '\0';
 
-        if (ngx_create_dir(dir) == NGX_FILE_ERROR) {
+        if (ngx_create_dir(dir, access) == NGX_FILE_ERROR) {
             err = ngx_errno;
             if (err != NGX_EEXIST) {
                 return err;
@@ -370,7 +370,7 @@ ngx_create_pathes(ngx_cycle_t *cycle, ng
     path = cycle->pathes.elts;
     for (i = 0; i < cycle->pathes.nelts; i++) {
 
-        if (ngx_create_dir(path[i]->name.data) == NGX_FILE_ERROR) {
+        if (ngx_create_dir(path[i]->name.data, 0700) == NGX_FILE_ERROR) {
             err = ngx_errno;
             if (err != NGX_EEXIST) {
                 ngx_log_error(NGX_LOG_EMERG, cycle->log, err,