From 8c1ee840caf2692d13b4e74b9c31adf4f4603a87 Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Fri, 14 Oct 2022 22:29:55 -0500 Subject: [PATCH] Improve comments in scan_incoming --- gatekeeper.pl | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index d26db21..c952788 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -929,10 +929,9 @@ sub scan_incoming { # # Note that lsof outputs absolute names. # - - # this lsof test only works if either - # a) lsof is not compiled with HASSECURITY - # b) the vsftpd ftp_user is set to the same user ftp_upload runs as + # This lsof test only works if either: + # a) lsof is not compiled with HASSECURITY + # b) gatekeeper runs as the vsftpd ftp_user # If neither of those 2 conditions are met, the lsof call will not see # the open files because they are owned by another user. # On modern (Debian) systems, condition a) is not met. @@ -990,11 +989,11 @@ sub scan_incoming { } elsif (exists($possible{$base}) && !exists($possible{"$bare_base.sig"}) && ($base =~ /\.directive\.asc$/)) { - # Here we have a potential problem. It's possible that we are seeing a - # directive file that belongs to a triplet the rest of which has not been - # uploaded yet. If so, we should ignore this file and not move it to - # $directory. This means we need to read the file and see if there is a - # 'filename:' directive. + # Here we have a potential problem. It's possible that we are seeing + # a directive file that belongs to a triplet the rest of which has + # not been uploaded yet. If so, we should ignore this file and not + # move it to $scratchpad. This means we need to read the file and see + # if there is a 'filename:' directive. my $racecondition = 0; open(TMP,$base); -- 2.25.1