From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1D0531F8C8 for ; Thu, 16 Sep 2021 20:15:20 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_pmdir: do not attempt to trigger network auth Date: Thu, 16 Sep 2021 14:15:20 -0600 Message-Id: <20210916201520.26649-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Since some commands access both Maildirs and IMAP/NNTP servers at the same time, LeiPmdir may see the same lei->{auth} and lei->{net} objects as the sibling LeiInput-based workers. Delete those at fork and do not attempt to do authentication in those cases, since "net_merge_continue" will not be a registered op and cause PktOp to fail even if authentication /can/ work from a LeiPmdir worker. --- lib/PublicInbox/LeiPmdir.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LeiPmdir.pm b/lib/PublicInbox/LeiPmdir.pm index 59cf886e..23bccb4f 100644 --- a/lib/PublicInbox/LeiPmdir.pm +++ b/lib/PublicInbox/LeiPmdir.pm @@ -32,7 +32,8 @@ sub new { sub ipc_atfork_child { my ($self) = @_; my $ipt = $self->{ipt} // die 'BUG: no self->{ipt}'; - $ipt->{lei} = $self->{lei}; + my $lei = $ipt->{lei} = $self->{lei}; + delete @$lei{qw(auth net)}; # no network access in this worker $ipt->ipc_atfork_child; # calls _lei_atfork_child; }