Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2024 18:24:13 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 277908] zfs: cannot lookup extended attributes in capability mode
Message-ID:  <bug-277908-227-JiHcU5wnL4@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-277908-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-277908-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277908

--- Comment #3 from Alan Somers <asomers@FreeBSD.org> ---
This patch fixes the problem for me.  A similar patch is probably necessary=
 to
set extended attributes.  However, as security-sensitive code, we need to g=
et
this reviewed carefully.

diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
index 7f4f8e2e2f78..a4bfb75ff647 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -5362,7 +5362,7 @@ zfs_getextattr_dir(struct vop_getextattr_args *ap, co=
nst
char *attrname)
 #else
        NDINIT_ATVP(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, attrname, xvp);
 #endif
-       error =3D vn_open_cred(&nd, &flags, 0, VN_OPEN_INVFS, ap->a_cred, N=
ULL);
+       error =3D vn_open_cred(&nd, &flags, 0, VN_OPEN_INVFS |
VN_OPEN_NOCAPCHECK, ap->a_cred, NULL);
        if (error !=3D 0)
                return (SET_ERROR(error));
        vp =3D nd.ni_vp;

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277908-227-JiHcU5wnL4>