all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>,
	pdm-devel@lists.proxmox.com
Subject: Re: [PATCH datacenter-manager] fix #7795: remote: guest shell: fix privilege path
Date: Wed, 8 Jul 2026 13:24:03 +0200	[thread overview]
Message-ID: <e7fd6763-4c68-4669-a32a-c34c9ad08cbe@proxmox.com> (raw)
In-Reply-To: <20260708104025.1161611-1-f.gruenbichler@proxmox.com>



On 7/8/26 12:40 PM, Fabian Grünbichler wrote:
> 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?

i guess the substitution fails during privilege check in proxmox-router
and that triggers a 403 higher up in the stack?

since that must be const, maybe there can be a compile time check that
the parameters must exist here?

> 
>   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,
>       ),





  reply	other threads:[~2026-07-08 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 10:40 [PATCH datacenter-manager] fix #7795: remote: guest shell: fix privilege path Fabian Grünbichler
2026-07-08 11:24 ` Dominik Csapak [this message]
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=e7fd6763-4c68-4669-a32a-c34c9ad08cbe@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal