Bug 208965 - extattr(2) doesn't allow attribute names of length EXTATTR_MAXNAMELEN
Summary: extattr(2) doesn't allow attribute names of length EXTATTR_MAXNAMELEN
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-21 22:21 UTC by Alan Somers
Modified: 2016-04-21 22:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2016-04-21 22:21:20 UTC
extattr(2) claims that attribute names may be up to EXTATTR_MAXNAMELEN in length.  However, in practice it only allows attribute names of up to EXTATTR_MAXNAMELEN - 1.

[alans@alans-fbsd-head2 /tmp]$ touch foo
[alans@alans-fbsd-head2 /tmp]$ ATTRNAME=`jot -b X -s "" 255 0`
[alans@alans-fbsd-head2 /tmp]$ setextattr user $ATTRNAME myvalue foo
setextattr: foo: failed: File name too long
Comment 1 Enji Cooper freebsd_committer 2016-04-21 22:27:28 UTC
(related to https://reviews.freebsd.org/D5889).