public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
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	[thread overview]
Message-ID: <20260708104025.1161611-1-f.gruenbichler@proxmox.com> (raw)

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 <f.gruenbichler@proxmox.com>
---
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





             reply	other threads:[~2026-07-08 10:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 10:40 Fabian Grünbichler [this message]
2026-07-08 11:24 ` [PATCH datacenter-manager] fix #7795: remote: guest shell: fix privilege path Dominik Csapak
2026-07-08 13:37   ` Dominik Csapak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260708104025.1161611-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pdm-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal