aboutsummaryrefslogtreecommitdiffhomepage
path: root/fst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-17 17:10:03 +0900
committerOphestra <cat@gensokyo.uk>2025-03-17 17:10:03 +0900
commit7c063833e01930b4b298a59363b783ab32cc0e41 (patch)
tree2e867242f35f74978905e7165b3b0e092af707ff /fst
parentaf3619d440d2d9c5bc0340653e4dd7cf98275e4a (diff)
internal/sys: wrap getuid/getgid
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'fst')
-rw-r--r--fst/sandbox.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/fst/sandbox.go b/fst/sandbox.go
index aaa018ba..fc12da43 100644
--- a/fst/sandbox.go
+++ b/fst/sandbox.go
@@ -47,7 +47,7 @@ type SandboxConfig struct {
// SandboxSys encapsulates system functions used during the creation of [bwrap.Config].
type SandboxSys interface {
- Geteuid() int
+ Getuid() int
Paths() Paths
ReadDir(name string) ([]fs.DirEntry, error)
EvalSymlinks(path string) (string, error)
@@ -73,7 +73,7 @@ func (s *SandboxConfig) Bwrap(sys SandboxSys, uid *int) (*bwrap.Config, error) {
} else {
// some programs fail to connect to dbus session running as a different uid, so a separate workaround
// is introduced to map priv-side caller uid in namespace
- *uid = sys.Geteuid()
+ *uid = sys.Getuid()
}
conf := (&bwrap.Config{