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