projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
91a3d04
)
log all incoming rcmd regardless of outcome
author
Dirk Koopman
<djk@tobit.co.uk>
Fri, 17 Apr 2020 14:03:22 +0000
(15:03 +0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Fri, 17 Apr 2020 14:03:22 +0000
(15:03 +0100)
perl/DXProt.pm
patch
|
blob
|
history
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index 8b9026c1f700e71945feda5329efcf9b2b431f95..78c5526b4ce4fd67f73d4d168a6f0c6bdb00b316 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-1118,6
+1118,8
@@
sub load_hops
sub process_rcmd
{
my ($self, $tonode, $fromnode, $user, $cmd) = @_;
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')) {
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;
}
$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
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