Compare commits

..

2 Commits

Author SHA1 Message Date
Ophestra Umiker d031c820ff
shim: expose checkPid in constructor
test / test (push) Successful in 21s Details
This will be supported soon when launching via fsu.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-27 23:49:37 +09:00
Ophestra Umiker 5524e09a5f
fsu: implement simple setuid user switcher
test / test (push) Successful in 20s Details
Contains path to fortify set at compile time, authenticates based on a simple uid range assignment file which also acts as the allow list.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
2024-10-27 23:45:52 +09:00
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ func parseConfig(p string, puid int) (fid int, ok bool) {
} else if s.Mode().Perm() != 0400 {
log.Fatal("bad fsurc perm")
} else if st := s.Sys().(*syscall.Stat_t); st.Uid != 0 || st.Gid != 0 {
log.Fatal("fsurc must be owned by uid 0")
log.Fatal("fsurc must be owner by uid 0")
}
if r, err := os.Open(p); err != nil {