summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/tmpfs/symlink.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-02-11 01:49:51 +0000
committergVisor bot <gvisor-bot@google.com>2021-02-11 01:49:51 +0000
commit03d099577c93e3e4098c85a570e41664a0d72bc0 (patch)
treeff0bb5597b26cd68a7f7b433b3e9bccba0051121 /pkg/sentry/fsimpl/tmpfs/symlink.go
parent9994360861f68e806d4c1e2ad949015cc55d130f (diff)
parent81ea0016e62318053f97ec714967047e6191fb2b (diff)
Merge release-20210201.0-84-g81ea0016e (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs/symlink.go')
-rw-r--r--pkg/sentry/fsimpl/tmpfs/symlink.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/symlink.go b/pkg/sentry/fsimpl/tmpfs/symlink.go
index a102a2ee2..6a83296bc 100644
--- a/pkg/sentry/fsimpl/tmpfs/symlink.go
+++ b/pkg/sentry/fsimpl/tmpfs/symlink.go
@@ -25,11 +25,11 @@ type symlink struct {
target string // immutable
}
-func (fs *filesystem) newSymlink(kuid auth.KUID, kgid auth.KGID, mode linux.FileMode, target string) *inode {
+func (fs *filesystem) newSymlink(kuid auth.KUID, kgid auth.KGID, mode linux.FileMode, target string, parentDir *directory) *inode {
link := &symlink{
target: target,
}
- link.inode.init(link, fs, kuid, kgid, linux.S_IFLNK|mode)
+ link.inode.init(link, fs, kuid, kgid, linux.S_IFLNK|mode, parentDir)
link.inode.nlink = 1 // from parent directory
return &link.inode
}