app: alternative inner home path
All checks were successful
test / test (push) Successful in 24s

Support binding home to an alternative path in the mount namespace.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-11-18 00:18:21 +09:00
parent 866270ff05
commit 05b7dbf066
6 changed files with 19 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ func (seal *appSeal) sharePasswd(os linux.System) {
}
// bind home directory
seal.sys.bwrap.Bind(homeDir, homeDir, false, true)
seal.sys.bwrap.Bind(seal.sys.user.data, homeDir, false, true)
seal.sys.bwrap.Chdir = homeDir
seal.sys.bwrap.SetEnv["USER"] = username