Add MS_REC to MS_RDONLY
authorRobert Swiecki <swiecki@google.com>
Thu, 25 Feb 2016 17:27:42 +0000 (18:27 +0100)
committerRobert Swiecki <swiecki@google.com>
Thu, 25 Feb 2016 17:27:42 +0000 (18:27 +0100)
contain.c

index 778065facd7127df1540432e024fc11fe7293725..d04ba8952eaf4243398f436fc3f477874d2e4734 100644 (file)
--- a/contain.c
+++ b/contain.c
@@ -251,9 +251,9 @@ static bool containRemountRO(struct mounts_t *mpt)
        if (mpt->flags &= MS_RDONLY) {
                LOG_D("Re-mounting RO '%s'", mpt->dst);
                if (mount
-                   (mpt->dst, mpt->dst, NULL, MS_BIND | MS_PRIVATE | MS_REMOUNT | MS_RDONLY,
+                   (mpt->dst, mpt->dst, NULL, MS_REC | MS_BIND | MS_PRIVATE | MS_REMOUNT | MS_RDONLY,
                     0) == -1) {
-                       PLOG_E("mount('%s', MS_REMOUNT|MS_RDONLY)", mpt->dst);
+                       PLOG_E("mount('%s', MS_REC|MS_BIND|MS_REMOUNT|MS_RDONLY)", mpt->dst);
                        return false;
                }
        }