diff -ruN 1.71/cgi-bin/openwebmail/checkmail.pl fix/cgi-bin/openwebmail/checkmail.pl --- 1.71/cgi-bin/openwebmail/checkmail.pl Mon Aug 12 13:25:55 2002 +++ fix/cgi-bin/openwebmail/checkmail.pl Thu Feb 20 13:53:06 2003 @@ -9,8 +9,11 @@ # use vars qw($SCRIPT_DIR); if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\nPlease execute script checkmail.pl with full path!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-abook.pl fix/cgi-bin/openwebmail/openwebmail-abook.pl --- 1.71/cgi-bin/openwebmail/openwebmail-abook.pl Mon Aug 12 13:26:49 2002 +++ fix/cgi-bin/openwebmail/openwebmail-abook.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-advsearch.pl fix/cgi-bin/openwebmail/openwebmail-advsearch.pl --- 1.71/cgi-bin/openwebmail/openwebmail-advsearch.pl Mon Aug 12 13:27:38 2002 +++ fix/cgi-bin/openwebmail/openwebmail-advsearch.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-cal.pl fix/cgi-bin/openwebmail/openwebmail-cal.pl --- 1.71/cgi-bin/openwebmail/openwebmail-cal.pl Thu Aug 22 18:54:59 2002 +++ fix/cgi-bin/openwebmail/openwebmail-cal.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-folder.pl fix/cgi-bin/openwebmail/openwebmail-folder.pl --- 1.71/cgi-bin/openwebmail/openwebmail-folder.pl Mon Aug 12 13:27:31 2002 +++ fix/cgi-bin/openwebmail/openwebmail-folder.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-main.pl fix/cgi-bin/openwebmail/openwebmail-main.pl --- 1.71/cgi-bin/openwebmail/openwebmail-main.pl Fri Aug 23 11:06:31 2002 +++ fix/cgi-bin/openwebmail/openwebmail-main.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-prefs.pl fix/cgi-bin/openwebmail/openwebmail-prefs.pl --- 1.71/cgi-bin/openwebmail/openwebmail-prefs.pl Mon Aug 12 13:27:24 2002 +++ fix/cgi-bin/openwebmail/openwebmail-prefs.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-read.pl fix/cgi-bin/openwebmail/openwebmail-read.pl --- 1.71/cgi-bin/openwebmail/openwebmail-read.pl Fri Aug 23 11:06:32 2002 +++ fix/cgi-bin/openwebmail/openwebmail-read.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-send.pl fix/cgi-bin/openwebmail/openwebmail-send.pl --- 1.71/cgi-bin/openwebmail/openwebmail-send.pl Thu Aug 22 10:59:51 2002 +++ fix/cgi-bin/openwebmail/openwebmail-send.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-spell.pl fix/cgi-bin/openwebmail/openwebmail-spell.pl --- 1.71/cgi-bin/openwebmail/openwebmail-spell.pl Mon Aug 12 13:27:09 2002 +++ fix/cgi-bin/openwebmail/openwebmail-spell.pl Thu Feb 20 13:50:51 2003 @@ -25,9 +25,12 @@ use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail-viewatt.pl fix/cgi-bin/openwebmail/openwebmail-viewatt.pl --- 1.71/cgi-bin/openwebmail/openwebmail-viewatt.pl Mon Aug 12 13:27:54 2002 +++ fix/cgi-bin/openwebmail/openwebmail-viewatt.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh diff -ruN 1.71/cgi-bin/openwebmail/openwebmail.pl fix/cgi-bin/openwebmail/openwebmail.pl --- 1.71/cgi-bin/openwebmail/openwebmail.pl Thu Aug 22 20:46:55 2002 +++ fix/cgi-bin/openwebmail/openwebmail.pl Thu Feb 20 13:50:51 2003 @@ -11,9 +11,12 @@ ############################################################################# use vars qw($SCRIPT_DIR); -if ( $ENV{'SCRIPT_FILENAME'} =~ m!^(.*?)/[\w\d\-\.]+\.pl! || $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } -if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\$SCRIPT_DIR not set in CGI script!\n"; exit 0; } -push (@INC, $SCRIPT_DIR, "."); +if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; } +if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) { + $_=; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; } +} +if (!$SCRIPT_DIR) { print "Content-type: text/html\n\n\SCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; } +push (@INC, $SCRIPT_DIR); $ENV{PATH} = ""; # no PATH should be needed $ENV{ENV} = ""; # no startup script for sh