summaryrefslogtreecommitdiff
path: root/internal/fusefrontend/xattr.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-10-01 21:39:19 +0200
committerJakob Unterwurzacher2019-01-01 16:24:09 +0100
commit0e2e7c13cfc6d37f2521db99bf0393c37a5549d6 (patch)
tree860fbf5081dd18dd0fcdd7830b86461aaf29453e /internal/fusefrontend/xattr.go
parentc09bf1f2284706232642431c75fa1f3d8500a9d0 (diff)
fusefrontend: mark symlink-safe FUSE calls
Document which FUSE calls are already symlink-safe in the function comment.
Diffstat (limited to 'internal/fusefrontend/xattr.go')
-rw-r--r--internal/fusefrontend/xattr.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/fusefrontend/xattr.go b/internal/fusefrontend/xattr.go
index 30f417e..2fd51a3 100644
--- a/internal/fusefrontend/xattr.go
+++ b/internal/fusefrontend/xattr.go
@@ -23,8 +23,8 @@ var xattrNameIV = []byte("xattr_name_iv_xx")
// encrypted original name.
var xattrStorePrefix = "user.gocryptfs."
-// GetXAttr reads the value of extended attribute "attr".
-// Implements pathfs.Filesystem.
+// GetXAttr - FUSE call. Reads the value of extended attribute "attr".
+// TODO: Make symlink-safe. Blocker: package xattr does not provide fgetxattr(2).
func (fs *FS) GetXAttr(path string, attr string, context *fuse.Context) ([]byte, fuse.Status) {
if fs.isFiltered(path) {
return nil, fuse.EPERM
@@ -85,7 +85,9 @@ func (fs *FS) RemoveXAttr(path string, attr string, context *fuse.Context) fuse.
return unpackXattrErr(xattr.LRemove(cPath, cAttr))
}
-// ListXAttr implements pathfs.Filesystem.
+// ListXAttr - FUSE call. Lists extended attributes on the file at "path".
+// TODO: Make symlink-safe. Blocker: package xattr does not provide
+// flistxattr(2).
func (fs *FS) ListXAttr(path string, context *fuse.Context) ([]string, fuse.Status) {
if fs.isFiltered(path) {
return nil, fuse.EPERM