fusefrontend_reverse: fix fd leak in GetAttr
Fixes https://github.com/rfjakob/gocryptfs/issues/184
This commit is contained in:
parent
87736eb833
commit
48bd59f388
@ -161,6 +161,7 @@ func (rfs *ReverseFS) GetAttr(relPath string, context *fuse.Context) (*fuse.Attr
|
||||
if err != nil {
|
||||
return nil, fuse.ToStatus(err)
|
||||
}
|
||||
syscall.Close(dirFd)
|
||||
// Instead of risking an inode number collision, we return an error.
|
||||
if st.Ino > inoBaseMin {
|
||||
tlog.Warn.Printf("GetAttr %q: backing file inode number %d crosses reserved space, max=%d. Returning EOVERFLOW.",
|
||||
|
Loading…
x
Reference in New Issue
Block a user