--- BBS.cgi.org Sat May 12 04:55:32 2001 +++ BBS.cgi Sat May 12 05:04:26 2001 @@ -4,7 +4,7 @@ BBS.cgi - a sample BBS script for the CGI_Board class library - Version: 0.70 (beta test version) + Version: 0.70 + ProHosting patch 0.01 (beta test version) Date: Sat May 12 04:29:40 JST 2001 =head1 Copyright @@ -20,10 +20,11 @@ #============================================================================== # Location of CGI_Board -my $Version_of_CGI_Board = "0.70"; +my $Version_of_CGI_Board = "0.70+PH0.01"; my $URL_of_CGI_Board = "http://www.math.tohoku.ac.jp/~kuroki/pub/CGI_Board/"; my $Link_to_CGI_Board = qq!CGI_Board $Version_of_CGI_Board!; +$Link_to_CGI_Board .= qq! + Free ProHosting!; #------------------------------------------------------------------------------ # @@ -103,25 +104,26 @@ # # Permission of directories and files # -my $Perm_Config_Dir = 0777; -my $Perm_Board_Dir = 0777; -my $Perm_Syslog = 0666; -my $Perm_Admin = 0666; -my $Perm_Config = 0666; -my $Perm_Board = 0666; -my $Perm_Boardlog = 0666; -my $Perm_Searchlog = 0666; -my $Perm_Errorlog = 0666; -# -#my $Perm_Config_Dir = 0700; -#my $Perm_Board_Dir = 0755; -#my $Perm_Syslog = 0600; -#my $Perm_Admin = 0600; -#my $Perm_Config = 0600; +#my $Perm_Config_Dir = 0777; +#my $Perm_Board_Dir = 0777; +#my $Perm_Syslog = 0666; +#my $Perm_Admin = 0666; +#my $Perm_Config = 0666; +#my $Perm_Board = 0666; +#my $Perm_Boardlog = 0666; +#my $Perm_Searchlog = 0666; +#my $Perm_Errorlog = 0666; +# +my $Perm_Config_Dir = 0700; +my $Perm_Board_Dir = 0755; +my $Perm_Syslog = 0600; +my $Perm_Admin = 0600; +my $Perm_Config = 0600; #my $Perm_Board = 0644; -#my $Perm_Boardlog = 0600; -#my $Perm_Searchlog = 0600; -#my $Perm_Errorlog = 0600; +my $Perm_Board = 0754; +my $Perm_Boardlog = 0600; +my $Perm_Searchlog = 0600; +my $Perm_Errorlog = 0600; # Set the directory in which configuration files are placed. # If its first character is not "/", it is interpreted as the relative path @@ -161,22 +163,22 @@ # Set DirectoryIndex filename. # -my $DirectoryIndex = "index.html"; -#my $DirectoryIndex = undef; +#my $DirectoryIndex = "index.html"; +my $DirectoryIndex = undef; # Check disk space # -#my $df_command = "df"; -#$df_command = "/usr/ucb/df" if -x "/usr/ucb/df"; -#my $df_dir = $BBS_Board_Dir; -#my @df_result = `$df_command $df_dir`; -#my $capacity = (split " ", $df_result[1])[4]; -#if ($capacity > 99) { -# print "Content-Type: text/plain\n\n"; -# print @df_result; -# print "\nDon't use $Script_Filename because the file sysytem is full.\n"; -# exit; -#} +my $df_command = "df"; +$df_command = "/usr/ucb/df" if -x "/usr/ucb/df"; +my $df_dir = $BBS_Board_Dir; +my @df_result = `$df_command $df_dir`; +my $capacity = (split " ", $df_result[1])[4]; +if ($capacity > 99) { + print "Content-Type: text/plain\n\n"; + print @df_result; + print "\nDon't use $Script_Filename because the file sysytem is full.\n"; + exit; +} # # ******************* Change the above appropriately! ******************** @@ -239,7 +241,7 @@ my $syslog_filename = "Syslog.cgi"; my $syslog_file = $syslog_dir . "/" . $syslog_filename; my $syslog_perm = $Perm_Syslog; -my $syslog_maxsize = 1024 * 1024; +my $syslog_maxsize = 500 * 1024; # To stop logging syslog, let $syslog_file be undef. #my $syslog_file = undef; @@ -248,7 +250,7 @@ my $errorlog_filename = "Error.cgi"; my $errorlog_file = $errorlog_dir . "/" . $errorlog_filename; my $errorlog_perm = $Perm_Errorlog; -my $errorlog_maxsize = 1024 * 1024; +my $errorlog_maxsize = 100 * 1024; # To stop logging errors, let $errorlog_file be undef. #my $errorlog_file = undef; @@ -819,8 +821,8 @@ $board->board_maxsize($board_maxsize); $board->board_seqlen($board_seqlen); $board->set_board_new(\&board_new); -#$board->html_bdrhead("\n"); +$board->html_bdrhead("\n"); my $boardlog_dir = $board_dir; my $boardlog_id = $board_id; @@ -843,7 +845,7 @@ my $searchlog_filename = $board_id . "-searchlog.cgi"; my $searchlog_file = $board_dir . "/" . $searchlog_filename; my $searchlog_perm = $Perm_Searchlog; -my $searchlog_maxsize = 1024 * 1024; +my $searchlog_maxsize = 100 * 1024; # To stop logging searchlog, let $searchlog_file be undef. #my $searchlog_file = undef; @@ -1064,8 +1066,6 @@ $Default_Rule
$files-$Default_Rule -$Board_Inputform_Passwd $Default_Admin_Footer ----------END; @@ -3242,7 +3239,7 @@ } } - print_syslog("submission_form"); +# print_syslog("submission_form"); $macro = board_macro($mode); @@ -3768,7 +3765,7 @@ } my $referer = $ENV{'HTTP_REFERER'}; - print_syslog("read_board: $filename,$order_normal,$referer"); +# print_syslog("read_board: $filename,$order_normal,$referer"); # load $file open FILE, $file or print_and_die("$file: $!"); @@ -4077,10 +4074,10 @@ print_errorlog($message); - my $diemessage = "$filename $line: $message"; - $diemessage =~ tr/\n/ /; - die $message, "\n"; -# exit; +# my $diemessage = "$filename $line: $message"; +# $diemessage =~ tr/\n/ /; +# die $message, "\n"; + exit; } #------------------------------------------------------------------------------