aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-10-17 13:23:09 -0700
committerBrian Behlendorf <[email protected]>2012-10-17 13:26:18 -0700
commitc7dfc086297b6e7768e94d1eef3afaa58beeb5ec (patch)
tree274dc723f6668a45947e6370e5499161e1368db3 /module/zfs
parent658a0140f3d27f04fb789f5a0fe8ea00773a210a (diff)
Quote snapshot and mountpoint for .zfs automount
When automounting a snapshot in the .zfs/snapshot directory make sure to quote both the dataset name and the mount point. This ensures that if either component contains spaces, which are allowed, they get handled correctly. Signed-off-by: Brian Behlendorf <[email protected]> Closes #1027
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zfs_ctldir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
index 41d336564..d139b8613 100644
--- a/module/zfs/zfs_ctldir.c
+++ b/module/zfs/zfs_ctldir.c
@@ -681,7 +681,7 @@ zfsctl_snapdir_inactive(struct inode *ip)
"exec 0</dev/null " \
" 1>/dev/null " \
" 2>/dev/null; " \
- "umount -t zfs -n %s%s"
+ "umount -t zfs -n '%s%s'"
static int
__zfsctl_unmount_snapshot(zfs_snapentry_t *sep, int flags)
@@ -781,7 +781,7 @@ zfsctl_unmount_snapshots(zfs_sb_t *zsb, int flags, int *count)
"exec 0</dev/null " \
" 1>/dev/null " \
" 2>/dev/null; " \
- "mount -t zfs -n %s %s"
+ "mount -t zfs -n '%s' '%s'"
int
zfsctl_mount_snapshot(struct path *path, int flags)