-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly prevent mounting over an existing mount #348
Conversation
6f9affc
to
e5f7b85
Compare
@@ -251,14 +251,6 @@ impl CliArgs { | |||
fn main() -> anyhow::Result<()> { | |||
let args = CliArgs::parse(); | |||
|
|||
// validate mount point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we okay moving this validation to the background process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be -- it was the only validation we were doing in the foreground process previously, and we shouldn't be doing any work at all before the fork.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, but we need to update the tests.
192edaa
to
db4ac2e
Compare
db4ac2e
to
a5aed49
Compare
a5aed49
to
ee95caf
Compare
@@ -31,6 +31,7 @@ time = { version = "0.3.17", features = ["macros", "formatting"] } | |||
const_format = "0.2.30" | |||
home = "0.5.4" | |||
serde_json = "1.0.95" | |||
procfs = { version = "0.15.1", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this platform-specific?
It's valid to mount multiple file systems to the same directory, but doing so requires the first one to be mounted read-write, which is why this wasn't a problem for us until awslabs#327. It seems libfuse2's version of fusermount explicitly checked this(?), but libfuse3 no longer rejects it. In principle this might be something we'd want to allow, but I think the less surprising/error-prone customer experience is to refuse to do it, so let's explicitly forbid it. Signed-off-by: James Bornholt <[email protected]>
a6c2b49
to
486c145
Compare
It's valid to mount multiple file systems to the same directory, but doing so requires the first one to be mounted read-write, which is why this wasn't a problem for us until awslabs#327. It seems libfuse2's version of fusermount explicitly checked this(?), but libfuse3 no longer rejects it. In principle this might be something we'd want to allow, but I think the less surprising/error-prone customer experience is to refuse to do it, so let's explicitly forbid it. Signed-off-by: James Bornholt <[email protected]>
Description of change
It's valid to mount multiple file systems to the same directory, but
doing so requires the first one to be mounted read-write, which is why
this wasn't a problem for us until #327. It seems libfuse2's version of
fusermount explicitly checked this(?), but libfuse3 no longer rejects
it.
In principle this might be something we'd want to allow, but I think the
less surprising/error-prone customer experience is to refuse to do it,
so let's explicitly forbid it.
Does this change impact existing behavior?
No.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).