linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: "Mickaël Salaün" <mic@digikod.net>,
	"Günther Noack" <gnoack3000@gmail.com>
Cc: linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org,
	Jonathan Corbet <corbet@lwn.net>,
	Paul Moore <paul@paul-moore.com>,
	Konstantin Meskhidze <konstantin.meskhidze@huawei.com>,
	Xiu Jianfeng <xiujianfeng@huawei.com>
Subject: Re: [PATCH v4] landlock: Clarify documentation for the LANDLOCK_ACCESS_FS_REFER right
Date: Mon, 27 Feb 2023 14:30:16 +0100	[thread overview]
Message-ID: <d9656d65-5ab2-bdb7-ffda-b37b8cad4fab@gmail.com> (raw)
In-Reply-To: <796789c7-24bd-f1f1-c402-c88b46253008@digikod.net>


[-- Attachment #1.1: Type: text/plain, Size: 1544 bytes --]

Hi Mickaël,

On 2/27/23 12:02, Mickaël Salaün wrote:
> 
> On 25/02/2023 00:00, Alex Colomar wrote:
>> Hi Günther,
>>
>> On 2/21/23 17:52, Günther Noack wrote:
>> [...]
>>
>> Sorry for taking so much time in looking into this!
>>
>>> + *
>>> + *   * 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2023-02-27 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 16:52 [PATCH v4] landlock: Clarify documentation for the LANDLOCK_ACCESS_FS_REFER right Günther Noack
2023-02-21 17:22 ` Mickaël Salaün
2023-02-24 23:00 ` Alex Colomar
2023-02-27 11:02   ` Mickaël Salaün
2023-02-27 13:30     ` Alejandro Colomar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d9656d65-5ab2-bdb7-ffda-b37b8cad4fab@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=corbet@lwn.net \
    --cc=gnoack3000@gmail.com \
    --cc=konstantin.meskhidze@huawei.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=paul@paul-moore.com \
    --cc=xiujianfeng@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).