openbsd-ports/mail/openwebmail/patches/patch-cgi-bin_openwebmail_openwebmail-main_pl
2004-11-21 17:01:45 +00:00

22 lines
1.0 KiB
Plaintext

$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-main_pl,v 1.6 2004/11/21 17:01:45 naddy Exp $
--- cgi-bin/openwebmail/openwebmail-main.pl.orig Fri Nov 12 10:37:28 2004
+++ cgi-bin/openwebmail/openwebmail-main.pl Fri Nov 12 10:39:57 2004
@@ -1,14 +1,14 @@
-#!/usr/bin/suidperl -T
+#!/usr/bin/perl
#
# openwebmail-main.pl - message list browsing program
#
use vars qw($SCRIPT_DIR);
if ( $0 =~ m!^(\S*)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1 }
-if ($SCRIPT_DIR eq '' && open(F, '/etc/openwebmail_path.conf')) {
+if ($SCRIPT_DIR eq '' && open(F, '%%SYSCONFDIR%%/openwebmail/openwebmail_path.conf')) {
$_=<F>; close(F); if ( $_=~/^(\S*)/) { $SCRIPT_DIR=$1 }
}
-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; }
push (@INC, $SCRIPT_DIR);
foreach (qw(ENV BASH_ENV CDPATH IFS TERM)) {delete $ENV{$_}}; $ENV{PATH}='/bin:/usr/bin'; # secure ENV