Loading CHANGES +3 −0 Changes for CHANGES: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ Changes with Apache 2.3.15 PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener, <lowprio20 gmail.com>] *) Fix cross-compilation of mod_cgi/mod_cgid when APR_HAVE_STRUCT_RLIMIT is false but RLIMIT_* are defined. PR51371. [Eric Covener] *) core: Correctly obey ServerName / ServerAlias if the Host header from the request matches the VirtualHost address. PR 51709. [Micha Lenk <micha lenk.info>] Loading modules/generators/mod_cgi.c +10 −6 Changes for modules/generators/mod_cgi.c: 10 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -53,6 +53,12 @@ #include "mod_core.h" #include "mod_cgi.h" #if APR_HAVE_STRUCT_RLIMIT #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #define AP_CGI_USE_RLIMIT #endif #endif module AP_MODULE_DECLARE_DATA cgi_module; static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *cgi_pfn_reg_with_ssi; Loading Loading @@ -382,9 +388,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, apr_proc_t *procnew; apr_status_t rc = APR_SUCCESS; #if defined(RLIMIT_CPU) || defined(RLIMIT_NPROC) || \ defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS) #ifdef AP_CGI_USE_RLIMIT core_dir_config *conf = ap_get_core_module_config(r->per_dir_config); #endif Loading Loading @@ -424,15 +428,15 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || #ifdef RLIMIT_CPU #if defined(RLIMIT_CPU) && defined(AP_CGI_USE_RLIMIT) ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU, conf->limit_cpu)) != APR_SUCCESS) || #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #if defined(AP_CGI_USE_RLIMIT) && (defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)) ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_MEM, conf->limit_mem)) != APR_SUCCESS) || #endif #ifdef RLIMIT_NPROC #if RLIMIT_NPROC && defined(AP_CGI_USE_RLIMIT) ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC, conf->limit_nproc)) != APR_SUCCESS) || #endif Loading modules/generators/mod_cgid.c +14 −7 Changes for modules/generators/mod_cgid.c: 14 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ #include <sys/stat.h> #include <sys/un.h> /* for sockaddr_un */ #if APR_HAVE_STRUCT_RLIMIT #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #define AP_CGID_USE_RLIMIT #endif #endif module AP_MODULE_DECLARE_DATA cgid_module; Loading Loading @@ -168,7 +173,7 @@ typedef struct { int bufbytes; } cgid_server_conf; #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT typedef struct { #ifdef RLIMIT_CPU int limit_cpu_set; Loading Loading @@ -203,7 +208,7 @@ typedef struct { apr_size_t args_len; int loglevel; /* to stuff in server_rec */ #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT cgid_rlimit_t limits; #endif } cgid_req_t; Loading Loading @@ -459,7 +464,7 @@ static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env, } *env = environ; #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT if ((stat = sock_read(fd, &(req->limits), sizeof(cgid_rlimit_t))) != APR_SUCCESS) return stat; #endif Loading Loading @@ -524,7 +529,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, return stat; } } #ifdef RLIMIT_CPU #if defined(RLIMIT_CPU) && defined(AP_CGID_USE_RLIMIT) if (core_conf->limit_cpu) { req.limits.limit_cpu = *(core_conf->limit_cpu); req.limits.limit_cpu_set = 1; Loading @@ -534,7 +539,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, } #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #if defined(AP_CGID_USE_RLIMIT) && (defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)) if (core_conf->limit_mem) { req.limits.limit_mem = *(core_conf->limit_mem); req.limits.limit_mem_set = 1; Loading @@ -545,7 +550,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, #endif #ifdef RLIMIT_NPROC #if defined(RLIMIT_NPROC) && defined(AP_CGID_USE_RLIMIT) if (core_conf->limit_nproc) { req.limits.limit_nproc = *(core_conf->limit_nproc); req.limits.limit_nproc_set = 1; Loading @@ -555,7 +560,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, } #endif #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT if ( (stat = sock_write(fd, &(req.limits), sizeof(cgid_rlimit_t))) != APR_SUCCESS) return stat; #endif Loading Loading @@ -761,6 +766,7 @@ static int cgid_server(void *data) ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) || #ifdef AP_CGID_USE_RLIMIT #ifdef RLIMIT_CPU ( (cgid_req.limits.limit_cpu_set) && ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU, &cgid_req.limits.limit_cpu)) != APR_SUCCESS)) || Loading @@ -772,6 +778,7 @@ static int cgid_server(void *data) #ifdef RLIMIT_NPROC ( (cgid_req.limits.limit_nproc_set) && ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC, &cgid_req.limits.limit_nproc)) != APR_SUCCESS)) || #endif #endif ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS)) { Loading Loading
CHANGES +3 −0 Changes for CHANGES: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ Changes with Apache 2.3.15 PR 51714. [Stefan Fritsch, Jim Jagielski, Ruediger Pluem, Eric Covener, <lowprio20 gmail.com>] *) Fix cross-compilation of mod_cgi/mod_cgid when APR_HAVE_STRUCT_RLIMIT is false but RLIMIT_* are defined. PR51371. [Eric Covener] *) core: Correctly obey ServerName / ServerAlias if the Host header from the request matches the VirtualHost address. PR 51709. [Micha Lenk <micha lenk.info>] Loading
modules/generators/mod_cgi.c +10 −6 Changes for modules/generators/mod_cgi.c: 10 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -53,6 +53,12 @@ #include "mod_core.h" #include "mod_cgi.h" #if APR_HAVE_STRUCT_RLIMIT #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #define AP_CGI_USE_RLIMIT #endif #endif module AP_MODULE_DECLARE_DATA cgi_module; static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *cgi_pfn_reg_with_ssi; Loading Loading @@ -382,9 +388,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, apr_proc_t *procnew; apr_status_t rc = APR_SUCCESS; #if defined(RLIMIT_CPU) || defined(RLIMIT_NPROC) || \ defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined (RLIMIT_AS) #ifdef AP_CGI_USE_RLIMIT core_dir_config *conf = ap_get_core_module_config(r->per_dir_config); #endif Loading Loading @@ -424,15 +428,15 @@ static apr_status_t run_cgi_child(apr_file_t **script_out, ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || #ifdef RLIMIT_CPU #if defined(RLIMIT_CPU) && defined(AP_CGI_USE_RLIMIT) ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU, conf->limit_cpu)) != APR_SUCCESS) || #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #if defined(AP_CGI_USE_RLIMIT) && (defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)) ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_MEM, conf->limit_mem)) != APR_SUCCESS) || #endif #ifdef RLIMIT_NPROC #if RLIMIT_NPROC && defined(AP_CGI_USE_RLIMIT) ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC, conf->limit_nproc)) != APR_SUCCESS) || #endif Loading
modules/generators/mod_cgid.c +14 −7 Changes for modules/generators/mod_cgid.c: 14 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ #include <sys/stat.h> #include <sys/un.h> /* for sockaddr_un */ #if APR_HAVE_STRUCT_RLIMIT #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #define AP_CGID_USE_RLIMIT #endif #endif module AP_MODULE_DECLARE_DATA cgid_module; Loading Loading @@ -168,7 +173,7 @@ typedef struct { int bufbytes; } cgid_server_conf; #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT typedef struct { #ifdef RLIMIT_CPU int limit_cpu_set; Loading Loading @@ -203,7 +208,7 @@ typedef struct { apr_size_t args_len; int loglevel; /* to stuff in server_rec */ #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT cgid_rlimit_t limits; #endif } cgid_req_t; Loading Loading @@ -459,7 +464,7 @@ static apr_status_t get_req(int fd, request_rec *r, char **argv0, char ***env, } *env = environ; #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT if ((stat = sock_read(fd, &(req->limits), sizeof(cgid_rlimit_t))) != APR_SUCCESS) return stat; #endif Loading Loading @@ -524,7 +529,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, return stat; } } #ifdef RLIMIT_CPU #if defined(RLIMIT_CPU) && defined(AP_CGID_USE_RLIMIT) if (core_conf->limit_cpu) { req.limits.limit_cpu = *(core_conf->limit_cpu); req.limits.limit_cpu_set = 1; Loading @@ -534,7 +539,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, } #endif #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #if defined(AP_CGID_USE_RLIMIT) && (defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)) if (core_conf->limit_mem) { req.limits.limit_mem = *(core_conf->limit_mem); req.limits.limit_mem_set = 1; Loading @@ -545,7 +550,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, #endif #ifdef RLIMIT_NPROC #if defined(RLIMIT_NPROC) && defined(AP_CGID_USE_RLIMIT) if (core_conf->limit_nproc) { req.limits.limit_nproc = *(core_conf->limit_nproc); req.limits.limit_nproc_set = 1; Loading @@ -555,7 +560,7 @@ static apr_status_t send_req(int fd, request_rec *r, char *argv0, char **env, } #endif #if defined (RLIMIT_CPU) || defined (RLIMIT_NPROC) || defined (RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS) #ifdef AP_CGID_USE_RLIMIT if ( (stat = sock_write(fd, &(req.limits), sizeof(cgid_rlimit_t))) != APR_SUCCESS) return stat; #endif Loading Loading @@ -761,6 +766,7 @@ static int cgid_server(void *data) ((rc = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS) || ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) || #ifdef AP_CGID_USE_RLIMIT #ifdef RLIMIT_CPU ( (cgid_req.limits.limit_cpu_set) && ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU, &cgid_req.limits.limit_cpu)) != APR_SUCCESS)) || Loading @@ -772,6 +778,7 @@ static int cgid_server(void *data) #ifdef RLIMIT_NPROC ( (cgid_req.limits.limit_nproc_set) && ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC, &cgid_req.limits.limit_nproc)) != APR_SUCCESS)) || #endif #endif ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS)) { Loading