[pve-devel] [PATCH v2 manager] filter unusable lxc mountoptions for rootfs

Dominik Csapak d.csapak at proxmox.com
Thu Jul 11 15:01:40 CEST 2019


still ok but i now saw something i did not see before, comment inline

On 7/11/19 2:53 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>
> ---
> 
> v1 -> v2:
> * define 'field' only in if branch to avoid unnecessary .down
> * remove unintentional whitespace
> 
>   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..59651712 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'];
> +	    filtered = field.comboItems.filter(e => !forbidden.includes(e[0]));

it seems this should be 'var filtered' else this gets assigned
to 'window.filtered' (in a browser at least)

> +	    field.setComboItems(filtered);
> +	}
> +
>   	me.setValues(mp);
>       },
>   
> 





More information about the pve-devel mailing list