MS_BIND
if ((flags & (MS_REMOUNT | MS_BIND)) == (MS_REMOUNT | MS_BIND))
if (flags & MS_BIND)
if (!(req->data.args[3] & MS_BIND))
if (mount("/tmp/foo", "/tmp/foo", NULL, MS_BIND, NULL) < 0) {
else if (flags & MS_BIND)
flags &= MS_REC | MS_BIND;
if (flags & MS_BIND)
} else if (flags & MS_BIND) {
flags &= ~MS_BIND;
if (mount(target, target, "none", MS_BIND, NULL)) {
ret = mount("/dev/pts/ptmx", "/dev/ptmx", NULL, MS_BIND, NULL);
ret = mount("/dev/pts/ptmx", ptmx, NULL, MS_BIND, NULL);
ret = mount("/", "/", NULL, MS_BIND, NULL);
ret = mount("/", "/", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/a", "/b", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/", "/b", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/", "/a/b", NULL, MS_BIND, NULL);
ret = mount("/a", "/a/new", NULL, MS_BIND, NULL);
ret = mount("/", "/", NULL, MS_BIND, NULL);
ret = mount("/", "/", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/a", "/b", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/", "/b", NULL, MS_BIND, NULL);
ret = mount("/", "/a", NULL, MS_BIND, NULL);
ret = mount("/", "/a/b", NULL, MS_BIND, NULL);
ret = mount("/a", "/a/new", NULL, MS_BIND, NULL);
ret = mount(root_mntpoint, root_mntpoint, NULL, MS_BIND, NULL);
ret = mount("/", "/", NULL, MS_BIND, NULL);
if (mount(subdir, subdir, NULL, MS_BIND, 0)) {
if (mount(subdir, subdir, 0, MS_BIND, NULL)) {
if (mount(mnt, mnt, NULL, MS_BIND, 0)) {
ASSERT_EQ(0, mount(dir_s1d2, dir_s2d2, NULL, MS_BIND, NULL));
MS_BIND, NULL));
NULL, MS_BIND, NULL));
MS_BIND | MS_REC, NULL));
.flags = MS_BIND,
MS_REMOUNT | MS_BIND | remount_flags, NULL) != 0) {
MS_REMOUNT | MS_BIND | invalid_flags, NULL) == 0) {
ret = mount(orig_path, dest_path, "bind", MS_BIND | MS_REC, NULL);
MS_REMOUNT | MS_BIND | orig_mnt_flags , NULL);
ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0);
ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0);
ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0);
if (mount(SET_GROUP_FROM, SET_GROUP_TO, NULL, MS_BIND, NULL))
ret = mount("/proc/self/ns/net", tmpfile, NULL, MS_BIND, NULL);
ASSERT_SUCCESS(mount("/proc/self/ns/pid", "/tmp/dummy/pidns", NULL, MS_BIND, NULL));