From 7962681f4a9ea0614fe788ca2cda2c697cfff162 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 4 Nov 2024 00:49:32 +0900 Subject: app: format mapped uid instead of real uid Signed-off-by: Ophestra Umiker --- internal/app/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'internal/app/config.go') diff --git a/internal/app/config.go b/internal/app/config.go index 49465257..eccb5922 100644 --- a/internal/app/config.go +++ b/internal/app/config.go @@ -8,6 +8,11 @@ import ( "git.ophivana.moe/security/fortify/internal/system" ) +const ( + mappedID = 65534 + mappedIDString = "65534" +) + // Config is used to seal an *App type Config struct { // D-Bus application ID @@ -95,7 +100,7 @@ func (s *SandboxConfig) Bwrap() *bwrap.Config { // initialise map Chmod: make(map[string]os.FileMode), }). - SetUID(65534).SetGID(65534). + SetUID(mappedID).SetGID(mappedID). Procfs("/proc").DevTmpfs("/dev").Mqueue("/dev/mqueue"). Tmpfs("/dev/fortify", 4*1024) -- cgit v1.3.1