Navigation


Changeset 969:6808de455810 in freeDiameter


Ignore:
Timestamp:
Mar 13, 2013, 1:43:30 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Children:
970:ec348f604399, 972:ce3cacbbccc9
Parents:
966:8862d9dece66 (diff), 968:652713ce3596 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Remerged

Location:
libfdcore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/fdd.l

    r965 r969  
    5252        yylloc->first_column = yylloc->last_column + 1;                 \
    5353        yylloc->last_column = yylloc->first_column + yyleng - 1;        \
    54         TRACE_ERROR(                                            \
     54        fd_log_debug(                                                   \
    5555                "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'\n", \
    5656                yylloc->first_line, yylloc->first_column,               \
  • libfdcore/fdd.l

    r968 r969  
    8484int globerrfct(const char *epath, int eerrno)
    8585{
    86         TRACE_DEBUG_ERROR("Failed to scan %s: %s\n", epath, strerror(eerrno));
     86        TRACE_ERROR("Failed to scan %s: %s\n", epath, strerror(eerrno));
    8787        return 1;
    8888}
     
    119119                        if (buf[yyleng-2] != '"')
    120120                        {
    121                                 TRACE_DEBUG_ERROR("Unterminated string: %s\n", yytext);
     121                                TRACE_ERROR("Unterminated string: %s\n", yytext);
    122122                                return LEX_ERROR;
    123123                        }
     
    126126                        if (current_nested_level >= MAX_NESTED_CONF_FILES)
    127127                        {
    128                                 TRACE_DEBUG_ERROR("Too many recursion levels in configuration files includes\n");
     128                                TRACE_ERROR("Too many recursion levels in configuration files includes\n");
    129129                                return LEX_ERROR;
    130130                        }
     
    135135                        if (globerror == GLOB_NOSPACE)
    136136                        {
    137                                 TRACE_DEBUG_ERROR("Not enough memory to parse include directive.\n");
     137                                TRACE_ERROR("Not enough memory to parse include directive.\n");
    138138                                return LEX_ERROR;
    139139                        }
    140140                        if (globerror == GLOB_ABORTED)
    141141                        {
    142                                 TRACE_DEBUG_ERROR("An error was encountered in include directive.\n");
     142                                TRACE_ERROR("An error was encountered in include directive.\n");
    143143                                return LEX_ERROR;
    144144                        }
     
    150150                        if (globerror)
    151151                        {
    152                                 TRACE_DEBUG_ERROR("Unexpected error in glob (%d).\n", globerror);
     152                                TRACE_ERROR("Unexpected error in glob (%d).\n", globerror);
    153153                                return LEX_ERROR;
    154154                        }
     
    166166                        if ( ! yyin )
    167167                        {
    168                                 TRACE_DEBUG_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[0], strerror(errno));
     168                                TRACE_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[0], strerror(errno));
    169169                                return LEX_ERROR;
    170170                        }
     
    206206                                if ( ! yyin )
    207207                                {
    208                                         TRACE_DEBUG_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file], strerror(errno));
     208                                        TRACE_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file], strerror(errno));
    209209                                        return LEX_ERROR;
    210210                                }
     
    234234                                if (ret != 1) {
    235235                                        /* No matching: an error occurred */
    236                                         TRACE_DEBUG_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
     236                                        TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
    237237                                        return LEX_ERROR; /* trig an error in yacc parser */
    238238                                        /* Maybe we could REJECT instead of failing here? */
     
    277277        /* Unrecognized character */
    278278<*>.                    {
    279                                 TRACE_DEBUG_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     279                                TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
    280280                                return LEX_ERROR;
    281281                        }
  • libfdcore/fdd.y

    r965 r969  
    323323                                                { yyerror (&yylloc, conf, "Not enough memory"); YYERROR; } );
    324324                                        sprintf(fname, DEFAULT_EXTENSIONS_PATH "/%s", bkp);
    325                                         free(bkp);
    326325                                        fd = fopen(fname, "r");
    327                                 }
    328                                 if (fd == NULL) {
    329                                         int ret = errno;
    330                                         TRACE_ERROR("WARNING: Unable to open extension file %s for reading: %s\nLD_LIBRARY_PATH will be used.\n", fname, strerror(ret));
    331                                 } else {
     326                                        if (fd == NULL) {
     327                                                free(fname);
     328                                                fname = bkp;
     329                                        } else {
     330                                                free(bkp);
     331                                        }
     332                                }
     333                                if (fd != NULL) {
    332334                                        fclose(fd);
    333                                 }
     335                                } /* otherwise, LD_LIBRARY_PATH will be tested by dl_open.
     336                                This should not give any security issue, otherwise we can add an "else fail" here. */
    334337                               
    335338                                /* Try and open the configuration file (optional) */
  • libfdcore/fdd.y

    r967 r969  
    6363{
    6464        if (ploc->first_line != ploc->last_line) {
    65                 TRACE_DEBUG_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     65                TRACE_ERROR("%s:%d.%d-%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    6666        } else if (ploc->first_column != ploc->last_column) {
    67                 TRACE_DEBUG_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
     67                TRACE_ERROR("%s:%d.%d-%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);
    6868        } else {
    69                 TRACE_DEBUG_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
     69                TRACE_ERROR("%s:%d.%d : %s\n", conf->cnf_file, ploc->first_line, ploc->first_column, s);
    7070        }
    7171}
     
    504504                                if (fd == NULL) {
    505505                                        int ret = errno;
    506                                         TRACE_DEBUG_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));
     506                                        TRACE_ERROR("Unable to open certificate file %s for reading: %s\n", $3, strerror(ret));
    507507                                        yyerror (&yylloc, conf, "Error on file name");
    508508                                        YYERROR;
     
    512512                                if (fd == NULL) {
    513513                                        int ret = errno;
    514                                         TRACE_DEBUG_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret));
     514                                        TRACE_ERROR("Unable to open private key file %s for reading: %s\n", $5, strerror(ret));
    515515                                        yyerror (&yylloc, conf, "Error on file name");
    516516                                        YYERROR;
     
    535535                                if (fd == NULL) {
    536536                                        int ret = errno;
    537                                         TRACE_DEBUG_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret));
     537                                        TRACE_ERROR("Unable to open CA file %s for reading: %s\n", $3, strerror(ret));
    538538                                        yyerror (&yylloc, conf, "Error on file name");
    539539                                        YYERROR;
     
    575575                                if (fd == NULL) {
    576576                                        int ret = errno;
    577                                         TRACE_DEBUG_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));
     577                                        TRACE_ERROR("Unable to open CRL file %s for reading: %s\n", $3, strerror(ret));
    578578                                        yyerror (&yylloc, conf, "Error on file name");
    579579                                        YYERROR;
     
    618618                                                        &err_pos),
    619619                                                { yyerror (&yylloc, conf, "Error setting Priority parameter.");
    620                                                   TRACE_DEBUG_ERROR("Error at position : %s\n", err_pos);
     620                                                  TRACE_ERROR("Error at position : %s\n", err_pos);
    621621                                                  YYERROR; } );
    622622                        }
     
    635635                                if (fd == NULL) {
    636636                                        int ret = errno;
    637                                         TRACE_DEBUG_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret));
     637                                        TRACE_ERROR("Unable to open DH file %s for reading: %s\n", $3, strerror(ret));
    638638                                        yyerror (&yylloc, conf, "Error on file name");
    639639                                        YYERROR;
Note: See TracChangeset for help on using the changeset viewer.