Thread (5 messages) 5 messages, 3 authors, 2023-02-27

Re: [PATCH v4] landlock: Clarify documentation for the LANDLOCK_ACCESS_FS_REFER right

From: Alejandro Colomar <hidden>
Date: 2023-02-27 13:30:22
Also in: linux-doc

Hi Mickaël,

On 2/27/23 12:02, Mickaël Salaün wrote:
On 25/02/2023 00:00, Alex Colomar wrote:
quoted
Hi Günther,

On 2/21/23 17:52, Günther Noack wrote:
[...]

Sorry for taking so much time in looking into this!
quoted
+ *
+ *   * The reparented file may not gain more access rights in the destination
+ *     directory than it previously had in the source directory.  If this is
+ *     attempted, the operation results in an ``EXDEV`` error.
+ *
+ *   * When linking or renaming, the ``LANDLOCK_ACCESS_FS_MAKE_*`` right for the
+ *     respective file type must be granted for the destination directory.
+ *     Otherwise, the operation results in an ``EACCES`` error.
+ *
+ *   * When renaming, the ``LANDLOCK_ACCESS_FS_REMOVE_*`` right for the
+ *     respective file type must be granted for the source directory.  Otherwise,
+ *     the operation results in an ``EACCES`` error.
+ *
+ *   If multiple requirements are not met, the ``EACCES`` error code takes
+ *   precedence over ``EXDEV``.
Is this something worth guaranteeing, or just an implementation detail
that may easily change?
There is a deliberate effort to keep this error priority to be able to 
know if a rename or link action can be replaced with a file copy, which 
is useful e.g., for `mv`.
Thanks.  Then it LGTM.

Cheers!

Alex


-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help