Page MenuHomeFreeBSD

vfs_vnops.c: Modify the O_NAMEDATTR check for Solaris compatibility
ClosedPublic

Authored by rmacklem on Apr 18 2025, 11:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 31, 8:41 AM
Unknown Object (File)
Sun, Aug 24, 12:42 PM
Unknown Object (File)
Wed, Aug 20, 11:07 AM
Unknown Object (File)
Mon, Aug 18, 7:19 PM
Unknown Object (File)
Sun, Aug 10, 3:15 PM
Unknown Object (File)
Fri, Aug 8, 10:54 AM
Unknown Object (File)
Thu, Aug 7, 10:07 AM
Unknown Object (File)
Aug 3 2025, 2:00 PM
Subscribers

Details

Summary

The Solaris semantics for their O_XATTR flag is to use it
for a file object in the file system's namespace to indicate
that a named attribute for the file object should be open'd.

To do this, the O_NAMEDATTR flag must be allowed with a
non-named attribute directory. This patch changes vfs_vnops_cred()
to allow this.

This patch fixes 2ec2ba7e232d so that Solaris compatible
semantics can be implemented by patched ZFS code.

Test Plan

Tested with ZFS patched to support named attributes
in a Solaris compatible way.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Could you, please, add the description of the behavior you aiming to in the patch, to the summary and commit message?

sys/kern/vfs_vnops.c
287–288

Why not remove the if () check there, and move the vp = XXX; goto bad; block under the prev. condition? There is only one possibility to get error != 0 there, after the removal of ENOENT.

rmacklem marked an inline comment as done.
rmacklem edited the summary of this revision. (Show Details)

Cleaned up the "if" as suggested by kib@.

This revision is now accepted and ready to land.Apr 19 2025, 10:21 PM