mountpoint-util: add helper that checks if MS_NOSYMFOLLOW is supported

This commit is contained in:
Lennart Poettering
2023-03-09 16:14:29 +01:00
parent c115e1615b
commit 7d3b157b77
3 changed files with 68 additions and 0 deletions
+4
View File
@@ -321,6 +321,10 @@ TEST(fd_is_mount_point) {
assert_se(fd_is_mount_point(fd, "", 0) == -EINVAL);
}
TEST(ms_nosymfollow_supported) {
log_info("MS_NOSYMFOLLOW supported: %s", yes_no(ms_nosymfollow_supported()));
}
static int intro(void) {
/* let's move into our own mount namespace with all propagation from the host turned off, so
* that /proc/self/mountinfo is static and constant for the whole time our test runs. */