Add support for macOS system extension

This commit is contained in:
世界
2023-07-24 15:44:11 +08:00
parent 77b6b371f4
commit 9da6815a95
3 changed files with 31 additions and 31 deletions

View File

@@ -78,6 +78,14 @@ func (s *CommandServer) Start() error {
if err != nil {
return err
}
if sUserID > 0 {
err = os.Chown(s.sockPath, sUserID, sGroupID)
if err != nil {
listener.Close()
os.Remove(s.sockPath)
return err
}
}
s.listener = listener
go s.loopConnection(listener)
return nil