From 772dc67533220a11f5ff6962abff8ea46d247ece Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Fri, 17 Apr 2020 15:03:22 +0100 Subject: [PATCH] log all incoming rcmd regardless of outcome --- perl/DXProt.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.43.0