summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/tmpfs/socket_file.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2021-02-10 17:43:25 -0800
committergVisor bot <gvisor-bot@google.com>2021-02-10 17:45:18 -0800
commit81ea0016e62318053f97ec714967047e6191fb2b (patch)
tree36cffbaec97f79f8f06f442d28aba077f470b4be /pkg/sentry/fsimpl/tmpfs/socket_file.go
parentff04d019e3d20adf0f5ef3146fa28d3b83a4819a (diff)
Support setgid directories in tmpfs and kernfs
PiperOrigin-RevId: 356868412
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs/socket_file.go')
-rw-r--r--pkg/sentry/fsimpl/tmpfs/socket_file.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/socket_file.go b/pkg/sentry/fsimpl/tmpfs/socket_file.go
index 5699d5975..6112279b0 100644
--- a/pkg/sentry/fsimpl/tmpfs/socket_file.go
+++ b/pkg/sentry/fsimpl/tmpfs/socket_file.go
@@ -28,9 +28,9 @@ type socketFile struct {
ep transport.BoundEndpoint
}
-func (fs *filesystem) newSocketFile(kuid auth.KUID, kgid auth.KGID, mode linux.FileMode, ep transport.BoundEndpoint) *inode {
+func (fs *filesystem) newSocketFile(kuid auth.KUID, kgid auth.KGID, mode linux.FileMode, ep transport.BoundEndpoint, parentDir *directory) *inode {
file := &socketFile{ep: ep}
- file.inode.init(file, fs, kuid, kgid, mode)
+ file.inode.init(file, fs, kuid, kgid, mode, parentDir)
file.inode.nlink = 1 // from parent directory
return &file.inode
}