* [PATCH] lei_pmdir: do not attempt to trigger network auth
@ 2021-09-16 20:15 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-09-16 20:15 UTC (permalink / raw)
To: meta
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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-16 20:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16 20:15 [PATCH] lei_pmdir: do not attempt to trigger network auth Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).