[Bug 263625] FUSE_CREATE is broken on anything older than protocol version 7.9

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 28 Apr 2022 09:42:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263625

            Bug ID: 263625
           Summary: FUSE_CREATE is broken on anything older than protocol
                    version 7.9
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: ali.abdallah@suse.com

Created attachment 233558
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=233558&action=edit
Fix FUSE_CREATE compat entry size read

While porting webdav fuse filesystem to FreeBSD, which uses protocol version
7.5, I noticed that FUSE_CREATE always fails. After digging into the code, I
noticed that on FUSE_CREATE, the cast of fuse_open_out to fuse_entry_out has
the wrong offset for protocol versions prior to 7.9.

AFAIK, prior to 7.9 version, fuse_attr didn't have blksize and padding fields,
so FUSE_COMPAT_ENTRY_OUT_SIZE offset should be used instead in this case.

The attached patch should fix the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.