summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/xattr_linux.go
blob: ebe42b17e26fd1159bbb5b80b5b5b509febe8105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// +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)
}