aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_linux.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-07-11 19:44:45 +0200
committerJakob Unterwurzacher2020-07-11 19:44:45 +0200
commit84344834c4fb49c2eb484bcc43d24a2522b1b5c1 (patch)
tree3330c70ad66dec26ab0a7a702eee1d8f8f22acd5 /internal/syscallcompat/sys_linux.go
parent250dbc64362265beace368b62f5a6656908a2e84 (diff)
v2api: remove OpenatUserCtx, MknodatUserCtx helpers
Instead, use the new toFuseCtx() function introduced in an earlier commit.
Diffstat (limited to 'internal/syscallcompat/sys_linux.go')
-rw-r--r--internal/syscallcompat/sys_linux.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/internal/syscallcompat/sys_linux.go b/internal/syscallcompat/sys_linux.go
index 5a23084..42e9da6 100644
--- a/internal/syscallcompat/sys_linux.go
+++ b/internal/syscallcompat/sys_linux.go
@@ -2,7 +2,6 @@
package syscallcompat
import (
- "context"
"fmt"
"io/ioutil"
"runtime"
@@ -89,20 +88,6 @@ func getSupplementaryGroups(pid uint32) (gids []int) {
return nil
}
-// OpenatUserCtx is a tries to extract a fuse.Context from the generic ctx and
-// calls OpenatUser.
-func OpenatUserCtx(dirfd int, path string, flags int, mode uint32, ctx context.Context) (fd int, err error) {
- var ctx2 *fuse.Context
- if ctx != nil {
- if caller, ok := fuse.FromContext(ctx); ok {
- ctx2 = &fuse.Context{
- Caller: *caller,
- }
- }
- }
- return OpenatUser(dirfd, path, flags, mode, ctx2)
-}
-
// OpenatUser runs the Openat syscall in the context of a different user.
func OpenatUser(dirfd int, path string, flags int, mode uint32, context *fuse.Context) (fd int, err error) {
if context != nil {
@@ -136,20 +121,6 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
return syscall.Mknodat(dirfd, path, mode, dev)
}
-// MknodatUserCtx is a tries to extract a fuse.Context from the generic ctx and
-// calls OpenatUser.
-func MknodatUserCtx(dirfd int, path string, mode uint32, dev int, ctx context.Context) (err error) {
- var ctx2 *fuse.Context
- if ctx != nil {
- if caller, ok := fuse.FromContext(ctx); ok {
- ctx2 = &fuse.Context{
- Caller: *caller,
- }
- }
- }
- return MknodatUser(dirfd, path, mode, dev, ctx2)
-}
-
// MknodatUser runs the Mknodat syscall in the context of a different user.
func MknodatUser(dirfd int, path string, mode uint32, dev int, context *fuse.Context) (err error) {
if context != nil {