-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Disable mount(8) canonical paths in do_mount() #6437
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
Disable mount(8) canonical paths in do_mount() #6437
Conversation
Let me get this tested on CentOS 7 so I can verify we can drop the change to the unit file. |
@loli10K I can verify that diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mo
index 36dc3be..0664fd9 100644
--- a/etc/systemd/system/zfs-mount.service.in
+++ b/etc/systemd/system/zfs-mount.service.in
@@ -11,7 +11,6 @@ Before=local-fs.target
Type=oneshot
RemainAfterExit=yes
ExecStart=@sbindir@/zfs mount -a
-WorkingDirectory=-/sbin/
[Install]
WantedBy=zfs-share.service |
By default the mount(8) command, as invoked by 'zfs mount', will try to resolve any path parameter in its canonical form: this could lead to mount failures when the cwd contains a symlink having the same name of the dataset being mounted. Fix this by explicitly disabling mount(8) path canonicalization. Signed-off-by: loli10K <[email protected]>
616656d
to
9485536
Compare
By default the mount(8) command, as invoked by 'zfs mount', will try to resolve any path parameter in its canonical form: this could lead to mount failures when the cwd contains a symlink having the same name of the dataset being mounted. Fix this by explicitly disabling mount(8) path canonicalization. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #1791 Closes #6429 Closes #6437
By default the mount(8) command, as invoked by 'zfs mount', will try to resolve any path parameter in its canonical form: this could lead to mount failures when the cwd contains a symlink having the same name of the dataset being mounted. Fix this by explicitly disabling mount(8) path canonicalization. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes openzfs#1791 Closes openzfs#6429 Closes openzfs#6437
This change appears to prevent user-mode mounting of volumes:
Is it possible that the --no-canonicalize option could be used only when necessary? Or is there another solution to this that doesn't prevent user mounting? (System is Ubuntu 16.04, running latest ZoL from master) |
Description
By default the
mount(8)
command, as invoked byzfs mount
, will try to resolve any path parameter in its canonical form: this could lead to mount failures when the cwd contains a symlink having the same name of the dataset being mounted.Fix this by explicitly disabling
mount(8)
path canonicalization.Motivation and Context
Fix #1791
Maybe fix #6429: i don't have a reproducer to verify this could solve the issue addressed in d32d25c. If it does we could revert that change to the unit file since the systemd version used in CentOS7 does not (yet) support it.
How Has This Been Tested?
Tested manually, will probably need to add/modify something in
tests/zfs-tests/tests/functional/cli_root/zfs_mount
.This PR is mostly just to propose a possible fix for #6429.
Types of changes
Checklist:
Signed-off-by
.