[pve-devel] [PATCH common/container v2 0/2] fix invalid device passthrough being added to config

Filip Schauer f.schauer at proxmox.com
Mon Apr 15 15:17:00 CEST 2024


Fix a bug that allows a device passthrough entry to be added to the
config despite the device path not pointing to a device. Previously,
adding an invalid device passthrough entry would throw an error, but the
entry would still be added to the config. This is fixed by moving the
respective checks from update_lxc_config to update_pct_config, which is
run before the entry is written to the config file.

Changes since v1:
* Use "if" instead of "unless"
* Move device path validation and stat to seperate helper function

pve-common:

Filip Schauer (1):
  add get_device_stat helper subroutine

 src/PVE/Tools.pm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)


pve-container:

Filip Schauer (1):
  fix invalid device passthrough being added to config

 src/PVE/LXC.pm        | 18 ++++--------------
 src/PVE/LXC/Config.pm | 11 ++++++++++-
 2 files changed, 14 insertions(+), 15 deletions(-)


Summary over all repositories:
  3 files changed, 31 insertions(+), 16 deletions(-)

-- 
Generated by git-murpp 0.6.0




More information about the pve-devel mailing list