{ "noauto", 0, 0, XFLAG_NOAUTO, false },
{ "user", 0, 0, 0, false },
{ "nouser", 0, 0, 0, false },
+ { "rec", MS_REC, MS_REC, 0, false },
+ { "unbindable", MS_UNBINDABLE, MS_UNBINDABLE, 0, false },
+ { "private", MS_PRIVATE, MS_PRIVATE, 0, false },
+ { "slave", MS_SLAVE, MS_SLAVE, 0, false },
+ { "shared", MS_SHARED, MS_SHARED, 0, false },
};
int wrapper_exit_code = 1;
perror("secure-mount: mount()");
return false;
}
+ if ((mnt->flag & MS_BIND) &&
+ (mnt->flag & ~(MS_BIND|MS_REC))) {
+ /* This is needed to put us in the new mountpoint */
+ if (!secureChdir(mnt->dst, opt))
+ return false;
+ if (mount(mnt->src, ".",
+ mnt->type ? mnt->type : "",
+ ((mnt->flag & ~(MS_BIND|MS_REC)) |
+ MS_REMOUNT), NULL) == -1 &&
+ errno != EBUSY) { /* Returned on older kernels */
+ perror("secure-mount: mount()");
+ return false;
+ }
+ }
}
else if (!callExternalMount(mnt))
return false;