bastion 0.54.0
ci / personal-data (push) Successful in 4s
ci / fuzz (push) Successful in 2m44s
ci / test (push) Successful in 2m11s

This commit is contained in:
Privatae
2026-10-21 22:29:10 +00:00
parent e4c9b69b46
commit d62da8adb4
58 changed files with 6944 additions and 124 deletions
+33
View File
@@ -0,0 +1,33 @@
//go:build !linux && !darwin && !windows
package main
import "os"
// No account list on this platform (mcpconfig_other.go), so the reader never
// gets here; this keeps the package building. A path is still opened only
// when it was a regular file, and the opened file must be the one looked at.
func mcpOpenRegular(path string) (*os.File, string, error) {
st, err := os.Stat(path)
if err != nil {
return nil, "", err
}
if !st.Mode().IsRegular() {
return nil, "", errMCPNotRegular
}
f, err := os.Open(path)
if err != nil {
return nil, "", err
}
fi, err := f.Stat()
if err != nil || !fi.Mode().IsRegular() || !os.SameFile(fi, st) {
f.Close()
return nil, "", errMCPNotRegular
}
return f, mcpOwnerUnknown, nil
}
var mcpAdminOwners = map[string]bool{}
// mcpPathOwner: no owner model here, so no owner check.
func mcpPathOwner(string) string { return mcpNoOwnerCheck }