forked from security/hakurei
app: format mapped uid instead of real uid
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
@@ -58,12 +58,12 @@ func (seal *appSeal) sharePasswd(os linux.System) {
|
||||
homeDir = seal.sys.user.HomeDir
|
||||
seal.sys.bwrap.SetEnv["HOME"] = seal.sys.user.HomeDir
|
||||
}
|
||||
passwd := username + ":x:65534:65534:Fortify:" + homeDir + ":" + sh + "\n"
|
||||
passwd := username + ":x:" + mappedIDString + ":" + mappedIDString + ":Fortify:" + homeDir + ":" + sh + "\n"
|
||||
seal.sys.Write(passwdPath, passwd)
|
||||
|
||||
// write /etc/group
|
||||
groupPath := path.Join(seal.share, "group")
|
||||
seal.sys.Write(groupPath, "fortify:x:65534:\n")
|
||||
seal.sys.Write(groupPath, "fortify:x:"+mappedIDString+":\n")
|
||||
|
||||
// bind /etc/passwd and /etc/group
|
||||
seal.sys.bwrap.Bind(passwdPath, "/etc/passwd")
|
||||
|
||||
Reference in New Issue
Block a user