fusefrontend: prepareAtSyscall: handle error when opening ourselves
Error handling was missing here, so we would later get confusing EBADF errors due to dirfd being -1.
This commit is contained in:
parent
0ca302f12a
commit
1dfd6b7b76
@ -66,6 +66,9 @@ func (n *Node) prepareAtSyscall(child string) (dirfd int, cName string, errno sy
|
|||||||
defer syscall.Close(parentDirfd)
|
defer syscall.Close(parentDirfd)
|
||||||
|
|
||||||
dirfd, err := syscallcompat.Openat(parentDirfd, myCName, syscall.O_NOFOLLOW|syscall.O_DIRECTORY|syscallcompat.O_PATH, 0)
|
dirfd, err := syscallcompat.Openat(parentDirfd, myCName, syscall.O_NOFOLLOW|syscall.O_DIRECTORY|syscallcompat.O_PATH, 0)
|
||||||
|
if err != nil {
|
||||||
|
return -1, "", fs.ToErrno(err)
|
||||||
|
}
|
||||||
|
|
||||||
// Cache store
|
// Cache store
|
||||||
if !rn.args.PlaintextNames {
|
if !rn.args.PlaintextNames {
|
||||||
|
Loading…
Reference in New Issue
Block a user