aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-02-17 23:34:08 +0100
committerGuilhem Moulin <guilhem@fripost.org>2021-02-18 00:42:32 +0100
commit32c27cecbe7ab3bdf0cbc984c50b37fbe231e79d (patch)
tree5df66c7e1f8d24855d38c17f1557dc19f9e70d1a
parent2e455335a9e8aa9aaace98bc4d61f53a2c93b930 (diff)
Set the DEBUG environment variable to 0/1 instead of ""/1.
-rw-r--r--Changelog1
-rwxr-xr-xlacme4
2 files changed, 3 insertions, 2 deletions
diff --git a/Changelog b/Changelog
index 5dd416a..0f9b6ca 100644
--- a/Changelog
+++ b/Changelog
@@ -54,6 +54,7 @@ lacme (0.7.1) upstream;
- webserver: reopen stdin from /dev/null.
- Use 'acme-challenge.XXXXXXXXXX' as template for the temporary ACME
challenge directory.
+ - Set the DEBUG environment variable to 0/1 instead of ""/1.
-- Guilhem Moulin <guilhem@fripost.org> Wed, 09 Dec 2020 18:23:22 +0100
diff --git a/lacme b/lacme
index 354a4a0..d2d8840 100755
--- a/lacme
+++ b/lacme
@@ -376,7 +376,7 @@ sub spawn_webserver() {
drop_privileges($conf->{user}, $conf->{group}, $tmpdir);
open STDIN, '<', '/dev/null' or die "open(/dev/null): $!";
set_FD_CLOEXEC($sock, 0);
- $ENV{DEBUG} = $OPTS{debug};
+ $ENV{DEBUG} = $OPTS{debug} // 0;
# use execve(2) rather than a Perl pseudo-process to ensure that
# the child doesn't have access to the parent's memory
exec $conf->{command}, fileno($sock) or die;
@@ -552,7 +552,7 @@ sub acme_client($@) {
drop_privileges($conf->{user}, $conf->{group}, $args->{chdir} // '/');
set_FD_CLOEXEC($_, 0) foreach ($CONFFILE, $client);
seek($CONFFILE, SEEK_SET, 0) or die "seek: $!";
- $ENV{DEBUG} = $OPTS{debug};
+ $ENV{DEBUG} = $OPTS{debug} // 0;
}}, $conf->{command}, $COMMAND, @fileno, @args);
if (defined $cleanup) {