5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-01-12 17:17:35 +03:00

partially revert: daemon: refactor and cleanup

Reverts a hunk of 0da5a3e43b which removed checking &
untainting of pids from the PVE_DAEMON_WORKER_PIDS env var.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2017-11-13 10:31:58 +01:00
parent 563661dd94
commit 5dff28f062

View File

@ -280,7 +280,12 @@ sub setup {
if ($restart && $self->{max_workers}) {
if (my $wpids = $ENV{PVE_DAEMON_WORKER_PIDS}) {
$self->{old_workers}->{$_} = 1 foreach (split(':', $wpids));
foreach my $pid (split(':', $wpids)) {
# check & untaint
if ($pid =~ m/^(\d+)$/) {
$self->{old_workers}->{$1} = 1;
}
}
}
}