]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/LunCmd/LIO.pm
LIO: untaint values read from remote config
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 12 Oct 2020 15:34:57 +0000 (17:34 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 13 Oct 2020 09:11:05 +0000 (11:11 +0200)
commitd4abdf4e22c6424ef84b53b5947c5ba0d4b2df5f
tree69e25052df445fb1a1d028435b3b884236ce664a
parent609f117ff24d2cff6b155e1d4b1175ceebe5bd7b
LIO: untaint values read from remote config

The LIO backend for ZFS over iSCSI fetches the json-config periodically from
the target.
This patch reduces the stored config values to those which are actually used
and additonally untaints the values read from the remote host's config-file.

Since the LUN index is used in calls to targetcli on the remote host (via
run_command), untainting prevents the call to crash when run with '-T'.

Tested by creating a zfs over iscsi backed VM, starting it, adding disks,
resizing disks, removing disks, creating snapshots, rolling back to a snapshot.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
PVE/Storage/LunCmd/LIO.pm