Skip to content

Commit f8e2019

Browse files
gnoackl0kod
authored andcommitted
samples/landlock: Bump ABI version to 8
The sample tool should print a warning if it is not running on a kernel that provides the newest Landlock ABI version. Link: https://lore.kernel.org/all/[email protected]/ Suggested-by: Mickaël Salaün <[email protected]> Signed-off-by: Günther Noack <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mickaël Salaün <[email protected]>
1 parent bb8369e commit f8e2019

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

samples/landlock/sandboxer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static bool check_ruleset_scope(const char *const env_var,
299299

300300
/* clang-format on */
301301

302-
#define LANDLOCK_ABI_LAST 7
302+
#define LANDLOCK_ABI_LAST 8
303303

304304
#define XSTR(s) #s
305305
#define STR(s) XSTR(s)
@@ -436,7 +436,8 @@ int main(const int argc, char *const argv[], char *const *const envp)
436436
/* Removes LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON for ABI < 7 */
437437
supported_restrict_flags &=
438438
~LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON;
439-
439+
__attribute__((fallthrough));
440+
case 7:
440441
/* Must be printed for any ABI < LANDLOCK_ABI_LAST. */
441442
fprintf(stderr,
442443
"Hint: You should update the running kernel "

0 commit comments

Comments
 (0)