openbsd-ports/mail/openwebmail/patches/patch-cgi-bin_openwebmail_openwebmail-cal_pl

23 lines
1.1 KiB
Plaintext
Raw Normal View History

2005-01-27 01:01:16 -05:00
$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-cal_pl,v 1.5 2005/01/27 06:01:17 kevlo Exp $
--- cgi-bin/openwebmail/openwebmail-cal.pl.orig Wed Jan 5 18:26:24 2005
+++ cgi-bin/openwebmail/openwebmail-cal.pl Thu Jan 27 10:39:23 2005
@@ -1,4 +1,4 @@
-#!/usr/bin/suidperl -T
2004-07-12 01:54:51 -04:00
+#!/usr/bin/perl
#
# openwebmail-cal.pl - calendar program
#
2004-03-04 01:34:09 -05:00
@@ -19,10 +19,10 @@
2003-04-14 04:26:11 -04:00
use vars qw($SCRIPT_DIR);
2005-01-27 01:01:16 -05:00
if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { local $1; $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')) {
2005-01-27 01:01:16 -05:00
$_=<F>; close(F); if ( $_=~/^([^\s]*)/) { local $1; $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; }
2004-03-04 01:34:09 -05:00
push (@INC, $SCRIPT_DIR);
2005-01-27 01:01:16 -05:00
foreach (qw(ENV BASH_ENV CDPATH IFS TERM)) {delete $ENV{$_}}; $ENV{PATH}='/bin:/usr/bin'; # secure ENV