]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #1451: allow some extra mount options for container
authorOguz Bektas <o.bektas@proxmox.com>
Fri, 5 Jul 2019 11:27:06 +0000 (13:27 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 5 Jul 2019 16:50:04 +0000 (18:50 +0200)
This allows the following non-problematic mount options for lxc
container mountpoints:
* noexec - Do not permit execution of binaries on the mounted FS
* noatime - Do not update inode access times on this filesystem
* nosuid - Do not allow suid or sgid bits to take effect
* nodev - Do not interpret character or block devices on the FS

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
www/manager6/lxc/MPEdit.js

index c7c3870a33bae32698f0837a636165345173dd07..e33cf54dfe7308be05b1f7037fc6c412ab37d23f 100644 (file)
@@ -29,6 +29,9 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 
        var confid = me.confid || "mp"+values.mpid;
        values.file = me.down('field[name=file]').getValue();
+       if (values.mountoptions) {
+           values.mountoptions = values.mountoptions.join(';');
+       }
 
        if (me.unused) {
            confid = "mp"+values.mpid;
@@ -52,6 +55,9 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
        var me = this;
        var vm = this.getViewModel();
        vm.set('mptype', mp.type);
+       if (mp.mountoptions) {
+           mp.mountoptions = mp.mountoptions.split(';');
+       }
        me.setValues(mp);
     },
 
@@ -274,6 +280,21 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
            },
            allowBlank: true
        },
+       {
+           xtype: 'proxmoxKVComboBox',
+           name: 'mountoptions',
+           fieldLabel: gettext('Mount options'),
+           deleteEmpty: false,
+           comboItems: [
+               ['noatime', 'noatime'],
+               ['nodev', 'nodev'],
+               ['noexec', 'noexec'],
+               ['nosuid', 'nosuid']
+           ],
+           multiSelect: true,
+           value: [],
+           allowBlank: true
+       },
        {
            xtype: 'proxmoxcheckbox',
            inputValue: '0', // reverses the logic