[pve-devel] applied: [PATCH v3 manager 2/2] filter unusable lxc mountoptions for rootfs

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jul 12 12:29:23 CEST 2019


On 7/11/19 3:08 PM, Oguz Bektas wrote:
> 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 at proxmox.com>
> ---
> v2 -> v3:
> * change from 'field' to 'var field' to avoid assigning 'window.field'
> 
>  www/manager6/lxc/MPEdit.js | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/www/manager6/lxc/MPEdit.js b/www/manager6/lxc/MPEdit.js
> index 7689340d..8851c5fc 100644
> --- a/www/manager6/lxc/MPEdit.js
> +++ b/www/manager6/lxc/MPEdit.js
> @@ -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);
>      },
>  
> 

applied




More information about the pve-devel mailing list