2004-07-12 01:54:51 -04:00
|
|
|
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-webdisk_pl,v 1.4 2004/07/12 05:54:53 kevlo Exp $
|
|
|
|
--- cgi-bin/openwebmail/openwebmail-webdisk.pl.orig Tue May 25 17:53:48 2004
|
|
|
|
+++ cgi-bin/openwebmail/openwebmail-webdisk.pl Mon Jul 12 10:42:25 2004
|
2003-04-14 04:26:11 -04:00
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-#!/usr/bin/suidperl -T
|
2004-07-12 01:54:51 -04:00
|
|
|
+#!/usr/bin/perl
|
2003-04-14 04:26:11 -04:00
|
|
|
#
|
|
|
|
# openwebmail-webdisk.pl - web disk program
|
|
|
|
#
|
2003-11-03 01:15:07 -05:00
|
|
|
@@ -18,10 +18,10 @@
|
2003-04-14 04:26:11 -04:00
|
|
|
|
|
|
|
use vars qw($SCRIPT_DIR);
|
2004-03-04 01:34:09 -05:00
|
|
|
if ( $0 =~ m!^(\S*)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1 }
|
2004-07-12 01:54:51 -04:00
|
|
|
-if ($SCRIPT_DIR eq '' && open(F, '/etc/openwebmail_path.conf')) {
|
|
|
|
+if ($SCRIPT_DIR eq '' && open(F, '%%SYSCONFDIR%%/openwebmail/openwebmail_path.conf')) {
|
2004-03-04 01:34:09 -05:00
|
|
|
$_=<F>; close(F); if ( $_=~/^(\S*)/) { $SCRIPT_DIR=$1 }
|
2003-04-14 04:26:11 -04:00
|
|
|
}
|
2004-07-12 01:54:51 -04:00
|
|
|
-if ($SCRIPT_DIR eq '') { print "Content-type: text/html\n\nSCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; }
|
|
|
|
+if ($SCRIPT_DIR eq '') { print "Content-type: text/html\n\nSCRIPT_DIR not set in %%SYSCONFDIR%%/openwebmail//openwebmail_path.conf !\n"; exit 0; }
|
2003-11-03 01:15:07 -05:00
|
|
|
push (@INC, $SCRIPT_DIR);
|
|
|
|
|
2004-03-04 01:34:09 -05:00
|
|
|
foreach (qw(PATH ENV BASH_ENV CDPATH IFS TERM)) { $ENV{$_}='' } # secure ENV
|