[pve-devel] [PATCH manager 2/2] ui: lxc: add deny read/write options for device passthrough

Filip Schauer f.schauer at proxmox.com
Mon Apr 29 15:15:29 CEST 2024


Add checkboxes to the device passthrough dialogue for restricting
container read/write access to a passed through device.

Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
---
 www/manager6/lxc/DeviceEdit.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/www/manager6/lxc/DeviceEdit.js b/www/manager6/lxc/DeviceEdit.js
index cdbd9acc..d4b3e34a 100644
--- a/www/manager6/lxc/DeviceEdit.js
+++ b/www/manager6/lxc/DeviceEdit.js
@@ -95,6 +95,20 @@ Ext.define('PVE.lxc.DeviceInputPanel', {
 		return gettext("Access mode has to be an octal number");
 	    },
 	},
+	{
+	    xtype: 'checkbox',
+	    name: 'deny_read',
+	    fieldLabel: gettext('Deny Read in CT'),
+	    labelWidth: 120,
+	    checked: false,
+	},
+	{
+	    xtype: 'checkbox',
+	    name: 'deny_write',
+	    fieldLabel: gettext('Deny Write in CT'),
+	    labelWidth: 120,
+	    checked: false,
+	},
     ],
 });
 
@@ -145,6 +159,8 @@ Ext.define('PVE.lxc.DeviceEdit', {
 		    mode: data.mode,
 		    uid: data.uid,
 		    gid: data.gid,
+		    deny_read: data.deny_read,
+		    deny_write: data.deny_write,
 		};
 
 		ipanel.setValues(values);
-- 
2.39.2





More information about the pve-devel mailing list