Am 03.09.24 um 11:37 schrieb Fabian Grünbichler:
> On August 13, 2024 10:42 am, Fiona Ebner wrote:
>> diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm
>> index e71face4..d31589e7 100644
>> --- a/PVE/QemuMigrate.pm
>> +++ b/PVE/QemuMigrate.pm
>> @@ -1095,7 +1095,10 @@ sub phase2 {
>>      die "only UNIX sockets are supported for remote migration\n"
>>          if $tunnel_info->{proto} ne 'unix';
>>  
>> -    my $remote_socket = $tunnel_info->{addr};
>> +    # untaint
>> +    my ($remote_socket) =
>> +        $tunnel_info->{addr} =~ 
>> m|^(/run/qemu-server/(?:(?!\.\./).)+\.migrate)$|;
> 
> should we just switch to `\d+`, like we do for regular migration? in
> phase2_start_local_cluster we have:
> 
>       elsif ($line =~ m!^migration listens on 
> (unix):(/run/qemu-server/(\d+)\.migrate)$!) {
>           $tunnel_info->{addr} = $2;
>           die "Destination UNIX sockets VMID does not match source VMID" if 
> $vmid ne $3;
>           $tunnel_info->{proto} = $1;
>       }
> 
> and I don't really see a reason to deviate from that scheme any time
> soon?
> 

Sounds good, did so in v3:
https://lore.proxmox.com/pve-devel/20240904111231.106570-1-f.eb...@proxmox.com/T/#u


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to