From 4cf694d2b31c7aa5c66cbb83d7d54c1a6cb1b4aa Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 26 Aug 2025 02:15:00 +0900 Subject: hst: use hsu userid for share path suffix The privileged user is identifier to hakurei through its hsu userid. Using the kernel uid here makes little sense and is a leftover design choice from before hsu was implemented. Closes #7. Signed-off-by: Ophestra --- hst/hst.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hst') diff --git a/hst/hst.go b/hst/hst.go index 6549450c..d9c1168b 100644 --- a/hst/hst.go +++ b/hst/hst.go @@ -12,16 +12,18 @@ import ( type Paths struct { // temporary directory returned by [os.TempDir] (usually `/tmp`) TempDir *container.Absolute `json:"temp_dir"` - // path to shared directory (usually `/tmp/hakurei.%d`) + // path to shared directory (usually `/tmp/hakurei.%d`, [Info.User]) SharePath *container.Absolute `json:"share_path"` - // XDG_RUNTIME_DIR value (usually `/run/user/%d`) + // XDG_RUNTIME_DIR value (usually `/run/user/%d`, uid) RuntimePath *container.Absolute `json:"runtime_path"` // application runtime directory (usually `/run/user/%d/hakurei`) RunDirPath *container.Absolute `json:"run_dir_path"` } type Info struct { + // User is the userid according to hsu. User int `json:"user"` + Paths } -- cgit v1.3.1