Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Nov 2013 10:45:05 +1100
From:      Peter Jeremy <peter@rulingia.com>
To:        freebsd-hackers@freebsd.org
Subject:   Are extended attributes data or meta-data?
Message-ID:  <20131108234505.GC8321@server.rulingia.com>

next in thread | raw e-mail | index | archive | help

--WChQLJJJfbwij+9x
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

I've been getting regular error messages logged by afpd:
Nov  9 00:00:19 server afpd[1966]: sys_getextattr_size: error: Permission d=
enied
I have spent some time digging into it and it's triggered by
extattr_get_link(2) returning EACCESS because a file is not readable,
but stat(2) on the file succeeded.

According to extattr(2), "[n]amed extended attributes are meta-data
associated with vnodes" but the actual code for VOP_GETEXTATTR() (at least
for ufs & zfs) checks for VREAD access, whereas the VOP_GETATTR() call
(used by stat(2)) doesn't include any access checks (so stat(2) will
succeed unless namei() fails).

IMHO, this behaviour is inconsistent:  The extended attributes are
documented as "meta-data" and but the access checks are for "data".
Which is correct?

--=20
Peter Jeremy

--WChQLJJJfbwij+9x
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (FreeBSD)

iKYEARECAGYFAlJ9d4FfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl
bnBncC5maWZ0aGhvcnNlbWFuLm5ldDBCRjc3QTcyNTg5NEVCRTY0RjREN0VFRUZF
OEE0N0JGRjAwRkI4ODcACgkQ/opHv/APuIdsXwCgifYKpNQPZjbFwD9/ShF0+Od9
TcQAni/HkJh9NkXA4zYgIhBZigDr6PHy
=hsuY
-----END PGP SIGNATURE-----

--WChQLJJJfbwij+9x--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131108234505.GC8321>