~ubuntu-branches/ubuntu/natty/sarg/natty

« back to all changes in this revision

Viewing changes to getconf.c

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2009-01-10 18:14:18 UTC
  • mfrom: (3.1.3 lenny)
  • Revision ID: james.westby@ubuntu.com-20090110181418-tffq642drpfiyi6e
Tags: 2.2.5-2
* debian/watch
  - Use SF redirector and make lintian happy

* debian/{rules,compat}
  - Move DH_COMPAT to debian/compat and make lintian happy

* debian/rules
  - Change make clean invocation and make lintian happier
  - Added support for DEB_BUILD_OPTIONS
  - Move documentation files from sarg-php to doc directory
  - Remove hidden file from /etc/squid/languages

* debian/control
  - Removed dependency on bash, now essential
  - Bumped Standard-Version to 3.8.0

* debian/postinst
  - Make postint fail on error

* debian/copyright
  - Added copyright notice
  - Updated maintainer reference

* debian/sarg-reports.1
  - Added man page, thanks to Juan Angulo Moreno (Closes: #481889)

* debian/patches/show_read_statistics.patch
  - Added patch from Vladimir Lettiev fixing segfault with
    show_read_statistics set to no. (Closes: #444845, # 370811)

* debian/patches/totger_patches.patch
  - Added patch from Thomas Bliesener fixing several buffer overflows
    (Closes: #470791)

* debian/patches/opensuse_1_getword_boundary_limit.patch
  - Added patch from OpenSUSE to avoid segfaults in getword() calls

* debian/patches/opensuse_2_enlarge_report_buffers.patch
  - Added patch from OpenSUSE to avoid overflow in report buffers

* debian/patches/opensuse_3_too_small_font_buffer.patch
  - Added patch from OpenSUSE to avoid overflow in font buffer

* debian/patches/opensuse_4_enlarge_log_buffer.patch
  - Added patch from OpenSUSE to avoid overflow in log buffer

* debian/patches/opensuse_5_limit_sprintf.patch
  - Added patch from OpenSUSE to avoid segfaults in sprintf() calls

* debian/patches/opensuse_6_limit_useragent_sprintf.patch
  - Added patch from OpenSUSE to avoid segfaults in sprintf() calls

* debian/patches/opensuse_7_year_assertion.patch
  - Added patch from OpenSUSE to avoid assertion in year parsing

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
{
35
35
 
36
36
      if(strstr(buf,"background_color") != 0) {
37
 
         getword(wbuf,buf,' ');
 
37
         getword(wbuf,sizeof(wbuf),buf,' ');
38
38
         strcpy(BgColor,buf);
39
39
         fixnone(BgColor);
40
40
         return;
42
42
 
43
43
      if(strstr(buf,"text_color") != 0) {
44
44
         if(strstr(buf,"logo_text_color") == 0) {
45
 
            getword(wbuf,buf,' ');
 
45
            getword(wbuf,sizeof(wbuf),buf,' ');
46
46
            strcpy(TxColor,buf);
47
47
            fixnone(TxColor);
48
48
            return;
50
50
      }
51
51
 
52
52
      if(strstr(buf,"text_bgcolor") != 0) {
53
 
         getword(wbuf,buf,' ');
 
53
         getword(wbuf,sizeof(wbuf),buf,' ');
54
54
         strcpy(TxBgColor,buf);
55
55
         fixnone(TxBgColor);
56
56
         return;
57
57
      }
58
58
 
59
59
      if(strstr(buf,"title_color") != 0) {
60
 
         getword(wbuf,buf,' ');
 
60
         getword(wbuf,sizeof(wbuf),buf,' ');
61
61
         strcpy(TiColor,buf);
62
62
         fixnone(TiColor);
63
63
         return;
64
64
      }
65
65
 
66
66
      if(strstr(buf,"logo_image") != 0) {
67
 
         getword(wbuf,buf,' ');
 
67
         getword(wbuf,sizeof(wbuf),buf,' ');
68
68
         strcpy(LogoImage,buf);
69
69
         fixnone(LogoImage);
70
70
         return;
72
72
 
73
73
      if(strstr(buf,"logo_text") != 0) {
74
74
         if(strstr(buf,"logo_text_color") == 0) {
75
 
            getword(wbuf,buf,'"');
76
 
            getword(LogoText,buf,'"');
 
75
            getword(wbuf,sizeof(wbuf),buf,'"');
 
76
            getword(LogoText,sizeof(LogoText),buf,'"');
77
77
            fixnone(LogoText);
78
78
            return;
79
79
         }
80
80
      }
81
81
 
82
82
      if(strstr(buf,"logo_text_color") != 0) {
83
 
         getword(wbuf,buf,' ');
 
83
         getword(wbuf,sizeof(wbuf),buf,' ');
84
84
         strcpy(LogoTextColor,buf);
85
85
         fixnone(LogoTextColor);
86
86
         return;
87
87
      }
88
88
 
89
89
      if(strstr(buf,"background_image") != 0) {
90
 
         getword(wbuf,buf,' ');
 
90
         getword(wbuf,sizeof(wbuf),buf,' ');
91
91
         strcpy(BgImage,buf);
92
92
         fixnone(BgImage);
93
93
         return;
94
94
      }
95
95
 
96
96
      if(strstr(buf,"show_sarg_info") != 0) {
97
 
         getword(wbuf,buf,' ');
 
97
         getword(wbuf,sizeof(wbuf),buf,' ');
98
98
         strcpy(ShowSargInfo,buf);
99
99
         fixnone(ShowSargInfo);
100
100
         return;
101
101
      }
102
102
 
103
103
      if(strstr(buf,"show_sarg_logo") != 0) {
104
 
         getword(wbuf,buf,' ');
 
104
         getword(wbuf,sizeof(wbuf),buf,' ');
105
105
         strcpy(ShowSargLogo,buf);
106
106
         fixnone(ShowSargLogo);
107
107
         return;
108
108
      }
109
109
 
110
110
      if(strstr(buf,"font_face") != 0) {
111
 
         getword(wbuf,buf,' ');
 
111
         getword(wbuf,sizeof(wbuf),buf,' ');
112
112
         strcpy(FontFace,buf);
113
113
         fixnone(FontFace);
114
114
         return;
115
115
      }
116
116
 
117
117
      if(strstr(buf,"header_color") != 0) {
118
 
         getword(wbuf,buf,' ');
 
118
         getword(wbuf,sizeof(wbuf),buf,' ');
119
119
         strcpy(HeaderColor,buf);
120
120
         fixnone(HeaderColor);
121
121
         return;
122
122
      }
123
123
 
124
124
      if(strstr(buf,"header_bgcolor") != 0) {
125
 
         getword(wbuf,buf,' ');
 
125
         getword(wbuf,sizeof(wbuf),buf,' ');
126
126
         strcpy(HeaderBgColor,buf);
127
127
         fixnone(HeaderBgColor);
128
128
         return;
130
130
 
131
131
      if(strstr(buf,"font_size") != 0) {
132
132
         if(strstr(buf,"header_font_size") == 0 && strstr(buf,"title_font_size") == 0) {
133
 
            getword(wbuf,buf,' ');
 
133
            getword(wbuf,sizeof(wbuf),buf,' ');
134
134
            strcpy(FontSize,buf);
135
135
            fixnone(FontSize);
136
136
            return;
138
138
      }
139
139
 
140
140
      if(strstr(buf,"header_font_size") != 0) {
141
 
         getword(wbuf,buf,' ');
 
141
         getword(wbuf,sizeof(wbuf),buf,' ');
142
142
         strcpy(HeaderFontSize,buf);
143
143
         fixnone(HeaderFontSize);
144
144
         return;
145
145
      }
146
146
 
147
147
      if(strstr(buf,"title_font_size") != 0) {
148
 
         getword(wbuf,buf,' ');
 
148
         getword(wbuf,sizeof(wbuf),buf,' ');
149
149
         strcpy(TitleFontSize,buf);
150
150
         fixnone(TitleFontSize);
151
151
         return;
152
152
      }
153
153
 
154
154
      if(strstr(buf,"image_size") != 0) {
155
 
         getword(wbuf,buf,' ');
156
 
         getword(Width,buf,' ');
 
155
         getword(wbuf,sizeof(wbuf),buf,' ');
 
156
         getword(Width,sizeof(Width),buf,' ');
157
157
         strcpy(Height,buf);
158
158
         fixnone(Width);
159
159
         fixnone(Height);
161
161
      }
162
162
 
163
163
      if(strstr(buf,"title") != 0) {
164
 
         getword(wbuf,buf,'"');
165
 
         getword(Title,buf,'"');
 
164
         getword(wbuf,sizeof(wbuf),buf,'"');
 
165
         getword(Title,sizeof(Title),buf,'"');
166
166
         fixnone(Title);
167
167
         return;
168
168
      }
169
169
 
170
170
      if(strstr(buf,"resolve_ip") != 0) {
171
 
         getword(wbuf,buf,' ');
 
171
         getword(wbuf,sizeof(wbuf),buf,' ');
172
172
         strcpy(Ip2Name,buf);
173
173
         fixnone(Ip2Name);
174
174
         return;
175
175
      }
176
176
 
177
177
      if(strstr(buf,"user_ip") != 0) {
178
 
         getword(wbuf,buf,' ');
 
178
         getword(wbuf,sizeof(wbuf),buf,' ');
179
179
         strcpy(UserIp,buf);
180
180
         fixnone(UserIp);
181
181
         return;
182
182
      }
183
183
 
184
184
      if(strstr(buf,"max_elapsed") != 0) {
185
 
         getword(wbuf,buf,' ');
 
185
         getword(wbuf,sizeof(wbuf),buf,' ');
186
186
         strcpy(MaxElapsed,buf);
187
187
         fixnone(MaxElapsed);
188
188
         return;
189
189
      }
190
190
 
191
191
      if(strstr(buf,"date_format") != 0) {
192
 
         getword(wbuf,buf,' ');
 
192
         getword(wbuf,sizeof(wbuf),buf,' ');
193
193
         strncpy(DateFormat,buf,1);
194
194
         fixnone(DateFormat);
195
195
         return;
210
210
      }
211
211
 
212
212
      if(strstr(buf,"topuser_sort_field") != 0) {
213
 
         getword(wbuf,buf,' ');
214
 
         getword(TopuserSortField,buf,' ');
 
213
         getword(wbuf,sizeof(wbuf),buf,' ');
 
214
         getword(TopuserSortField,sizeof(TopuserSortField),buf,' ');
215
215
         strcpy(TopuserSortOrder,buf);
216
216
         fixnone(TopuserSortOrder);
217
217
         return;
218
218
      }
219
219
 
220
220
      if(strstr(buf,"user_sort_field") != 0) {
221
 
         getword(wbuf,buf,' ');
222
 
         getword(UserSortField,buf,' ');
 
221
         getword(wbuf,sizeof(wbuf),buf,' ');
 
222
         getword(UserSortField,sizeof(UserSortField),buf,' ');
223
223
         strcpy(UserSortOrder,buf);
224
224
         fixnone(UserSortOrder);
225
225
         return;
227
227
 
228
228
      if(strstr(buf,"access_log") != 0) {
229
229
         if(strstr(buf,"realtime_access_log_lines") == 0) {
230
 
            getword(wbuf,buf,' ');
 
230
            getword(wbuf,sizeof(wbuf),buf,' ');
231
231
            strcpy(AccessLog,buf);
232
232
            fixnone(AccessLog);
233
233
            return;
235
235
      }
236
236
 
237
237
      if(strstr(buf,"useragent_log") != 0) {
238
 
         getword(wbuf,buf,' ');
 
238
         getword(wbuf,sizeof(wbuf),buf,' ');
239
239
         strcpy(UserAgentLog,buf);
240
240
         fixnone(UserAgentLog);
241
241
         return;
242
242
      }
243
243
 
244
244
      if(strstr(buf,"exclude_hosts") != 0) {
245
 
         getword(wbuf,buf,' ');
 
245
         getword(wbuf,sizeof(wbuf),buf,' ');
246
246
         strcpy(ExcludeHosts,buf);
247
247
         fixnone(ExcludeHosts);
248
248
         return;
249
249
      }
250
250
 
251
251
      if(strstr(buf,"exclude_codes") != 0) {
252
 
         getword(wbuf,buf,' ');
 
252
         getword(wbuf,sizeof(wbuf),buf,' ');
253
253
         strcpy(ExcludeCodes,buf);
254
254
         fixnone(ExcludeCodes);
255
255
         return;
256
256
      }
257
257
 
258
258
      if(strstr(buf,"exclude_users") != 0) {
259
 
         getword(wbuf,buf,' ');
 
259
         getword(wbuf,sizeof(wbuf),buf,' ');
260
260
         strcpy(ExcludeUsers,buf);
261
261
         fixnone(ExcludeUsers);
262
262
         return;
263
263
      }
264
264
 
265
265
      if(strstr(buf,"password") != 0) {
266
 
         getword(wbuf,buf,' ');
 
266
         getword(wbuf,sizeof(wbuf),buf,' ');
267
267
         strcpy(PasswdFile,buf);
268
268
         fixnone(PasswdFile);
269
269
         return;
270
270
      }
271
271
 
272
272
      if(strstr(buf,"temporary_dir") != 0) {
273
 
         getword(wbuf,buf,' ');
 
273
         getword(wbuf,sizeof(wbuf),buf,' ');
274
274
         strcpy(TempDir,buf);
275
275
         fixnone(TempDir);
276
276
         return;
277
277
      }
278
278
 
279
279
      if(strstr(buf,"report_type") != 0) {
280
 
         getword(wbuf,buf,' ');
 
280
         getword(wbuf,sizeof(wbuf),buf,' ');
281
281
         strcpy(ReportType,buf);
282
282
         fixnone(ReportType);
283
283
         return;
285
285
 
286
286
      if(strstr(buf,"output_dir") != 0) {
287
287
         if(strstr(buf,"output_dir_form") == 0) {
288
 
            getword(wbuf,buf,' ');
 
288
            getword(wbuf,sizeof(wbuf),buf,' ');
289
289
            strcpy(OutputDir,buf);
290
290
            fixnone(OutputDir);
291
291
            return;
293
293
      }
294
294
 
295
295
      if(strstr(buf,"output_email") != 0) {
296
 
         getword(wbuf,buf,' ');
 
296
         getword(wbuf,sizeof(wbuf),buf,' ');
297
297
         strcpy(OutputEmail,buf);
298
298
         fixnone(OutputEmail);
299
299
         return;
300
300
      }
301
301
 
302
302
      if(strstr(buf,"per_user_limit") != 0) {
303
 
         getword(wbuf,buf,' ');
304
 
         getword(PerUserLimitFile,buf,' ');
 
303
         getword(wbuf,sizeof(wbuf),buf,' ');
 
304
         getword(PerUserLimitFile,sizeof(PerUserLimitFile),buf,' ');
305
305
         strcpy(PerUserLimit,buf);
306
306
         fixnone(PerUserLimitFile);
307
307
         fixnone(PerUserLimit);
310
310
 
311
311
 
312
312
      if(strstr(buf,"lastlog") != 0) {
313
 
         getword(wbuf,buf,' ');
 
313
         getword(wbuf,sizeof(wbuf),buf,' ');
314
314
         strcpy(LastLog,buf);
315
315
         fixnone(LastLog);
316
316
         return;
317
317
      }
318
318
 
319
319
      if(strstr(buf,"remove_temp_files") != 0) {
320
 
         getword(wbuf,buf,' ');
 
320
         getword(wbuf,sizeof(wbuf),buf,' ');
321
321
         strcpy(RemoveTempFiles,buf);
322
322
         fixnone(RemoveTempFiles);
323
323
         return;
324
324
      }
325
325
 
326
326
      if(strstr(buf,"replace_index") != 0) {
327
 
         getword(wbuf,buf,' ');
 
327
         getword(wbuf,sizeof(wbuf),buf,' ');
328
328
         strcpy(ReplaceIndex,buf);
329
329
         fixnone(ReplaceIndex);
330
330
         return;
331
331
      }      
332
332
 
333
333
      if(strstr(buf,"index_tree") != 0) {
334
 
         getword(wbuf,buf,' ');
 
334
         getword(wbuf,sizeof(wbuf),buf,' ');
335
335
         strcpy(IndexTree,buf);
336
336
         fixnone(IndexTree);
337
337
         return;
339
339
 
340
340
      if(strstr(buf,"index") != 0) {
341
341
         if(strstr(buf,"index_sort_order") == 0) {
342
 
            getword(wbuf,buf,' ');
 
342
            getword(wbuf,sizeof(wbuf),buf,' ');
343
343
            strcpy(Index,buf);
344
344
            fixnone(Index);
345
345
            return;
347
347
      }
348
348
 
349
349
      if(strstr(buf,"overwrite_report") != 0) {
350
 
         getword(wbuf,buf,' ');
 
350
         getword(wbuf,sizeof(wbuf),buf,' ');
351
351
         strcpy(OverwriteReport,buf);
352
352
         fixnone(OverwriteReport);
353
353
         return;
354
354
      }
355
355
 
356
356
      if(strstr(buf,"records_without_userid") != 0) {
357
 
         getword(wbuf,buf,' ');
 
357
         getword(wbuf,sizeof(wbuf),buf,' ');
358
358
         strcpy(RecordsWithoutUser,buf);
359
359
         fixnone(RecordsWithoutUser);
360
360
         return;
361
361
      }
362
362
 
363
363
      if(strstr(buf,"use_comma") != 0) {
364
 
         getword(wbuf,buf,' ');
 
364
         getword(wbuf,sizeof(wbuf),buf,' ');
365
365
         strcpy(UseComma,buf);
366
366
         fixnone(UseComma);
367
367
         return;
368
368
      }
369
369
 
370
370
      if(strstr(buf,"mail_utility") != 0) {
371
 
         getword(wbuf,buf,' ');
 
371
         getword(wbuf,sizeof(wbuf),buf,' ');
372
372
         strcpy(MailUtility,buf);
373
373
         fixnone(MailUtility);
374
374
         return;
375
375
      }
376
376
 
377
377
      if(strstr(buf,"topsites_num") != 0) {
378
 
         getword(wbuf,buf,' ');
 
378
         getword(wbuf,sizeof(wbuf),buf,' ');
379
379
         strcpy(TopSitesNum,buf);
380
380
         fixnone(TopSitesNum);
381
381
         return;
382
382
      }
383
383
 
384
384
      if(strstr(buf,"topuser_num") != 0) {
385
 
         getword(wbuf,buf,' ');
 
385
         getword(wbuf,sizeof(wbuf),buf,' ');
386
386
         strcpy(TopUsersNum,buf);
387
387
         fixnone(TopUsersNum);
388
388
         return;
389
389
      }
390
390
 
391
391
      if(strstr(buf,"usertab") != 0) {
392
 
         getword(wbuf,buf,' ');
 
392
         getword(wbuf,sizeof(wbuf),buf,' ');
393
393
         strcpy(UserTabFile,buf);
394
394
         fixnone(UserTabFile);
395
395
         return;
396
396
      }
397
397
 
398
398
      if(strstr(buf,"index_sort_order") != 0) {
399
 
         getword(wbuf,buf,' ');
 
399
         getword(wbuf,sizeof(wbuf),buf,' ');
400
400
         strcpy(IndexSortOrder,buf);
401
401
         fixnone(IndexSortOrder);
402
402
         return;
403
403
      }
404
404
 
405
405
      if(strstr(buf,"topsites_sort_order") != 0) {
406
 
         getword(wbuf,buf,' ');
407
 
         getword(TopsitesSortField,buf,' ');
 
406
         getword(wbuf,sizeof(wbuf),buf,' ');
 
407
         getword(TopsitesSortField,sizeof(TopsitesSortField),buf,' ');
408
408
         strcpy(TopsitesSortType,buf);
409
409
         fixnone(TopsitesSortField);
410
410
         fixnone(TopsitesSortType);
412
412
      }
413
413
 
414
414
      if(strstr(buf,"long_url") != 0) {
415
 
         getword(wbuf,buf,' ');
 
415
         getword(wbuf,sizeof(wbuf),buf,' ');
416
416
         strcpy(LongUrl,buf);
417
417
         fixnone(LongUrl);
418
418
         return;
419
419
      }
420
420
 
421
421
      if(strstr(buf,"language") != 0) {
422
 
         getword(wbuf,buf,' ');
 
422
         getword(wbuf,sizeof(wbuf),buf,' ');
423
423
         strcpy(language,buf);
424
424
         fixnone(language);
425
425
         return;
426
426
      }
427
427
 
428
428
      if(strstr(buf,"dansguardian_conf") != 0) {
429
 
         getword(wbuf,buf,' ');
 
429
         getword(wbuf,sizeof(wbuf),buf,' ');
430
430
         strcpy(DansGuardianConf,buf);
431
431
         fixnone(DansGuardianConf);
432
432
         return;
433
433
      }
434
434
 
435
435
      if(strstr(buf,"squidguard_conf") != 0) {
436
 
         getword(wbuf,buf,' ');
 
436
         getword(wbuf,sizeof(wbuf),buf,' ');
437
437
         strcpy(SquidGuardConf,buf);
438
438
         fixnone(SquidGuardConf);
439
439
         return;
440
440
      }
441
441
 
442
442
      if(strstr(buf,"date_time_by") != 0) {
443
 
         getword(wbuf,buf,' ');
 
443
         getword(wbuf,sizeof(wbuf),buf,' ');
444
444
         strcpy(datetimeby,buf);
445
445
         fixnone(datetimeby);
446
446
         return;
447
447
      }
448
448
 
449
449
      if(strstr(buf,"charset") != 0) {
450
 
         getword(wbuf,buf,' ');
 
450
         getword(wbuf,sizeof(wbuf),buf,' ');
451
451
         strcpy(CharSet,buf);
452
452
         fixnone(CharSet);
453
453
         ccharset(CharSet);
455
455
      }
456
456
 
457
457
      if(strstr(buf,"user_invalid_char") != 0) {
458
 
         getword(wbuf,buf,'"');
459
 
         getword(UserInvalidChar,buf,'"');
 
458
         getword(wbuf,sizeof(wbuf),buf,'"');
 
459
         getword(UserInvalidChar,sizeof(UserInvalidChar),buf,'"');
460
460
         fixnone(UserInvalidChar);
461
461
         return;
462
462
      }
463
463
 
464
464
      if(strstr(buf,"include_users") != 0) {
465
 
         getword(wbuf,buf,'"');
466
 
         getword(wbuf,buf,'"');
 
465
         getword(wbuf,sizeof(wbuf),buf,'"');
 
466
         getword(wbuf,sizeof(wbuf),buf,'"');
467
467
         sprintf(IncludeUsers,":%s:",wbuf);
468
468
         fixnone(IncludeUsers);
469
469
         return;
470
470
      }
471
471
 
472
472
      if(strstr(buf,"exclude_string") != 0) {
473
 
         getword(wbuf,buf,'"');
474
 
         getword(ExcludeString,buf,'"');
 
473
         getword(wbuf,sizeof(wbuf),buf,'"');
 
474
         getword(ExcludeString,sizeof(ExcludeString),buf,'"');
475
475
         fixnone(ExcludeString);
476
476
         return;
477
477
      }
479
479
      if(strstr(buf,"privacy") != 0) {
480
480
         if(strstr(buf,"privacy_string") == 0 && \
481
481
            strstr(buf,"privacy_string_color") == 0) {
482
 
            getword(wbuf,buf,' ');
 
482
            getword(wbuf,sizeof(wbuf),buf,' ');
483
483
            strcpy(Privacy,buf);
484
484
            fixnone(Privacy);
485
485
            return;
488
488
 
489
489
      if(strstr(buf,"privacy_string") != 0) {
490
490
         if(strstr(buf,"privacy_string_color") == 0) {
491
 
            getword(wbuf,buf,'"');
492
 
            getword(PrivacyString,buf,'"');
 
491
            getword(wbuf,sizeof(wbuf),buf,'"');
 
492
            getword(PrivacyString,sizeof(PrivacyString),buf,'"');
493
493
            fixnone(PrivacyString);
494
494
            return;
495
495
         }
496
496
      }
497
497
 
498
498
      if(strstr(buf,"privacy_string_color") != 0) {
499
 
         getword(wbuf,buf,' ');
 
499
         getword(wbuf,sizeof(wbuf),buf,' ');
500
500
         strcpy(PrivacyStringColor,buf);
501
501
         fixnone(PrivacyStringColor);
502
502
         return;
503
503
      }
504
504
 
505
505
      if(strstr(buf,"show_successful_message") != 0) {
506
 
         getword(wbuf,buf,' ');
 
506
         getword(wbuf,sizeof(wbuf),buf,' ');
507
507
         strcpy(SuccessfulMsg,buf);
508
508
         fixnone(SuccessfulMsg);
509
509
         return;
510
510
      }
511
511
 
512
512
      if(strstr(buf,"show_read_statistics") != 0) {
513
 
         getword(wbuf,buf,' ');
 
513
         getword(wbuf,sizeof(wbuf),buf,' ');
514
514
         strcpy(ShowReadStatistics,buf);
515
515
         fixnone(ShowReadStatistics);
516
516
         return;
517
517
      }
518
518
 
519
519
      if(strstr(buf,"topuser_fields") != 0) {
520
 
         getword(wbuf,buf,' ');
 
520
         getword(wbuf,sizeof(wbuf),buf,' ');
521
521
         strcpy(TopUserFields,buf);
522
522
         fixnone(TopUserFields);
523
523
         return;
524
524
      }
525
525
 
526
526
      if(strstr(buf,"bytes_in_sites_users_report") != 0) {
527
 
         getword(wbuf,buf,' ');
 
527
         getword(wbuf,sizeof(wbuf),buf,' ');
528
528
         strcpy(BytesInSitesUsersReport,buf);
529
529
         fixnone(BytesInSitesUsersReport);
530
530
         return;
531
531
      }
532
532
 
533
533
      if(strstr(buf,"user_report_fields") != 0) {
534
 
         getword(wbuf,buf,' ');
 
534
         getword(wbuf,sizeof(wbuf),buf,' ');
535
535
         strcpy(UserReportFields,buf);
536
536
         fixnone(UserReportFields);
537
537
         return;
538
538
      }
539
539
 
540
540
      if(strstr(buf,"bytes_in_sites_users_report") != 0) {
541
 
         getword(wbuf,buf,' ');
 
541
         getword(wbuf,sizeof(wbuf),buf,' ');
542
542
         strcpy(BytesInSitesUsersReport,buf);
543
543
         fixnone(BytesInSitesUsersReport);
544
544
         return;
545
545
      }
546
546
 
547
547
      if(strstr(buf,"datafile ") != 0) {
548
 
         getword(wbuf,buf,' ');
 
548
         getword(wbuf,sizeof(wbuf),buf,' ');
549
549
         strcpy(DataFile,buf);
550
550
         fixnone(DataFile);
551
551
         return;
552
552
      }
553
553
 
554
554
      if(strstr(buf,"datafile_delimiter") != 0) {
555
 
         getword(wbuf,buf,' ');
556
 
         getword(wbuf,buf,'"');
557
 
         getword(DataFileDelimiter,buf,'"');
 
555
         getword(wbuf,sizeof(wbuf),buf,' ');
 
556
         getword(wbuf,sizeof(wbuf),buf,'"');
 
557
         getword(DataFileDelimiter,sizeof(DataFileDelimiter),buf,'"');
558
558
         fixnone(DataFileDelimiter);
559
559
         return;
560
560
      }
561
561
 
562
562
      if(strstr(buf,"datafile_fields") != 0) {
563
 
         getword(wbuf,buf,' ');
 
563
         getword(wbuf,sizeof(wbuf),buf,' ');
564
564
         strcpy(DataFileFields,buf);
565
565
         fixnone(DataFileFields);
566
566
         return;
567
567
      }
568
568
 
569
569
      if(strstr(buf,"datafile_url") != 0) {
570
 
         getword(wbuf,buf,' ');
 
570
         getword(wbuf,sizeof(wbuf),buf,' ');
571
571
         strcpy(DataFileUrl,buf);
572
572
         fixnone(DataFileUrl);
573
573
         return;
575
575
 
576
576
      if(strstr(buf,"parsed_output_log") != 0) {
577
577
         if(strstr(buf,"parsed_output_log_compress") == 0) {
578
 
            getword(wbuf,buf,' ');
 
578
            getword(wbuf,sizeof(wbuf),buf,' ');
579
579
            strcpy(ParsedOutputLog,buf);
580
580
            fixnone(ParsedOutputLog);
581
581
            return;
583
583
      }
584
584
 
585
585
      if(strstr(buf,"parsed_output_log_compress") != 0) {
586
 
         getword(wbuf,buf,' ');
 
586
         getword(wbuf,sizeof(wbuf),buf,' ');
587
587
         strcpy(ParsedOutputLogCompress,buf);
588
588
         fixnone(ParsedOutputLogCompress);
589
589
         return;
590
590
      }
591
591
 
592
592
      if(strstr(buf,"displayed_values") != 0) {
593
 
         getword(wbuf,buf,' ');
 
593
         getword(wbuf,sizeof(wbuf),buf,' ');
594
594
         strcpy(DisplayedValues,buf);
595
595
         fixnone(DisplayedValues);
596
596
         return;
597
597
      }
598
598
 
599
599
      if(strstr(buf,"authfail_report_limit") != 0) {
600
 
         getword(wbuf,buf,' ');
 
600
         getword(wbuf,sizeof(wbuf),buf,' ');
601
601
         AuthfailReportLimit=atoi(buf);
602
602
         return;
603
603
      }
604
604
 
605
605
      if(strstr(buf,"denied_report_limit") != 0) {
606
 
         getword(wbuf,buf,' ');
 
606
         getword(wbuf,sizeof(wbuf),buf,' ');
607
607
         DeniedReportLimit=atoi(buf);
608
608
         return;
609
609
      }
610
610
 
611
611
      if(strstr(buf,"siteusers_report_limit") != 0) {
612
 
         getword(wbuf,buf,' ');
 
612
         getword(wbuf,sizeof(wbuf),buf,' ');
613
613
         SiteUsersReportLimit=atoi(buf);
614
614
         return;
615
615
      }
616
616
 
617
617
      if(strstr(buf,"dansguardian_report_limit") != 0) {
618
 
         getword(wbuf,buf,' ');
 
618
         getword(wbuf,sizeof(wbuf),buf,' ');
619
619
         DansGuardianReportLimit=atoi(buf);
620
620
         return;
621
621
      }
622
622
 
623
623
      if(strstr(buf,"squidguard_report_limit") != 0) {
624
 
         getword(wbuf,buf,' ');
 
624
         getword(wbuf,sizeof(wbuf),buf,' ');
625
625
         SquidGuardReportLimit=atoi(buf);
626
626
         return;
627
627
      }
628
628
 
629
629
      if(strstr(buf,"user_report_limit") != 0) {
630
 
         getword(wbuf,buf,' ');
 
630
         getword(wbuf,sizeof(wbuf),buf,' ');
631
631
         UserReportLimit=atoi(buf);
632
632
         return;
633
633
      }
634
634
 
635
635
      if(strstr(buf,"download_report_limit") != 0) {
636
 
         getword(wbuf,buf,' ');
 
636
         getword(wbuf,sizeof(wbuf),buf,' ');
637
637
         DownloadReportLimit=atoi(buf);
638
638
         return;
639
639
      }
640
640
 
641
641
      if(strstr(buf,"www_document_root") != 0) {
642
 
         getword(wbuf,buf,' ');
 
642
         getword(wbuf,sizeof(wbuf),buf,' ');
643
643
         strcpy(wwwDocumentRoot,buf);
644
644
         fixnone(wwwDocumentRoot);
645
645
         return;
646
646
      }
647
647
 
648
648
      if(strstr(buf,"block_it") != 0) {
649
 
         getword(wbuf,buf,' ');
 
649
         getword(wbuf,sizeof(wbuf),buf,' ');
650
650
         strcpy(BlockIt,buf);
651
651
         fixnone(BlockIt);
652
652
         return;
653
653
      }
654
654
 
655
655
      if(strstr(buf,"external_css_file") != 0) {
656
 
         getword(wbuf,buf,' ');
 
656
         getword(wbuf,sizeof(wbuf),buf,' ');
657
657
         strcpy(ExternalCSSFile,buf);
658
658
         fixnone(ExternalCSSFile);
659
659
         return;
660
660
      }
661
661
 
662
662
      if(strstr(buf,"user_authentication") != 0) {
663
 
         getword(wbuf,buf,' ');
 
663
         getword(wbuf,sizeof(wbuf),buf,' ');
664
664
         strcpy(UserAuthentication,buf);
665
665
         fixnone(UserAuthentication);
666
666
         return;
667
667
      }
668
668
 
669
669
      if(strstr(buf,"AuthUserFile") != 0) {
670
 
         getword(wbuf,buf,' ');
 
670
         getword(wbuf,sizeof(wbuf),buf,' ');
671
671
         strcpy(AuthUserFile,buf);
672
672
         fixnone(AuthUserFile);
673
673
         return;
674
674
      }
675
675
 
676
676
      if(strstr(buf,"AuthName") != 0) {
677
 
         getword(wbuf,buf,' ');
 
677
         getword(wbuf,sizeof(wbuf),buf,' ');
678
678
         strcpy(AuthName,buf);
679
679
         fixnone(AuthName);
680
680
         return;
681
681
      }
682
682
 
683
683
      if(strstr(buf,"AuthType") != 0) {
684
 
         getword(wbuf,buf,' ');
 
684
         getword(wbuf,sizeof(wbuf),buf,' ');
685
685
         strcpy(AuthType,buf);
686
686
         fixnone(AuthType);
687
687
         return;
688
688
      }
689
689
 
690
690
      if(strstr(buf,"Require") != 0) {
691
 
         getword(wbuf,buf,' ');
 
691
         getword(wbuf,sizeof(wbuf),buf,' ');
692
692
         strcpy(Require,buf);
693
693
         fixnone(Require);
694
694
         return;
695
695
      }
696
696
 
697
697
      if(strstr(buf,"download_suffix") != 0) {
698
 
         getword(wbuf,buf,'"');
699
 
         getword(DownloadSuffix,buf,'"');
 
698
         getword(wbuf,sizeof(wbuf),buf,'"');
 
699
         getword(DownloadSuffix,sizeof(DownloadSuffix),buf,'"');
700
700
         fixnone(DownloadSuffix);
701
701
         return;
702
702
      }
703
703
 
704
704
      if(strstr(buf,"graphs") != 0) {
705
 
         getword(wbuf,buf,' ');
 
705
         getword(wbuf,sizeof(wbuf),buf,' ');
706
706
         strcpy(Graphs,buf);
707
707
         fixnone(Graphs);
708
708
         return;
709
709
      }
710
710
 
711
711
      if(strstr(buf,"graph_days_bytes_bar_color") != 0) {
712
 
         getword(wbuf,buf,' ');
 
712
         getword(wbuf,sizeof(wbuf),buf,' ');
713
713
         strcpy(GraphDaysBytesBarColor,buf);
714
714
         fixnone(GraphDaysBytesBarColor);
715
715
         return;
716
716
      }
717
717
 
718
718
      if(strstr(buf,"squidguard_log_format") != 0) {
719
 
         getword(wbuf,buf,' ');
 
719
         getword(wbuf,sizeof(wbuf),buf,' ');
720
720
         strcpy(SquidGuardLogFormat,buf);
721
721
         fixnone(SquidGuardLogFormat);
722
722
         return;
723
723
      }
724
724
 
725
725
      if(strstr(buf,"squidguard_ignore_date") != 0) {
726
 
         getword(wbuf,buf,' ');
 
726
         getword(wbuf,sizeof(wbuf),buf,' ');
727
727
         strcpy(SquidguardIgnoreDate,buf);
728
728
         fixnone(SquidguardIgnoreDate);
729
729
         return;
730
730
      }
731
731
 
732
732
      if(strstr(buf,"dansguardian_ignore_date") != 0) {
733
 
         getword(wbuf,buf,' ');
 
733
         getword(wbuf,sizeof(wbuf),buf,' ');
734
734
         strcpy(DansguardianIgnoreDate,buf);
735
735
         fixnone(DansguardianIgnoreDate);
736
736
         return;
737
737
      }
738
738
 
739
739
      if(strstr(buf,"ulimit") != 0) {
740
 
         getword(wbuf,buf,' ');
 
740
         getword(wbuf,sizeof(wbuf),buf,' ');
741
741
         strcpy(Ulimit,buf);
742
742
         fixnone(Ulimit);
743
743
         return;
744
744
      }
745
745
 
746
746
      if(strstr(buf,"ntlm_user_format") != 0) {
747
 
         getword(wbuf,buf,' ');
 
747
         getword(wbuf,sizeof(wbuf),buf,' ');
748
748
         strcpy(NtlmUserFormat,buf);
749
749
         fixnone(NtlmUserFormat);
750
750
         return;
751
751
      }
752
752
 
753
753
      if(strstr(buf,"realtime_types") != 0) {
754
 
         getword(wbuf,buf,' ');
 
754
         getword(wbuf,sizeof(wbuf),buf,' ');
755
755
         strcpy(RealtimeTypes,buf);
756
756
         fixnone(RealtimeTypes);
757
757
         return;
758
758
      }
759
759
 
760
760
      if(strstr(buf,"realtime_unauthenticated_records") != 0) {
761
 
         getword(wbuf,buf,' ');
 
761
         getword(wbuf,sizeof(wbuf),buf,' ');
762
762
         strcpy(RealtimeUnauthRec,buf);
763
763
         fixnone(RealtimeUnauthRec);
764
764
         return;
765
765
      }
766
766
 
767
767
      if(strstr(buf,"realtime_refresh_time") != 0) {
768
 
         getword(wbuf,buf,' ');
 
768
         getword(wbuf,sizeof(wbuf),buf,' ');
769
769
         realtime_refresh=atoi(buf);
770
770
         return;
771
771
      }
772
772
 
773
773
      if(strstr(buf,"realtime_access_log_lines") != 0) {
774
 
         getword(wbuf,buf,' ');
 
774
         getword(wbuf,sizeof(wbuf),buf,' ');
775
775
         realtime_access_log_lines=atoi(buf);
776
776
         return;
777
777
      }
782
782
      }
783
783
 
784
784
      if(strstr(buf,"byte_cost") != 0) {
785
 
         getword(wbuf,buf,' ');
 
785
         getword(wbuf,sizeof(wbuf),buf,' ');
786
786
         cost=atol(buf);
787
 
         getword(wbuf,buf,' ');
 
787
         getword(wbuf,sizeof(wbuf),buf,' ');
788
788
         nocost=my_atoll(buf);
789
789
         return;
790
790
      }