From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id E5D381FF13A for ; Wed, 08 Jul 2026 12:41:00 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 86C8621446; Wed, 08 Jul 2026 12:41:00 +0200 (CEST) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pdm-devel@lists.proxmox.com Subject: [PATCH datacenter-manager] fix #7795: remote: guest shell: fix privilege path Date: Wed, 8 Jul 2026 12:40:14 +0200 Message-ID: <20260708104025.1161611-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783507218118 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.110 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4EUDSYD2VTCQJSHNN4EM3LOFLOTTEPME X-Message-ID-Hash: 4EUDSYD2VTCQJSHNN4EM3LOFLOTTEPME X-MailFrom: f.gruenbichler@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: the wrong path was copied over from the node shell, and since there is no "node" parameter here, calls as non-root will fail with 403.. Fixes: 525c8c49 "server: add termproxy and vncwebsocket calls for qemu guests" Signed-off-by: Fabian Grünbichler --- 403 if the API schema is actually invalid might be something to catch lower in the stack as well? server/src/api/pve/lxc.rs | 4 ++-- server/src/api/pve/qemu.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/api/pve/lxc.rs b/server/src/api/pve/lxc.rs index 6183f62d..ca32eb84 100644 --- a/server/src/api/pve/lxc.rs +++ b/server/src/api/pve/lxc.rs @@ -807,9 +807,9 @@ pub const API_METHOD_LXC_WEBSOCKET: ApiMethod = ApiMethod::new( ), ) .access( - Some("The user needs Sys.Console on /resource/{remote}/node/{node}."), + Some("The user needs Sys.Console on /resource/{remote}/guest/{vmid}."), &Permission::Privilege( - &["resource", "{remote}", "node", "{node}"], + &["resource", "{remote}", "guest", "{vmid}"], PRIV_SYS_CONSOLE, false, ), diff --git a/server/src/api/pve/qemu.rs b/server/src/api/pve/qemu.rs index 65de6389..5d01e69e 100644 --- a/server/src/api/pve/qemu.rs +++ b/server/src/api/pve/qemu.rs @@ -895,9 +895,9 @@ pub const API_METHOD_QEMU_WEBSOCKET: ApiMethod = ApiMethod::new( ), ) .access( - Some("The user needs Sys.Console on /resource/{remote}/node/{node}."), + Some("The user needs Sys.Console on /resource/{remote}/guest/{vmid}."), &Permission::Privilege( - &["resource", "{remote}", "node", "{node}"], + &["resource", "{remote}", "guest", "{vmid}"], PRIV_SYS_CONSOLE, false, ), -- 2.47.3