2018-04-17 20:33:04 +02:00
|
|
|
// +build linux
|
|
|
|
|
|
|
|
// Package fusefrontend interfaces directly with the go-fuse library.
|
|
|
|
package fusefrontend
|
|
|
|
|
2018-11-11 17:43:48 +01:00
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
)
|
2018-04-17 20:33:04 +02:00
|
|
|
|
|
|
|
// 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)
|
|
|
|
}
|
2018-05-01 18:46:51 +02:00
|
|
|
|
|
|
|
func filterXattrSetFlags(flags int) int {
|
|
|
|
return flags
|
|
|
|
}
|