5-12-22 23:22:09 +0000 Commit: Rick Macklem CommitDate: 2025-12-22 23:22:09 +0000 nfs: Add some support for POSIX draft ACLs An internet draft (expected to become an RFC someday) https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls describes an extension to NFSv4.2 to handle POSIX draft ACLs. This is the final patch in the series that enables the extension of NFSv4.2 to support POSIX draft ACLs. At this time, only UFS mounted with the "acls" option will work, and only for FreeBSD built with these patches. Patches for client and server for the Linux kernel are in the works. (I'll admit my next little project is cleaning the Linux patches up for submission for upstream.) To make these changes really useful, the FreeBSD port of OpenZFS needs to be patched to add POSIX draft ACL support. (Support for POSIX draft ACLs is already in the Linux port of OpenZFS.) Interopeability with NFSv4.2 clients and servers that do not support this extension should not be a problem. Fixes: a35bbd5d9f5f ("nfscommon: Add some support for POSIX draft ACLs") --- sys/fs/nfs/nfsproto.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index 41150ef88188..6e67c5be3416 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -1208,7 +1208,11 @@ struct nfsv3_sattr { NFSATTRBM_SUPPATTREXCLCREAT | \ NFSATTRBM_CLONEBLKSIZE | \ NFSATTRBM_CHANGEATTRTYPE | \ - NFSATTRBM_XATTRSUPPORT) + NFSATTRBM_XATTRSUPPORT | \ + NFSATTRBM_ACLTRUEFORM | \ + NFSATTRBM_ACLTRUEFORMSCOPE | \ + NFSATTRBM_POSIXDEFAULTACL | \ + NFSATTRBM_POSIXACCESSACL) /* * These are the set only attributes. @@ -1238,7 +1242,9 @@ struct nfsv3_sattr { NFSATTRBM_TIMEMODIFYSET) #define NFSATTRBIT_SETABLE2 \ (NFSATTRBM_MODESETMASKED | \ - NFSATTRBM_MODEUMASK) + NFSATTRBM_MODEUMASK | \ + NFSATTRBM_POSIXDEFAULTACL | \ + NFSATTRBM_POSIXACCESSACL) /* * NFSATTRBIT_NFSV41 - Attributes only supported by NFSv4.1. @@ -1259,7 +1265,11 @@ struct nfsv3_sattr { (NFSATTRBM_CLONEBLKSIZE | \ NFSATTRBM_CHANGEATTRTYPE | \ NFSATTRBM_XATTRSUPPORT | \ - NFSATTRBM_MODEUMASK) + NFSATTRBM_MODEUMASK | \ + NFSATTRBM_ACLTRUEFORM | \ + NFSATTRBM_ACLTRUEFORMSCOPE | \ + NFSATTRBM_POSIXDEFAULTACL | \ + NFSATTRBM_POSIXACCESSACL) /* * Set of attributes that the getattr vnode op needs.