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/share.system.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/app/share.system.go') diff --git a/internal/app/share.system.go b/internal/app/share.system.go index cf2df947..26e9b568 100644 --- a/internal/app/share.system.go +++ b/internal/app/share.system.go @@ -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") -- cgit v1.3.1