The remount still needs to have MS_BIND set.
[util-vserver.git] / src / secure-mount.c
index 57fe874..a58edf3 100644 (file)
@@ -448,8 +448,7 @@ mountSingle(struct MountInfo const *mnt, struct Options const *opt)
        return false;
       if (mount(mnt->src, ".",
                mnt->type ? mnt->type : "",
-               ((mnt->flag & ~(MS_BIND|MS_REC)) |
-               MS_REMOUNT), NULL) == -1 &&
+               (mnt->flag | MS_REMOUNT), NULL) == -1 &&
          errno != EBUSY) { /* Returned on older kernels */
        perror("secure-mount: mount()");
        return false;