Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177720327
D49691.1795126017.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D49691.1795126017.diff
View Options
diff --git a/lib/libsys/open.2.xattr b/lib/libsys/open.2
--- a/lib/libsys/open.2.xattr
+++ b/lib/libsys/open.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd February 28, 2025
+.Dd April 3, 2025
.Dt OPEN 2
.Os
.Sh NAME
@@ -210,6 +210,8 @@
open file referenced by
.Fa fd
if path is empty
+.It Dv O_NAMEDATTR
+open a named attribute directory or named attribute
.El
.Pp
Exactly one of the flags
@@ -499,6 +501,37 @@
.Dv O_CLOEXEC
flag.
.Pp
+When the
+.Dv O_NAMEDATTR
+flag is specified for an
+.Fn open
+or
+.Fn openat
+a named attribute directory for the file object
+is opened and not the file object itself.
+If the
+.Dv O_CREAT
+flag has been specified as well, the named attribute directory will be
+created if it does not exist.
+This directory provides a list of the named attributes associated with
+the file object.
+The file descriptor returned by this
+.Fn open
+can then be used as the
+.Fa fd
+argument of an
+.Fn openat
+to open a named attribute that is associated with the file object.
+The
+.Fa path
+argument for this
+.Fn openat
+must be a single component name with no imbedded
+.Dq / .
+(See
+.Xr named_attribute 7
+for more information.)
+.Pp
The system imposes a limit on the number of file descriptors
open simultaneously by one process.
The
@@ -730,6 +763,10 @@
.Dv vfs.lookup_cap_dotdot
.Xr sysctl 3
is set, and the process is in capability mode.
+.It Bq Er ENOATTR
+.Dv O_NAMEDATTR
+has been specified and the file object is not a named attribute
+directory or named attribute.
.El
.Sh SEE ALSO
.Xr chmod 2 ,
@@ -745,7 +782,8 @@
.Xr umask 2 ,
.Xr write 2 ,
.Xr fopen 3 ,
-.Xr capsicum 4
+.Xr capsicum 4 ,
+.Xr named_attribute 7
.Sh STANDARDS
These functions are specified by
.St -p1003.1-2008 .
@@ -794,6 +832,8 @@
.Fx 8.0 .
.Dv O_DSYNC
appeared in 13.0.
+.Dv O_NAMEDATTR
+appeared in 15.0.
.Sh BUGS
The
.Fa mode
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 19, 10:06 PM (20 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41854059
Default Alt Text
D49691.1795126017.diff (1 KB)
Attached To
Mode
D49691: open.2: Document the O_NAMEDATTR flag added recently
Attached
Detach File
Event Timeline