diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-26 02:15:00 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-26 02:16:33 +0900 |
| commit | 4cf694d2b31c7aa5c66cbb83d7d54c1a6cb1b4aa (patch) | |
| tree | d4d964e10e8a50f60cc438ece76362b174e329c0 /hst | |
| parent | c9facb746b7be0f2d8f6b9b2227340ba2ec12060 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'hst')
| -rw-r--r-- | hst/hst.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 } |
