From 7c063833e01930b4b298a59363b783ab32cc0e41 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 17 Mar 2025 17:10:03 +0900 Subject: internal/sys: wrap getuid/getgid Signed-off-by: Ophestra --- fst/sandbox.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fst') 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{ -- cgit v1.3.1