BackupPC-users

[BackupPC-users] Issue with specific ping command

2013-07-23 09:10:57
Subject: [BackupPC-users] Issue with specific ping command
From: Raphaël Jacquot <sxpert AT sxpert DOT org>
To: BackupPC-users AT lists.sourceforge DOT net
Date: Tue, 23 Jul 2013 14:54:22 +0200
Hi,

I have installed version BackupPC-3.3.0 and have been having issues with 
ping commands other than the standard ping.
for instance, I want to use "ssh -l root $host true" for a certain host 
which doesn't respond to icmp

I found the following issue :

in lib/BackupPC/Lib.pm, line 1383 we have :

1377                $cmd = [map { m/(.*)/ } @$cmd];             # untaint
1378                #
1379                # force list-form of exec(), ie: no shell even for 1 
arg
1380                #
1381                exec { $cmd->[0] } @$cmd;
1382                print(STDERR "Exec of @$cmd failed\n");
1383                exit(1);

this code seems pretty suspect. in particular, it doesn't test for the 
actual value of $?, and forces the value to 1, aka failure.

this should probably read :

exec { $cmd->[0] } @$cmd;
if ( $? ) {
     print(STDERR "Exec of @$cmd failed\n");
     exit(1);
}
exit(0);

or something similar.

Sincerely

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>