qemu-server/PVE/QemuServer
Leo Nunner f5a88e9870 fix #4321: properly check cloud-init drive permissions
The process for editing Cloud-init drives checked for inconsistent
permissions: for adding, the VM.Config.Disk permission was needed, while
the VM.Config.CDROM permission was needed to remove a drive. The regex
in drive_is_cloudinit needed to be adapted since the drive names have
different formats before/after they are actually generated.

Due to the regex letting names fall through before, Cloud-init drives
were being checked as disks, even though they are actually treated as
CDROM drives. Due to this, it makes more sense to check for
VM.Config.CDROM instead, while also requiring VM.Config.Cloudinit, since
generating a Cloud-init drive already generates default values that are
passed to the VM.

Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
2022-11-17 08:10:28 +01:00
..
Agent.pm tree wide cleanup of s/return undef/return/ 2020-10-16 16:20:05 +02:00
CGroup.pm add PVE::QemuServer::Cgroup 2020-11-24 12:00:33 +01:00
Cloudinit.pm drop get_pending_changes and simplify cloudinit_pending api call 2022-11-16 18:17:07 +01:00
CPUConfig.pm cleanup validate_cpu_conf 2022-11-15 08:49:04 +01:00
Drive.pm fix #4321: properly check cloud-init drive permissions 2022-11-17 08:10:28 +01:00
Helpers.pm move 'windows_version' to Helpers 2022-11-10 17:02:34 +01:00
ImportDisk.pm api: support VM disk import 2022-04-04 16:41:13 +02:00
Machine.pm cfg2cmd: fix +pveN machine types with pxe 2021-04-18 17:58:56 +02:00
Makefile add PVE::QemuServer::Cgroup 2020-11-24 12:00:33 +01:00
Memory.pm fix #3581: pass size via argument for memory-backend-ram qmp call 2021-08-18 10:41:04 +02:00
Monitor.pm mon_cmd: add explicit return 2019-11-30 17:24:55 +01:00
OVF.pm parse ovf: untaint path when calling file_size_info 2022-03-11 10:45:59 +01:00
PCI.pm pci: make mediated device sysfs path independent of PCI id 2022-11-09 09:06:19 +01:00
USB.pm usb: fixup: include USB config only for non-q35 again 2022-11-11 07:43:03 +01:00