Added setup for WWW and FTP logfiles

This commit is contained in:
Michiel Broek 2005-08-11 11:54:45 +00:00
parent 49e6a0d376
commit c69b4d97c3
2 changed files with 55 additions and 12 deletions

View File

@ -6,6 +6,8 @@ v0.71.3 13-Jun-2005
upgrade: upgrade:
Check mbsetup 7.n.3.14 and 7.n.3.15 settings. Check mbsetup 7.n.3.14 and 7.n.3.15 settings.
You may limit the mailhistory.html by setting 1.15.8 You may limit the mailhistory.html by setting 1.15.8
Check mbsetup 1.13.4 and 1.13.5, they should be empty or point
to valid and readable logfiles.
See also the procedure for version 0.71.2 since now the chat See also the procedure for version 0.71.2 since now the chat
code is made final! code is made final!
@ -46,6 +48,10 @@ v0.71.3 13-Jun-2005
Added setup entry 1.15.8 to set a limit on the size of the Added setup entry 1.15.8 to set a limit on the size of the
mailer history html page. mailer history html page.
Made Internet BBS Chat final. Made Internet BBS Chat final.
Added setup items 1.13.4 and 1.13.5. These could point to
a valid apache logfile in common format and ftp xferlog
logfile. If defined then downloads via www and or ftp can
be counted.
v0.71.2 16-Jan-2005 - 13-Jun-2005 v0.71.2 16-Jan-2005 - 13-Jun-2005

View File

@ -1052,6 +1052,8 @@ void s_newfiles(void)
mbse_mvprintw( 7, 2, "1. New days"); mbse_mvprintw( 7, 2, "1. New days");
mbse_mvprintw( 8, 2, "2. Security"); mbse_mvprintw( 8, 2, "2. Security");
mbse_mvprintw( 9, 2, "3. Groups"); mbse_mvprintw( 9, 2, "3. Groups");
mbse_mvprintw(10, 2, "4. WWW log");
mbse_mvprintw(11, 2, "5. FTP log");
} }
@ -1059,6 +1061,7 @@ void s_newfiles(void)
void e_newfiles(void) void e_newfiles(void)
{ {
int temp; int temp;
char *logfile;
s_newfiles(); s_newfiles();
for (;;) { for (;;) {
@ -1066,8 +1069,10 @@ void e_newfiles(void)
show_int( 7,16, CFG.newdays); show_int( 7,16, CFG.newdays);
show_sec( 8,16, CFG.security); show_sec( 8,16, CFG.security);
show_int( 9,16, CFG.new_groups); show_int( 9,16, CFG.new_groups);
show_str(10,16,64, CFG.www_logfile);
show_str(11,16,64, CFG.ftp_logfile);
switch(select_menu(3)) { switch(select_menu(5)) {
case 0: return; case 0: return;
case 1: E_INT(7,16, CFG.newdays, "Add files younger than this in newfiles report.") case 1: E_INT(7,16, CFG.newdays, "Add files younger than this in newfiles report.")
case 2: E_SEC(8,16, CFG.security, "1.13 NEWFILES REPORTS SECURITY", s_newfiles) case 2: E_SEC(8,16, CFG.security, "1.13 NEWFILES REPORTS SECURITY", s_newfiles)
@ -1082,6 +1087,34 @@ void e_newfiles(void)
CloseNewfiles(TRUE); CloseNewfiles(TRUE);
} }
break; break;
case 4: logfile = calloc(81, sizeof(char));
strcpy(logfile, edit_str(10,16,64, CFG.www_logfile,
(char *)"The name of the ^apache logfile^ in common format"));
if (strlen(logfile)) {
if (file_exist(logfile, R_OK)) {
errmsg("Logfile \"%s\" doesn't exist", logfile);
} else {
sprintf(CFG.www_logfile, "%s", logfile);
}
} else {
CFG.www_logfile[0] = '\0';
}
free(logfile);
break;
case 5: logfile = calloc(81, sizeof(char));
strcpy(logfile, edit_str(11,16,64, CFG.ftp_logfile,
(char *)"The name of the ^ftp server logfile^ in xferlog format"));
if (strlen(logfile)) {
if (file_exist(logfile, R_OK)) {
errmsg("Logfile \"%s\" doesn't exist", logfile);
} else {
sprintf(CFG.ftp_logfile, "%s", logfile);
}
} else {
CFG.ftp_logfile[0] = '\0';
}
free(logfile);
break;
} }
} }
} }
@ -2190,10 +2223,14 @@ int global_doc(FILE *fp, FILE *toc, int page)
add_webdigit(wp, (char *)"New files days", CFG.newdays); add_webdigit(wp, (char *)"New files days", CFG.newdays);
web_secflags(wp, (char *)"Highest security level", CFG.security); web_secflags(wp, (char *)"Highest security level", CFG.security);
add_webdigit(wp, (char *)"Max. newfile groups", CFG.new_groups); add_webdigit(wp, (char *)"Max. newfile groups", CFG.new_groups);
add_webtable(wp, (char *)"WWW logfile", CFG.www_logfile);
add_webtable(wp, (char *)"FTP logfile", CFG.ftp_logfile);
addtoc(fp, toc, 1, 14, page, (char *)"Newfile reports"); addtoc(fp, toc, 1, 14, page, (char *)"Newfile reports");
fprintf(fp, " New files days %d\n", CFG.newdays); fprintf(fp, " New files days %d\n", CFG.newdays);
fprintf(fp, " Highest sec. level %s\n", get_secstr(CFG.security)); fprintf(fp, " Highest sec. level %s\n", get_secstr(CFG.security));
fprintf(fp, " Max. newfile grps %ld\n", CFG.new_groups); fprintf(fp, " Max. newfile grps %ld\n", CFG.new_groups);
fprintf(fp, " WWW logfile %s\n", CFG.www_logfile);
fprintf(fp, " FTP logfile %s\n", CFG.ftp_logfile);
fprintf(wp, "</TBODY>\n"); fprintf(wp, "</TBODY>\n");
fprintf(wp, "</TABLE>\n"); fprintf(wp, "</TABLE>\n");
fprintf(wp, "<A HREF=\"#_top\">Top</A>\n"); fprintf(wp, "<A HREF=\"#_top\">Top</A>\n");