app: support mapping target uid as privileged uid in sandbox
All checks were successful
test / test (push) Successful in 40s

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>
This commit is contained in:
2024-11-04 03:15:39 +09:00
parent 7962681f4a
commit af15b1c048
4 changed files with 25 additions and 11 deletions

View File

@@ -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