[pve-devel] [PATCH v2 qemu-server 1/1] api2: add check_bridge_access for create/update vm

DERUMIER, Alexandre alexandre.derumier at groupe-cyllene.com
Tue Jun 6 06:20:14 CEST 2023


> >  
> > +my $check_bridge_access = sub {
> > +    my ($rpcenv, $authuser, $param) = @_;
> > +
> > +    return 1 if $authuser eq 'root at pam';
> > +
> > +    foreach my $opt (keys %{$param}) {
> > +       next if $opt !~ m/^net\d+$/;
> > +       my $net = PVE::QemuServer::parse_net($param->{$opt});
> > +       my $bridge = $net->{bridge};
> > +       my $tag = $net->{tag};
> 
> should below move to a method in pve-guest-common, taking $bridge (or
> name it already $vnet) and $tag
> as additional parameter, and then be also used by container?

yes indeed! (I'll try to do patch for lxc today).





More information about the pve-devel mailing list