Skip to content

Commit

Permalink
remount: Still remount /sysroot writable if not configured ro
Browse files Browse the repository at this point in the history
Regression from 3564225
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1862568

We still need to remount writable if it's not configured on;
because it may need OS adjustments it needs to be opt-in.
  • Loading branch information
cgwalters committed Aug 1, 2020
1 parent a5409b8 commit 33eeb7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/switchroot/ostree-remount.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ main(int argc, char *argv[])
exit (EXIT_SUCCESS);
}

/* Handle remounting /sysroot read-only now */
if (unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0)
{
do_remount ("/sysroot", false);
}
/* Handle remounting /sysroot; if it's explicitly marked as read-only (opt in)
* then ensure it's readonly, otherwise mount writable, the same as /
*/
bool sysroot_configured_readonly = unlink (_OSTREE_SYSROOT_READONLY_STAMP) == 0;
do_remount ("/sysroot", !sysroot_configured_readonly);

/* If /var was created as as an OSTree default bind mount (instead of being a separate filesystem)
* then remounting the root mount read-only also remounted it.
Expand Down

0 comments on commit 33eeb7b

Please sign in to comment.