Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Levin Zimmermann
go-fuse
Commits
b14c4e22
Commit
b14c4e22
authored
Apr 01, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nodefs: document Access
parent
b1188e32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
nodefs/api.go
nodefs/api.go
+11
-6
No files found.
nodefs/api.go
View file @
b14c4e22
...
@@ -104,13 +104,18 @@ type Statfser interface {
...
@@ -104,13 +104,18 @@ type Statfser interface {
Statfs
(
ctx
context
.
Context
,
out
*
fuse
.
StatfsOut
)
syscall
.
Errno
Statfs
(
ctx
context
.
Context
,
out
*
fuse
.
StatfsOut
)
syscall
.
Errno
}
}
// Access should return if the caller can access the file with
// Access should return if the caller can access the file with the
// the given mode. In this case, the context has data about
// given mode. This is used for two purposes: to determine if a user
// the real UID. For example a root-SUID binary called by user
// may enter a directory, and to answer to implement the access system
// susan gets the UID and GID for susan here.
// call. In the latter case, the context has data about the real
// UID. For example, a root-SUID binary called by user susan gets the
// UID and GID for susan here.
//
//
// If not defined, a default implementation will check traditional
// If not defined, a default implementation will check traditional
// unix permissions of the Getattr result agains the caller.
// unix permissions of the Getattr result agains the caller. If so, it
// is necessary to either return permissions from GetAttr/Lookup or
// set Options.DefaultPermissions in order to allow chdir into the
// FUSE mount.
type
Accesser
interface
{
type
Accesser
interface
{
Access
(
ctx
context
.
Context
,
mask
uint32
)
syscall
.
Errno
Access
(
ctx
context
.
Context
,
mask
uint32
)
syscall
.
Errno
}
}
...
@@ -455,7 +460,7 @@ type Options struct {
...
@@ -455,7 +460,7 @@ type Options struct {
// functionality of the root node.
// functionality of the root node.
OnAdd
func
(
ctx
context
.
Context
)
OnAdd
func
(
ctx
context
.
Context
)
// DefaultPermissions sets
a
ll file permissions to 755 (dirs)
// DefaultPermissions sets
nu
ll file permissions to 755 (dirs)
// or 644 (other files.)
// or 644 (other files.)
DefaultPermissions
bool
DefaultPermissions
bool
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment