projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f671548
)
mount-util: generate failure if bind_remount_one_with_mountinfo() is called on non...
author
Lennart Poettering
<lennart@poettering.net>
Wed, 24 Mar 2021 13:19:04 +0000
(14:19 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Fri, 7 May 2021 09:58:55 +0000
(11:58 +0200)
(cherry picked from commit
0338df47cfaeb023c7c2eaf6b698060fd133157b
)
src/shared/mount-util.c
patch
|
blob
|
history
diff --git
a/src/shared/mount-util.c
b/src/shared/mount-util.c
index f226dc1aa682e3a264c26615d47788ca8d268fec..13f202d7e7dfb241fb2eda925b9d2ecc7d289c1c 100644
(file)
--- a/
src/shared/mount-util.c
+++ b/
src/shared/mount-util.c
@@
-376,8
+376,12
@@
int bind_remount_one_with_mountinfo(
return r;
fs = mnt_table_find_target(table, path, MNT_ITER_FORWARD);
- if (!fs)
+ if (!fs) {
+ if (laccess(path, F_OK) < 0) /* Hmm, it's not in the mount table, but does it exist at all? */
+ return -errno;
+
return -EINVAL; /* Not a mount point we recognize */
+ }
opts = mnt_fs_get_vfs_options(fs);
if (opts) {