[PATCH] selftests/landlock: Remove invalid unix socket bind()
Matthieu Buffet
matthieu at buffet.re
Tue Dec 2 21:46:37 UTC 2025
Hi Günther,
On 12/2/2025 9:37 AM, Günther Noack wrote:
> Optional: In hindsight, I think it would be nice to simplify the way
> that we calculate the address length here. I probably mis-read
> unix(7) at the time, where a similar formula is used (but with a
> "+1"). Re-reading it, it seems that just passing sizeof(cli_un) as
> the address length would have been the simpler and less error prone
> solution:
You're right, the rest of the code uses non-NULL-terminated pathnames.
Not a problem per se on Linux, but these computations make tests less
readable. I will send a patch based on this fix. Thanks!
Matthieu
More information about the Linux-security-module-archive
mailing list