X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fsecure-mount.c;h=3ef6edf20b5a5035763d6fd3653c57866c267482;hb=e49854bb7ba6166ef48c925e75e0afec2c45e7ba;hp=57fe87424f61171ac6786c9f509736b17cc7b80e;hpb=569b1bfe1e5954fa083532dc37d2fe7418ec2d4a;p=util-vserver.git diff --git a/src/secure-mount.c b/src/secure-mount.c index 57fe874..3ef6edf 100644 --- a/src/secure-mount.c +++ b/src/secure-mount.c @@ -418,6 +418,8 @@ canHandleInternal(struct MountInfo const *mnt) if (!mnt) return false; else if ((mnt->flag & (MS_BIND|MS_MOVE))) return true; + else if ((mnt->flag & (MS_SHARED|MS_SLAVE|MS_PRIVATE| + MS_UNBINDABLE))) return true; else if (mnt->type==0) return false; for (i=FS+0; *i!=0; ++i) @@ -448,8 +450,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;