openbsd-ports/mail/openwebmail/patches/patch-cgi-bin_openwebmail_openwebmail-tool_pl
2003-04-14 08:26:11 +00:00

58 lines
3.1 KiB
Plaintext

$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-tool_pl,v 1.2 2003/04/14 08:26:20 kevlo Exp $
--- cgi-bin/openwebmail/openwebmail-tool.pl.orig Mon Apr 14 14:50:36 2003
+++ cgi-bin/openwebmail/openwebmail-tool.pl Mon Apr 14 14:55:04 2003
@@ -1,4 +1,4 @@
-#!/usr/bin/suidperl -T
+#!/usr/bin/perl
#
# openwebmail-tool.pl - command tool for mail/event/notify/index...
#
@@ -7,7 +7,7 @@
#
use vars qw($SCRIPT_DIR);
if ( $0 =~ m!^(.*?)/[\w\d\-\.]+\.pl! ) { $SCRIPT_DIR=$1; }
-if (!$SCRIPT_DIR && open(F, '/etc/openwebmail_path.conf')) {
+if (!$SCRIPT_DIR && open(F, '%%SYSCONFDIR%%/openwebmail/openwebmail_path.conf')) {
$_=<F>; close(F); if ( $_=~/^([^\s]*)/) { $SCRIPT_DIR=$1; }
}
if (!$SCRIPT_DIR) {
@@ -210,10 +210,10 @@
}
if (!defined(%default_config_raw)) { # read default only once if persistent mode
- readconf(\%default_config, \%default_config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
+ readconf(\%default_config, \%default_config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
}
%config=%default_config; %config_raw =%default_config_raw;
- readconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf") if (-f "$SCRIPT_DIR/etc/openwebmail.conf");
+ readconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") if (-f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
if ($defaultdomain ne "") {
my $siteconf="$config{'ow_sitesconfdir'}/$defaultdomain";
readconf(\%config, \%config_raw, "$siteconf") if ( -f "$siteconf");
@@ -494,10 +494,10 @@
sub allusers {
my ($defaultdomain, $r_list)=@_;
if (!defined(%default_config_raw)) { # read default only once if persistent mode
- readconf(\%default_config, \%default_config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
+ readconf(\%default_config, \%default_config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
}
%config=%default_config; %config_raw =%default_config_raw;
- readconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf") if (-f "$SCRIPT_DIR/etc/openwebmail.conf");
+ readconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") if (-f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
if ($defaultdomain ne "") {
my $siteconf="$config{'ow_sitesconfdir'}/$defaultdomain";
readconf(\%config, \%config_raw, "$siteconf") if ( -f "$siteconf");
@@ -535,10 +535,10 @@
%config=(); %config_raw=();
if (!defined(%default_config_raw)) { # read default only once if persistent mode
- readconf(\%default_config, \%default_config_raw, "$SCRIPT_DIR/etc/openwebmail.conf.default");
+ readconf(\%default_config, \%default_config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf.default");
}
%config=%default_config; %config_raw =%default_config_raw;
- readconf(\%config, \%config_raw, "$SCRIPT_DIR/etc/openwebmail.conf") if (-f "$SCRIPT_DIR/etc/openwebmail.conf");
+ readconf(\%config, \%config_raw, "%%SYSCONFDIR%%/openwebmail/openwebmail.conf") if (-f "%%SYSCONFDIR%%/openwebmail/openwebmail.conf");
if ($loginname=~/^(.+)\@(.+)$/) {
($loginuser, $logindomain)=($1, $2);