projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1be6f21
)
remount-fs: refuse to remount based on fstab when fstab=no kernel command line option...
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 8 Aug 2023 17:02:23 +0000
(
02:02
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 9 Aug 2023 08:59:41 +0000
(17:59 +0900)
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.
src/remount-fs/remount-fs.c
patch
|
blob
|
history
diff --git
a/src/remount-fs/remount-fs.c
b/src/remount-fs/remount-fs.c
index 25e661105b06b429f889c172b1eaeec22f2ab756..2874a0390de2d0cd0f44efdf1af221816e570437 100644
(file)
--- a/
src/remount-fs/remount-fs.c
+++ b/
src/remount-fs/remount-fs.c
@@
-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)