Page MenuHomeFreeBSD

unistd.h: Add a new pathconf variable for UF_HIDDEN/UF_SYSTEM
ClosedPublic

Authored by rmacklem on Jul 5 2025, 8:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 4, 11:05 AM
Unknown Object (File)
Wed, Aug 20, 9:06 AM
Unknown Object (File)
Mon, Aug 11, 2:03 AM
Unknown Object (File)
Sun, Aug 10, 8:07 PM
Unknown Object (File)
Sat, Aug 9, 4:29 AM
Unknown Object (File)
Aug 2 2025, 12:25 PM
Unknown Object (File)
Jul 29 2025, 2:12 AM
Unknown Object (File)
Jul 26 2025, 4:49 AM
Subscribers

Details

Summary

For the NFSv4 server to implement the "hidden" and
"system" attributes, it needs to know if UF_HIDDEN,
UF_SYSTEM are supported for the file.

This patch adds a new pathconf variable called
_PC_HAS_HIDDENSYSTEM to do that. The ZFS patch
will be handled separately as a OpenZFS pull request.

Although this pathconf variable may be queried
by applications using pathconf(2), the current
interface where chflags(2) returns EOPNOTSUPP
may still be used to check if the flags are set.

Test Plan

Tested with a kernel which has NFSv4 client and
server patches for UF_HIDDEN and UF_SYSTEM.

These NFSv4 patches will be committed once this patch
has been reviewed/committed.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

The var should be added to libsys/pathconf.2

This revision is now accepted and ready to land.Jul 5 2025, 9:03 PM