remount-fs: refuse to remount based on fstab when fstab=no kernel command line option specified
Otherwise, if for some reasons remount-fs is invoked even when fstab=no is specified, mounts may get unexpected options from fstab. For safety, let's parse the kernel command line option.
This commit is contained in:
@@ -78,6 +78,9 @@ static int remount_by_fstab(Hashmap **ret_pids) {
|
||||
|
||||
assert(ret_pids);
|
||||
|
||||
if (!fstab_enabled())
|
||||
return 0;
|
||||
|
||||
f = setmntent(fstab_path(), "re");
|
||||
if (!f) {
|
||||
if (errno != ENOENT)
|
||||
|
||||
Reference in New Issue
Block a user