mirror of https://github.com/mkerrisk/man-pages
fcntl.2: srcfix: start new sentences on new lines; rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
a25d701d19
commit
12cfd6227c
76
man2/fcntl.2
76
man2/fcntl.2
|
@ -1300,19 +1300,25 @@ of buffer space currently used to store data produces the error
|
||||||
.BR F_GETPIPE_SZ " (\fIvoid\fP; since Linux 2.6.35)"
|
.BR F_GETPIPE_SZ " (\fIvoid\fP; since Linux 2.6.35)"
|
||||||
Return (as the function result) the capacity of the pipe referred to by
|
Return (as the function result) the capacity of the pipe referred to by
|
||||||
.IR fd .
|
.IR fd .
|
||||||
|
.\"
|
||||||
.SS File Sealing
|
.SS File Sealing
|
||||||
File seals limit the set of allowed operations on a given file. For each
|
File seals limit the set of allowed operations on a given file.
|
||||||
seal that is set on a file, a specific set of operations will fail with
|
For each seal that is set on a file,
|
||||||
|
a specific set of operations will fail with
|
||||||
.B EPERM
|
.B EPERM
|
||||||
on this file from now on. The file is said to be sealed. The default set of
|
on this file from now on.
|
||||||
seals depends on the type of the underlying file and filesystem. Currently, only
|
The file is said to be sealed.
|
||||||
shmem supports sealing. On other filesystems, all
|
The default set of seals depends on the type of the underlying
|
||||||
|
file and filesystem.
|
||||||
|
Currently, only shmem supports sealing.
|
||||||
|
On other filesystems, all
|
||||||
.BR fcntl (2)
|
.BR fcntl (2)
|
||||||
operations that operate on seals will return
|
operations that operate on seals will return
|
||||||
.BR EINVAL .
|
.BR EINVAL .
|
||||||
Seals are a property of an inode. Thus, all open files on an inode share the
|
Seals are a property of an inode.
|
||||||
same set of seals. Furthermore, seals can never be removed, only added. If a
|
Thus, all open files on an inode share the same set of seals.
|
||||||
seal is set, it is guaranteed to be enforced immediately.
|
Furthermore, seals can never be removed, only added.
|
||||||
|
If a seal is set, it is guaranteed to be enforced immediately.
|
||||||
The following set of seals is available so far:
|
The following set of seals is available so far:
|
||||||
.RS
|
.RS
|
||||||
.TP
|
.TP
|
||||||
|
@ -1323,14 +1329,14 @@ with
|
||||||
.B F_ADD_SEALS
|
.B F_ADD_SEALS
|
||||||
will fail with
|
will fail with
|
||||||
.BR EPERM .
|
.BR EPERM .
|
||||||
Therefore, this seal prevents any modifications to the set of seals itself. If
|
Therefore, this seal prevents any modifications to the set of seals itself.
|
||||||
the initial set of seals of a file includes
|
If the initial set of seals of a file includes
|
||||||
.BR F_SEAL_SEAL ,
|
.BR F_SEAL_SEAL ,
|
||||||
then this effectively causes the set of seals to be constant and locked.
|
then this effectively causes the set of seals to be constant and locked.
|
||||||
.TP
|
.TP
|
||||||
.BR F_SEAL_SHRINK
|
.BR F_SEAL_SHRINK
|
||||||
If this seal is set, the file in question cannot be reduced in size. This
|
If this seal is set, the file in question cannot be reduced in size.
|
||||||
affects
|
This affects
|
||||||
.BR open (2)
|
.BR open (2)
|
||||||
with the
|
with the
|
||||||
.B O_TRUNC
|
.B O_TRUNC
|
||||||
|
@ -1338,12 +1344,12 @@ flag and
|
||||||
.BR ftruncate (2).
|
.BR ftruncate (2).
|
||||||
They will fail with
|
They will fail with
|
||||||
.B EPERM
|
.B EPERM
|
||||||
if you try to shrink the file in question. Increasing the file size is still
|
if you try to shrink the file in question.
|
||||||
possible.
|
Increasing the file size is still possible.
|
||||||
.TP
|
.TP
|
||||||
.BR F_SEAL_GROW
|
.BR F_SEAL_GROW
|
||||||
If this seal is set, the size of the file in question cannot be increased. This
|
If this seal is set, the size of the file in question cannot be increased.
|
||||||
affects
|
This affects
|
||||||
.BR write (2)
|
.BR write (2)
|
||||||
if you write across size boundaries,
|
if you write across size boundaries,
|
||||||
.BR ftruncate (2)
|
.BR ftruncate (2)
|
||||||
|
@ -1351,23 +1357,25 @@ and
|
||||||
.BR fallocate (2).
|
.BR fallocate (2).
|
||||||
These calls will fail with
|
These calls will fail with
|
||||||
.B EPERM
|
.B EPERM
|
||||||
if you use them to increase the file size or write beyond size boundaries. If
|
if you use them to increase the file size or write beyond size boundaries.
|
||||||
you keep the size or shrink it, those calls still work as expected.
|
If you keep the size or shrink it, those calls still work as expected.
|
||||||
.TP
|
.TP
|
||||||
.BR F_SEAL_WRITE
|
.BR F_SEAL_WRITE
|
||||||
If this seal is set, you cannot modify data contents of the file. Note that
|
If this seal is set, you cannot modify data contents of the file.
|
||||||
shrinking or growing the size of the file is still possible and allowed. Thus,
|
Note that shrinking or growing the size of the file is
|
||||||
this seal is normally used in combination with one of the other seals. This seal
|
still possible and allowed.
|
||||||
affects
|
Thus, this seal is normally used in combination with one of the other seals.
|
||||||
|
This seal affects
|
||||||
.BR write (2)
|
.BR write (2)
|
||||||
and
|
and
|
||||||
.BR fallocate (2)
|
.BR fallocate (2)
|
||||||
(only in combination with the
|
(only in combination with the
|
||||||
.B FALLOC_FL_PUNCH_HOLE
|
.B FALLOC_FL_PUNCH_HOLE
|
||||||
flag). Those calls will fail with
|
flag).
|
||||||
|
Those calls will fail with
|
||||||
.B EPERM
|
.B EPERM
|
||||||
if this seal is set. Furthermore, trying to create new shared, writable
|
if this seal is set.
|
||||||
memory-mappings via
|
Furthermore, trying to create new shared, writable memory-mappings via
|
||||||
.BR mmap (2)
|
.BR mmap (2)
|
||||||
will also fail with
|
will also fail with
|
||||||
.BR EPERM .
|
.BR EPERM .
|
||||||
|
@ -1379,8 +1387,9 @@ with
|
||||||
.B F_ADD_SEALS
|
.B F_ADD_SEALS
|
||||||
will fail with
|
will fail with
|
||||||
.B EBUSY
|
.B EBUSY
|
||||||
if any writable, shared mapping exists. You have to unmap
|
if any writable, shared mapping exists.
|
||||||
those before you can add this seal. Furthermore, if there are any asynchronous
|
You have to unmap those before you can add this seal.
|
||||||
|
Furthermore, if there are any asynchronous
|
||||||
I/O operations pending on the file, all outstanding writes will be discarded.
|
I/O operations pending on the file, all outstanding writes will be discarded.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
|
@ -1389,8 +1398,9 @@ Add the seals given in
|
||||||
.I arg
|
.I arg
|
||||||
to the set of seals of the inode pointed to by the file-descriptor
|
to the set of seals of the inode pointed to by the file-descriptor
|
||||||
.IR fd .
|
.IR fd .
|
||||||
Seals cannot be removed again. Once this call succeeds, the seals are enforced
|
Seals cannot be removed again.
|
||||||
by the kernel immediately. If the current set of seals includes
|
Once this call succeeds, the seals are enforced by the kernel immediately.
|
||||||
|
If the current set of seals includes
|
||||||
.B F_SEAL_SEAL
|
.B F_SEAL_SEAL
|
||||||
then this call will be rejected with
|
then this call will be rejected with
|
||||||
.BR EPERM .
|
.BR EPERM .
|
||||||
|
@ -1399,11 +1409,11 @@ Adding a seal that is already set is a no-op, in case
|
||||||
is not set already.
|
is not set already.
|
||||||
.TP
|
.TP
|
||||||
.BR F_GET_SEALS " (\fIvoid\fP; since Linux TBD)"
|
.BR F_GET_SEALS " (\fIvoid\fP; since Linux TBD)"
|
||||||
Return (as the function result) the current set of seals of the inode referred
|
Return (as the function result) the current set of seals
|
||||||
to by
|
of the inode referred to by
|
||||||
.IR fd .
|
.IR fd .
|
||||||
If no seals are set, 0 is returned. If the file does not support sealing, -1 is
|
If no seals are set, 0 is returned.
|
||||||
returned and
|
If the file does not support sealing, -1 is returned and
|
||||||
.I errno
|
.I errno
|
||||||
is set to
|
is set to
|
||||||
.BR EINVAL .
|
.BR EINVAL .
|
||||||
|
|
Loading…
Reference in New Issue