From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 3/4] landlock: add landlock09 test
Date: Thu, 27 Mar 2025 17:50:03 +0100 [thread overview]
Message-ID: <Z-WBu_MGIjlf-s8M@yuki.lan> (raw)
In-Reply-To: <20250327-landlock_unix_socket-v1-3-584653f66d9c@suse.com>
Hi!
> Create landlock09 test in order to verify that sandboxed processes
> enforced with LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET rule can't
> connect to any UNIX socket from non-sandboxed processes.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> testcases/kernel/syscalls/landlock/.gitignore | 1 +
> testcases/kernel/syscalls/landlock/landlock09.c | 132 +++++++++++++++++++++
> .../kernel/syscalls/landlock/landlock_common.h | 11 ++
> 3 files changed, 144 insertions(+)
Runtest entry?
> +/*\
> + * Verify that landlock's LANDLOCK_SCOPE_ABSTRACT_UNIX_SOCKET rule reject any
> + * connect() coming from a client on a different server domain, but accept any
> + * connection.
> + */
> +
> +#include "tst_test.h"
> +#include "landlock_common.h"
> +
> +#define SOCKET_NAME "test.sock"
> +#define ABSTRACT_SOCKET_NAME "\0"SOCKET_NAME
> +#define SOCKET_LENGTH (offsetof(struct sockaddr_un, sun_path) + strlen(SOCKET_NAME) + 1)
^
SIZE
> +enum {
> + DOMAIN_CLIENT = 0,
> + DOMAIN_SERVER,
> + DOMAIN_BOTH,
> + DOMAIN_LENGTH,
^
CNT
Other than that:
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-03-27 16:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-27 11:07 [LTP] [PATCH 0/4] Landlock tests for ABI v6 Andrea Cervesato
2025-03-27 11:07 ` [LTP] [PATCH 1/4] Add landlock ABI v6 fallback Andrea Cervesato
2025-03-27 17:02 ` Cyril Hrubis
2025-03-27 11:07 ` [LTP] [PATCH 2/4] landlock02: support landlock ABI v6 Andrea Cervesato
2025-03-27 17:00 ` Cyril Hrubis
2025-03-27 11:08 ` [LTP] [PATCH 3/4] landlock: add landlock09 test Andrea Cervesato
2025-03-27 16:50 ` Cyril Hrubis [this message]
2025-03-27 11:08 ` [LTP] [PATCH 4/4] landlock: add landlock10 test Andrea Cervesato
2025-03-27 16:52 ` Cyril Hrubis
2025-03-27 13:18 ` [LTP] [PATCH 0/4] Landlock tests for ABI v6 Petr Vorel
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=Z-WBu_MGIjlf-s8M@yuki.lan \
--to=chrubis@suse.cz \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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