From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call
Date: Mon, 11 Aug 2025 16:18:43 +0200 [thread overview]
Message-ID: <20250811141847.271476-3-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20250811141847.271476-1-s.hanreich@proxmox.com>
When starting the privileged API, the server would fail with the
following error messages:
Error: unable to set ownership for api socket '/run/proxmox-datacenter-manager/priv.sock' - EINVAL: Invalid argument
chown(2) only supports the AT_SYMLINK_NOFOLLOW, not AT_SYMLINK_FOLLOW
so this was probably a oversight. Pass empty flags to fchownat
instead.
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
server/src/bin/proxmox-datacenter-privileged-api.rs | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/server/src/bin/proxmox-datacenter-privileged-api.rs b/server/src/bin/proxmox-datacenter-privileged-api.rs
index 66033eb..bd2c6dd 100644
--- a/server/src/bin/proxmox-datacenter-privileged-api.rs
+++ b/server/src/bin/proxmox-datacenter-privileged-api.rs
@@ -161,16 +161,9 @@ async fn run() -> Result<(), Error> {
format_err!("unable to set mode for api socket '{sockpath:?}' - {err}")
})?;
- fchownat(
- None,
- sockpath,
- None,
- Some(api_user.gid),
- AtFlags::AT_SYMLINK_FOLLOW,
- )
- .map_err(|err| {
- format_err!("unable to set ownership for api socket '{sockpath}' - {err}")
- })?;
+ fchownat(None, sockpath, None, Some(api_user.gid), AtFlags::empty()).map_err(
+ |err| format_err!("unable to set ownership for api socket '{sockpath}' - {err}"),
+ )?;
log::info!("created socket, notifying readiness to systemd and starting API server");
--
2.47.2
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-08-11 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 14:18 [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Stefan Hanreich
2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 1/3] qemu: set with_conntrack_state when remote migrating Stefan Hanreich
2025-08-12 8:02 ` [pdm-devel] applied: " Dominik Csapak
2025-08-11 14:18 ` Stefan Hanreich [this message]
2025-08-12 7:31 ` [pdm-devel] [PATCH proxmox-datacenter-manager 2/3] api: privileged: fix fchownat call Lukas Wagner
2025-08-12 8:03 ` Dominik Csapak
2025-08-11 14:18 ` [pdm-devel] [PATCH proxmox-datacenter-manager 3/3] lxc: qemu: set new status properties Stefan Hanreich
2025-08-12 8:02 ` [pdm-devel] applied: " Dominik Csapak
2025-08-12 7:08 ` [pdm-devel] [PATCH proxmox-datacenter-manager 0/3] fix pdm build for trixie Dominik Csapak
2025-08-12 7:32 ` Lukas Wagner
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=20250811141847.271476-3-s.hanreich@proxmox.com \
--to=s.hanreich@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