linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: "Alejandro Colomar" <alx.manpages@gmail.com>,
	"Mickaël Salaün" <mic@digikod.net>
Cc: linux-man@vger.kernel.org, "Günther Noack" <gnoack3000@gmail.com>
Subject: [PATCH 2/4] landlock.7: Use LANDLOCK_* constants for compatibility table
Date: Wed, 19 Apr 2023 20:54:41 +0200	[thread overview]
Message-ID: <20230419185443.7368-3-gnoack3000@gmail.com> (raw)
In-Reply-To: <20230419185443.7368-1-gnoack3000@gmail.com>

As discussed in
https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
---
 man7/landlock.7 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/man7/landlock.7 b/man7/landlock.7
index fc4a95031..cb8a4f62e 100644
--- a/man7/landlock.7
+++ b/man7/landlock.7
@@ -438,9 +438,9 @@ and only use the available subset of access rights:
  * numbers hardcoded to keep the example short.
  */
 __u64 landlock_fs_access_rights[] = {
-    (1ULL << 13) \- 1,  /* ABI v1                 */
-    (1ULL << 14) \- 1,  /* ABI v2: add "refer"    */
-    (1ULL << 15) \- 1,  /* ABI v3: add "truncate" */
+    (LANDLOCK_ACCESS_FS_MAKE_SYM << 1) \- 1,  /* v1                 */
+    (LANDLOCK_ACCESS_FS_REFER    << 1) \- 1,  /* v2: add "refer"    */
+    (LANDLOCK_ACCESS_FS_TRUNCATE << 1) \- 1,  /* v3: add "truncate" */
 };
 
 int abi = landlock_create_ruleset(NULL, 0,
-- 
2.40.0


  parent reply	other threads:[~2023-04-19 18:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 18:54 [PATCH 0/4] landlock.7: Code example improvements Günther Noack
2023-04-19 18:54 ` [PATCH 1/4] landlock.7: Check syscall result with == -1 instead of <= 0 Günther Noack
2023-04-19 18:54 ` Günther Noack [this message]
2023-04-19 18:54 ` [PATCH 3/4] landlock.7: wfix: Error message wording in code example Günther Noack
2023-04-19 18:54 ` [PATCH 4/4] landlock.7: Return instead of exit() if Landlock is unusable Günther Noack
2023-04-19 20:37 ` [PATCH 0/4] landlock.7: Code example improvements Alejandro Colomar
2023-04-20 16:34   ` Mickaël Salaün

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=20230419185443.7368-3-gnoack3000@gmail.com \
    --to=gnoack3000@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mic@digikod.net \
    /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).