238
238
static void freeLogInfo(struct logInfo *log)
241
240
free(log->pattern);
243
241
free_2d_array(log->files, log->numFiles);
245
242
free(log->oldDir);
251
245
free(log->first);
255
247
free(log->logAddress);
257
248
free(log->extension);
258
if (log->compress_prog)
259
249
free(log->compress_prog);
260
if (log->uncompress_prog)
261
250
free(log->uncompress_prog);
262
if (log->compress_ext)
263
251
free(log->compress_ext);
264
if (log->compress_options_list)
265
252
free(log->compress_options_list);
266
253
free(log->dateformat);
423
412
int i, result = 0;
424
413
const char **file;
425
struct logInfo defConfig = { /* pattern */ NULL,
426
/* files, numFiles */ NULL, 0,
428
/* criterium */ ROT_SIZE,
429
/* threshHold */ 1024 * 1024,
431
/* rotateCount/Age */ 0, 0,
433
/* pre, post */ NULL, NULL,
434
/* first, last */ NULL, NULL,
435
/* logAddress */ NULL,
436
/* extension */ NULL,
437
/* compress_prog */ NULL,
438
/* uncompress_prog */ NULL,
439
/* compress_ext */ NULL,
440
/* dateformat */ NULL,
441
/* flags */ LOG_FLAG_IFEMPTY,
442
/* shred_cycles */ 0,
443
/* createMode/Uid/Gid */ NO_MODE, NO_UID, NO_GID,
444
/* compress_options_list/count */ NULL, 0
414
struct logInfo defConfig = {
419
.criterium = ROT_SIZE,
420
.threshhold = 1024 * 1024,
431
.compress_prog = NULL,
432
.uncompress_prog = NULL,
433
.compress_ext = NULL,
435
.flags = LOG_FLAG_IFEMPTY,
437
.createMode = NO_MODE,
440
.compress_options_list = NULL,
441
.compress_options_count = 0
447
444
tabooExts = malloc(sizeof(*tabooExts) * defTabooCount);
1095
1094
oldchar = *endtag, *endtag = '\0';
1097
1096
message(MESS_DEBUG, "including %s\n", start);
1099
if (readConfigPath(start, defConfig))
1097
if (++recursion_depth > MAX_NESTING) {
1098
message(MESS_ERROR, "%s:%d include nesting too deep\n",
1099
configFile, lineNum);
1103
if (readConfigPath(start, defConfig)) {
1102
1109
*endtag = oldchar, start = endtag;