Skip to content

Commit d01c1f4

Browse files
authored
Merge pull request google#6 from craig08/fuse-symlink-fix-resolve-link
fuse: Fix path resolving fails by implementing inode.Getlink
2 parents 948b19a + 349cd9c commit d01c1f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/sentry/fsimpl/fuse/fusefs.go

+6
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,12 @@ func (i *inode) newEntry(kernelTask *kernel.Task, req *Request, name string, fil
503503
return child.VFSDentry(), nil
504504
}
505505

506+
// Getlink implements Inode.Getlink.
507+
func (i *inode) Getlink(ctx context.Context, mnt *vfs.Mount) (vfs.VirtualDentry, string, error) {
508+
path, err := i.Readlink(ctx, mnt)
509+
return vfs.VirtualDentry{}, path, err
510+
}
511+
506512
// Readlink implements Inode.Readlink.
507513
func (i *inode) Readlink(ctx context.Context, mnt *vfs.Mount) (string, error) {
508514
if i.Mode().FileType()&linux.S_IFLNK == 0 {

0 commit comments

Comments
 (0)