From e15ad182dd0a04b3833eeb6b9c1051055ca63b50 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 11 Jul 2023 20:18:19 +0200 Subject: [PATCH] test: actually mount / read-only --- src/test/test-execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 27d2af78f3..9705cbce59 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -1289,7 +1289,7 @@ static int prepare_ns(const char *process_name) { _cleanup_free_ char *unit_dir = NULL; /* Make "/" read-only. */ - assert_se(mount_nofollow_verbose(LOG_DEBUG, NULL, "/", NULL, MS_BIND|MS_REMOUNT, NULL) >= 0); + assert_se(mount_nofollow_verbose(LOG_DEBUG, NULL, "/", NULL, MS_BIND|MS_REMOUNT|MS_RDONLY, NULL) >= 0); /* Creating a new user namespace in the above means all MS_SHARED mounts become MS_SLAVE. * Let's put them back to MS_SHARED here, since that's what we want as defaults. (This will