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