fusefrontend: fix fd leak in Access()

Thanks @slackner!

Fixes https://github.com/rfjakob/gocryptfs/issues/306
This commit is contained in:
Jakob Unterwurzacher 2019-01-01 20:10:17 +01:00
parent 887d5aa8e7
commit 77c3df48ef
1 changed files with 1 additions and 0 deletions

View File

@ -630,6 +630,7 @@ func (fs *FS) Access(relPath string, mode uint32, context *fuse.Context) (code f
return fuse.ToStatus(err)
}
err = unix.Faccessat(dirfd, cName, mode, unix.AT_SYMLINK_NOFOLLOW)
syscall.Close(dirfd)
return fuse.ToStatus(err)
}