From: Dirk Koopman Date: Fri, 17 Apr 2020 14:03:22 +0000 (+0100) Subject: log all incoming rcmd regardless of outcome X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=772dc67533220a11f5ff6962abff8ea46d247ece;p=spider.git log all incoming rcmd regardless of outcome --- diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 8b9026c1..78c5526b 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1118,6 +1118,8 @@ sub load_hops sub process_rcmd { my ($self, $tonode, $fromnode, $user, $cmd) = @_; + + Log('rcmd', 'in', ($ref->{priv}||0), $fromnode, $cmd); if ($tonode eq $main::mycall) { my $ref = DXUser::get_current($fromnode); unless ($ref && UNIVERSAL::isa($ref, 'DXUser')) { @@ -1131,7 +1133,6 @@ sub process_rcmd $self->send_rcmd_reply($main::mycall, $fromnode, $user, "sorry...!"); return; } - Log('rcmd', 'in', ($ref->{priv}||0), $fromnode, $cmd); if ($cmd !~ /^\s*rcmd/i && $ref->homenode && $cref->call eq $ref->homenode) { # not allowed to relay RCMDS! if ($ref->{priv}) { # you have to have SOME privilege, the commands have further filtering $self->{remotecmd} = 1; # for the benefit of any command that needs to know