As reported in the community forum [0], changing a guest's network device definition would fail with an error for non-root users, when it did not (yet) specify a bridge: > no sdn vnet ID specified
Skip the call to check_vnet_access() if there is no bridge defined. Note that editing a device to not use any bridge anymore still requires permissions for the currently configured bridge even after this change. [0]: https://forum.proxmox.com/threads/173249/ Signed-off-by: Fiona Ebner <[email protected]> --- src/PVE/LXC.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index a445a85..89ccb54 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1662,6 +1662,7 @@ sub check_bridge_access { my $net = PVE::LXC::Config->parse_lxc_network($raw); my ($bridge, $tag, $trunks) = $net->@{ 'bridge', 'tag', 'trunks' }; + next if !defined($bridge); # no vnet to check for check_vnet_access($rpcenv, $authuser, $bridge, $tag, $trunks); return 1; -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
