1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-13 00:58:27 +03:00

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:
Yu Watanabe 2023-08-09 02:02:23 +09:00
parent 1be6f21320
commit a38de31c8b

View File

@ -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)