f320b76fd1
Darwin now also has these functions, use them. Simplifies the code and makes it symlink-safe on Darwin as well.
22 lines
501 B
Go
22 lines
501 B
Go
// +build linux
|
|
|
|
// Package fusefrontend interfaces directly with the go-fuse library.
|
|
package fusefrontend
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// Only allow the "user" namespace, block "trusted" and "security", as
|
|
// these may be interpreted by the system, and we don't want to cause
|
|
// trouble with our encrypted garbage.
|
|
const xattrUserPrefix = "user."
|
|
|
|
func disallowedXAttrName(attr string) bool {
|
|
return !strings.HasPrefix(attr, xattrUserPrefix)
|
|
}
|
|
|
|
func filterXattrSetFlags(flags int) int {
|
|
return flags
|
|
}
|