PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001743PacketFencecorepublic2013-10-28 04:272013-10-29 06:31
ReportererSitzt 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformLinuxOSUbuntuOS Version12.04
Product Version4.0.6-2 
Target VersionFixed in Version 
Summary0001743: Service watchdog not able to restart all services
Description"pfcmd service pf start" and the watchdog if it tries to restart services that are not running produces this error

Insecure dependency in sprintf while running with -T switch at /usr/local/pf/lib/pf/services.pm

Needs to be untainted :

sub launchService {
    my ($daemon,@launcher_args) = @_;
    my $launcher = $service_launchers{$daemon};
    if ($launcher) {
        my $logger = Log::Log4perl::get_logger('pf::services');
### untaint launcher ###
        $launcher =~ /^(.*)$/;
        $launcher = $1;
########################
        my $cmd_line = sprintf($launcher, @launcher_args);
        $logger->info("Starting $daemon with '$cmd_line'");
        if ($cmd_line =~ /^(.+)$/) {
            $cmd_line = $1;
            my $t0 = Time::HiRes::time();
            my $return_value = system($cmd_line);
            my $elapsed = Time::HiRes::time() - $t0;
            $logger->info(sprintf("Daemon %s took %.3f seconds to start.", $daemon, $elapsed));
            return $return_value;
        }
    }
    return;
}
TagsNo tags attached.
fixed in git revision
fixed in mtn revision
Attached Files

- Relationships

-  Notes
(0003468)
francis (administrator)
2013-10-29 06:31

The upcoming pull of the "service refactor" branch will fix this problem.

See https://github.com/inverse-inc/packetfence/pull/104 [^]

- Issue History
Date Modified Username Field Change
2013-10-28 04:27 erSitzt New Issue
2013-10-29 06:31 francis Note Added: 0003468


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker