diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2016-12-05 16:22:59 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2016-12-05 16:23:07 +0100 |
commit | 1d1072ac291b1a086d4b15cd611cb74e41667115 (patch) | |
tree | c61a5bc358ada315393d62766e1ce813fb65181a | |
parent | c18ca98345ba54462a3199679f15c80da0634eef (diff) |
s/fd-conn/conn-fd/
-rwxr-xr-x | lacme | 2 | ||||
-rwxr-xr-x | lacme-accountd | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -408,7 +408,7 @@ sub acme_client($@) { drop_privileges($accountd->{user}, $accountd->{group}, '/'); set_FD_CLOEXEC($s, 0); $client->close() or die "Can't close: $!"; - my @cmd = ($accountd->{command}, '--fd-conn='.fileno($s)); + my @cmd = ($accountd->{command}, '--conn-fd='.fileno($s)); push @cmd, '--config='.$accountd->{config} if defined $accountd->{config}; push @cmd, '--privkey='.$accountd->{privkey} if defined $accountd->{privkey}; push @cmd, '--quiet' unless lc $accountd->{quiet} eq 'no'; diff --git a/lacme-accountd b/lacme-accountd index 55ae0c0..00d6ccd 100755 --- a/lacme-accountd +++ b/lacme-accountd @@ -59,7 +59,7 @@ sub usage(;$$) { } exit $rv; } -usage(1) unless GetOptions(\%OPTS, qw/config=s privkey=s socket=s fd-conn=i quiet|q debug help|h/); +usage(1) unless GetOptions(\%OPTS, qw/config=s privkey=s socket=s conn-fd=i quiet|q debug help|h/); usage(0) if $OPTS{help}; do { @@ -137,8 +137,8 @@ $JWK = JSON::->new->encode($JWK); # to support the abstract namespace.) The downside is that we have to # delete the file manually. # -if (defined $OPTS{'fd-conn'}) { - die "Invalid file descriptor" unless $OPTS{'fd-conn'} =~ /\A(\d+)\z/; +if (defined $OPTS{'conn-fd'}) { + die "Invalid file descriptor" unless $OPTS{'conn-fd'} =~ /\A(\d+)\z/; # untaint and fdopen(3) our end of the socket pair open $S, '+<&=', $1 or die "fdopen $1: $!"; } else { @@ -183,7 +183,7 @@ sub conn($;$) { } } -if (defined $OPTS{'fd-conn'}) { +if (defined $OPTS{'conn-fd'}) { conn($S, $$); } else { $SIG{PIPE} = 'IGNORE'; # ignore broken pipes |