View | Details | Raw Unified | Return to bug 31302
Collapse All | Expand All

(-)mod_cgi.c (-2 / +19 lines)
Lines 419-425 Link Here
419
                                   e_info->err_pipe)) != APR_SUCCESS) ||
419
                                   e_info->err_pipe)) != APR_SUCCESS) ||
420
        ((rc = apr_procattr_dir_set(procattr, 
420
        ((rc = apr_procattr_dir_set(procattr, 
421
                        ap_make_dirstr_parent(r->pool,
421
                        ap_make_dirstr_parent(r->pool,
422
                                              r->filename))) != APR_SUCCESS) ||
422
                                              command))) != APR_SUCCESS) ||
423
#ifdef RLIMIT_CPU
423
#ifdef RLIMIT_CPU
424
        ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU,
424
        ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU,
425
                                      conf->limit_cpu)) != APR_SUCCESS) ||
425
                                      conf->limit_cpu)) != APR_SUCCESS) ||
Lines 1124-1129 Link Here
1124
    char *file = r->filename;
1124
    char *file = r->filename;
1125
    apr_bucket  *tmp_buck;
1125
    apr_bucket  *tmp_buck;
1126
    char parsed_string[MAX_STRING_LEN];
1126
    char parsed_string[MAX_STRING_LEN];
1127
    char *cmdpath = NULL;
1128
    apr_status_t rv;
1127
1129
1128
    *inserted_head = NULL;
1130
    *inserted_head = NULL;
1129
    if (ctx->flags & FLAG_PRINTING) {
1131
    if (ctx->flags & FLAG_PRINTING) {
Lines 1146-1152 Link Here
1146
                if (!strcmp(tag, "cmd")) {
1148
                if (!strcmp(tag, "cmd")) {
1147
                    cgi_pfn_ps(r, ctx, tag_val, parsed_string,
1149
                    cgi_pfn_ps(r, ctx, tag_val, parsed_string,
1148
                               sizeof(parsed_string), 1);
1150
                               sizeof(parsed_string), 1);
1149
                    if (include_cmd(ctx, bb, parsed_string, r, f) == -1) {
1151
                    if (ap_os_is_path_absolute(r->pool, parsed_string)) {
1152
                        cmdpath = apr_pstrdup(r->pool, parsed_string);
1153
                    }
1154
                    else {
1155
                        if ((rv = apr_filepath_merge(&cmdpath,
1156
                                  ap_make_dirstr_parent(r->pool, r->filename),
1157
                                  parsed_string, APR_FILEPATH_NOTRELATIVE,
1158
                                  r->pool)) != APR_SUCCESS) {
1159
                            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
1160
                                          "could not determine absolute "
1161
                                          "pathname for %s", parsed_string);
1162
                            CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr,
1163
                                                *inserted_head);
1164
                        }
1165
                    }
1166
                    if (include_cmd(ctx, bb, cmdpath, r, f) == -1) {
1150
                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
1167
                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
1151
                                    "execution failure for parameter \"%s\" "
1168
                                    "execution failure for parameter \"%s\" "
1152
                                    "to tag exec in file %s", tag, r->filename);
1169
                                    "to tag exec in file %s", tag, r->filename);

Return to bug 31302