[pve-devel] [RFC manager 2/3] fix #6094: api: node HW: allow to get usb info with Sys.Audit on /

Fiona Ebner f.ebner at proxmox.com
Tue May 6 15:52:46 CEST 2025


Am 17.02.25 um 13:19 schrieb Daniel Kral:
> Relax the required permissions to query the current list of locally
> available USB devices. The API endpoint does only read the USB topology
> from the sysfs but does not modify any system state.
> 
> Keep Sys.Modify for backwards compatibility.
> 
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>

> ---
>  PVE/API2/Hardware/USB.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/API2/Hardware/USB.pm b/PVE/API2/Hardware/USB.pm
> index d7cb6607..049d1170 100644
> --- a/PVE/API2/Hardware/USB.pm
> +++ b/PVE/API2/Hardware/USB.pm
> @@ -17,7 +17,7 @@ __PACKAGE__->register_method({
>      protected => 1,
>      proxyto => "node",
>      permissions => {
> -	check => ['perm', '/', ['Sys.Modify']],
> +	check => ['perm', '/', [ 'Sys.Audit', 'Sys.Modify' ], any => 1],
>      },
>      parameters => {
>  	additionalProperties => 0,





More information about the pve-devel mailing list