Merge r529 from 0.31 branch (explicit config dir via $QPSMTPD_CONFIG).
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@539 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
4cdae6bf05
commit
4a6f5dd2f0
@ -116,6 +116,10 @@ sub config_dir {
|
|||||||
my $configdir = ($ENV{QMAIL} || '/var/qmail') . '/control';
|
my $configdir = ($ENV{QMAIL} || '/var/qmail') . '/control';
|
||||||
my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
|
my ($name) = ($0 =~ m!(.*?)/([^/]+)$!);
|
||||||
$configdir = "$name/config" if (-e "$name/config/$config");
|
$configdir = "$name/config" if (-e "$name/config/$config");
|
||||||
|
if (exists $ENV{QPSMTPD_CONFIG}) {
|
||||||
|
$ENV{QPSMTPD_CONFIG} =~ /^(.*)$/; # detaint
|
||||||
|
$configdir = $1 if -e "$1/$config";
|
||||||
|
}
|
||||||
return $configdir;
|
return $configdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user