diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2017-07-01 19:59:23 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2017-07-01 20:00:55 +0200 |
commit | 09d4e6f58254cc18803e9746b84e521924c55aee (patch) | |
tree | 7f4c7ea5de8761c8b01c1cd602e94d3477e1ca8e | |
parent | 7a4e51344423ee3309c258087a69dac29bf30b51 (diff) |
Avoid hash slices.
That's mostly what prevents us from supporting Perl older than 5.20.
-rwxr-xr-x | lacme | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -532,7 +532,7 @@ sub acme_client($@) { # child doesn't have access to the parent's memory my @fileno = map { fileno($_) =~ /^(\d+)$/ ? $1 : die } ($CONFFILE, $client); # untaint fileno set_FD_CLOEXEC($client, 1); - my $rv = spawn({%$args{qw/in out/}, child => sub() { + my $rv = spawn({in => $args->{in}, out => $args->{out}, child => sub() { drop_privileges($conf->{user}, $conf->{group}, $args->{chdir} // '/'); set_FD_CLOEXEC($_, 0) foreach ($CONFFILE, $client); seek($CONFFILE, SEEK_SET, 0) or die "Can't seek: $!"; @@ -723,7 +723,7 @@ elsif ($COMMAND eq 'new-cert') { } # generate the CSR - my $csr = gen_csr(%$conf{qw/certificate-key subject subjectAltName keyUsage hash/}) // do { + my $csr = gen_csr(map {$_ => $conf->{$_}} qw/certificate-key subject subjectAltName keyUsage hash/) // do { print STDERR "[$s] Warning: Couldn't generate CSR, skipping\n"; $rv = 1; next; |