nfscl: Fix handling of POSIX draft default ACLs
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run

A POSIX draft default ACL may not exist.  As such,
an ACL with zero ACEs needs to be allowed.

This patch fixes acquisition of POSIX draft default
ACLs when they do not exist on the directory.

Fixes:	a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
This commit is contained in:
Rick Macklem 2025-12-30 18:43:23 -08:00
parent 4fecc8e3fe
commit e8567de718

View file

@ -3779,7 +3779,8 @@ nfs_getacl(struct vop_getacl_args *ap)
return (EINVAL);
error = nfsrpc_getacl(ap->a_vp, ap->a_type, ap->a_cred, ap->a_td,
ap->a_aclp);
if (error == 0 && ap->a_aclp->acl_cnt == 0)
if (error == 0 && ap->a_aclp->acl_cnt == 0 &&
ap->a_type != ACL_TYPE_DEFAULT)
return (EOPNOTSUPP);
if (error > NFSERR_STALE) {
(void) nfscl_maperr(ap->a_td, error, (uid_t)0, (gid_t)0);