aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/system.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-11-04 03:15:39 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-11-04 03:15:39 +0900
commitaf15b1c048e97c092f7a5eeb30f20d13cd972486 (patch)
treec2d9e82655844cbf7130651f3a918b8c8a256f13 /internal/app/system.go
parent7962681f4a9ea0614fe788ca2cda2c697cfff162 (diff)
app: support mapping target uid as privileged uid in sandbox
Chromium's D-Bus client implementation refuses to work when its getuid call returns a different value than what the D-Bus server is running as. The reason behind this is not fully understood, but this workaround is implemented to support chromium and electron apps. This is not used by default since it has many side effects that break many other programs, like SSH on NixOS. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/app/system.go')
-rw-r--r--internal/app/system.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/app/system.go b/internal/app/system.go
index 3c17cf41..47bbd7ed 100644
--- a/internal/app/system.go
+++ b/internal/app/system.go
@@ -20,6 +20,11 @@ type appSealSys struct {
// target user sealed from config
user *user.User
+ // mapped uid and gid in user namespace
+ mappedID int
+ // string representation of mappedID
+ mappedIDString string
+
needRevert bool
saveState bool
*system.I