aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/sys/interface.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-07-02 20:42:51 +0900
committerOphestra <cat@gensokyo.uk>2025-07-02 20:42:51 +0900
commiteb22a8bcc1ac03357d4073e5d3ed6d0ab5246a37 (patch)
treed27d1f724a18bb47bf48816a444dccac28b5248c /internal/sys/interface.go
parent31aef905fa819310ee7694775a836c294ff742e4 (diff)
cmd/hakurei: move to cmd
Having it at the project root never made sense since the "ego" name was deprecated. This change finally addresses it. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/sys/interface.go')
-rw-r--r--internal/sys/interface.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/sys/interface.go b/internal/sys/interface.go
index 57c5a7ec..06cb450c 100644
--- a/internal/sys/interface.go
+++ b/internal/sys/interface.go
@@ -1,3 +1,4 @@
+// Package sys wraps OS interaction library functions.
package sys
import (
@@ -6,7 +7,7 @@ import (
"path"
"strconv"
- "git.gensokyo.uk/security/hakurei/internal/app"
+ "git.gensokyo.uk/security/hakurei/hst"
"git.gensokyo.uk/security/hakurei/internal/hlog"
)
@@ -40,15 +41,15 @@ type State interface {
Println(v ...any)
Printf(format string, v ...any)
- // Paths returns a populated [Paths] struct.
- Paths() app.Paths
+ // Paths returns a populated [hst.Paths] struct.
+ Paths() hst.Paths
// Uid invokes hsu and returns target uid.
// Any errors returned by Uid is already wrapped [fmsg.BaseError].
Uid(aid int) (int, error)
}
// CopyPaths is a generic implementation of [hst.Paths].
-func CopyPaths(os State, v *app.Paths) {
+func CopyPaths(os State, v *hst.Paths) {
v.SharePath = path.Join(os.TempDir(), "hakurei."+strconv.Itoa(os.Getuid()))
hlog.Verbosef("process share directory at %q", v.SharePath)