aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlacme-accountd4
1 files changed, 2 insertions, 2 deletions
diff --git a/lacme-accountd b/lacme-accountd
index a842bce..9ed41c4 100755
--- a/lacme-accountd
+++ b/lacme-accountd
@@ -119,10 +119,10 @@ do {
print STDERR "Using configuration file: $conffile\n" if $OPTS{debug};
my $h = Config::Tiny::->read($conffile) or error(Config::Tiny::->errstr());
my $h2 = delete $h->{_} // {};
- if (defined (my $logfile = $h2->{logfile})) {
+ if ((my $logfile = $h2->{logfile} // "") ne "") {
$logfile = spec_expand($logfile);
die "Invalid log file name\n" unless $logfile =~ /\A(\p{Print}+)\z/; # untaint
- open $LOG, ">>", $1 or die "Can't open $1: $!";
+ open $LOG, ">>", $1 or die "Can't open $1: $!"; # open ASAP (before config validation)
}
error("Invalid section(s): ".join(', ', keys %$h)) if %$h;
my %h = map { $_ => delete $h2->{$_} } qw/privkey gpg socket logfile keyid quiet/;