filter unusable lxc mountoptions for rootfs

disable nodev and noexec per thomas' suggestion[0].

[0]: https://pve.proxmox.com/pipermail/pve-devel/2019-July/037994.html

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
This commit is contained in:
Oguz Bektas 2019-07-11 15:08:30 +02:00 committed by Thomas Lamprecht
parent 7a8653ceaa
commit 1780a64476

View File

@ -58,6 +58,14 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
if (mp.mountoptions) {
mp.mountoptions = mp.mountoptions.split(';');
}
if (this.confid === 'rootfs') {
var field = me.down('field[name=mountoptions]');
var forbidden = ['nodev', 'noexec'];
var filtered = field.comboItems.filter(e => !forbidden.includes(e[0]));
field.setComboItems(filtered);
}
me.setValues(mp);
},