]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/landlock: Fix readlink check
authorMickaël Salaün <mic@digikod.net>
Wed, 28 May 2025 14:44:25 +0000 (16:44 +0200)
committerMickaël Salaün <mic@digikod.net>
Thu, 19 Jun 2025 11:55:38 +0000 (13:55 +0200)
commit94a7ce26428d3a7ceb46c503ed726160578b9fcc
treeea9e77d402670b68f4e975f465b2caf639e4532a
parente04c78d86a9699d136910cfc0bdcf01087e3267e
selftests/landlock: Fix readlink check

The audit_init_filter_exe() helper incorrectly checks the readlink(2)
error because an unsigned integer is used to store the result.  Use a
signed integer for this check.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/aDbFwyZ_fM-IO7sC@stanley.mountain
Fixes: 6a500b22971c ("selftests/landlock: Add tests for audit flags and domain IDs")
Reviewed-by: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20250528144426.1709063-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/audit.h