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

(-)server/core.c.orig (-4 / +10 lines)
Lines 3081-3095 Link Here
3081
                                   const char *arg)
3081
                                   const char *arg)
3082
{
3082
{
3083
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
3083
    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
3084
    apr_status_t rv;
3084
3085
3085
    if (err != NULL) {
3086
    if (err != NULL) {
3086
        return err;
3087
        return err;
3087
    }
3088
    }
3088
3089
3089
    if ((apr_filepath_merge((char**)&ap_server_root, NULL, arg,
3090
    if (((rv = apr_filepath_merge((char**)&ap_server_root, NULL, arg,
3090
                            APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS)
3091
                            APR_FILEPATH_TRUENAME, cmd->pool)) != APR_SUCCESS)
3091
        || !ap_is_directory(cmd->temp_pool, ap_server_root)) {
3092
        || (!ap_is_directory(cmd->temp_pool, ap_server_root)
3092
        return "ServerRoot must be a valid directory";
3093
            && (rv = APR_ENOTDIR)))  /* Deliberately assign rv */
3094
    {
3095
        char buf[256] = "ServerRoot must be a valid directory; \0";
3096
        char len = strlen(buf);
3097
        apr_strerror(rv, buf + len, sizeof(buf) - len - 1);
3098
        return apr_pstrdup(cmd->pool, buf);
3093
    }
3099
    }
3094
3100
3095
    return NULL;
3101
    return NULL;

Return to bug 52817