]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
landlock.7: Return instead of exit() if Landlock is unusable
authorGünther Noack <gnoack3000@gmail.com>
Wed, 19 Apr 2023 18:54:43 +0000 (20:54 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 19 Apr 2023 20:31:49 +0000 (22:31 +0200)
When following a best effort approach,
we should not fail when Landlock is unusable,
but we should fall back to doing nothing.

Link: <https://lore.kernel.org/linux-man/5d90e3b0-1577-7efd-03b8-f94b6e50fbc1@digikod.net/>
Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man7/landlock.7

index 7067c058c8749b0623ae319f7b02570a152cdf41..b6c9d3821cfa97f210ee82776d87ba963be7ca3e 100644 (file)
@@ -451,7 +451,7 @@ if (abi == \-1) {
      * or Landlock was not enabled at boot time.
      */
     perror("Unable to use Landlock");
-    exit(EXIT_FAILURE);
+    return;  /* Graceful fallback: Do nothing. */
 }
 abi = MIN(abi, 3);