]> git.proxmox.com Git - mirror_zfs-debian.git/commit
mount.zfs: canonicalize mount point for mtab
authornordaux <nordaux@gmail.com>
Mon, 13 Feb 2012 03:44:20 +0000 (05:44 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 15 Nov 2012 22:28:52 +0000 (14:28 -0800)
commit33364b15d302abfb2945129994b9cf42e61dc302
tree7be015e83f34df3172b473400606a688848d466c
parent54602c37718eca0dbeb668321edf5dfc41dcbe93
mount.zfs: canonicalize mount point for mtab

Canonicalize the mount point passed to the mount.zfs helper.
This way a clean path is always added to mtab which ensures
the umount can properly locate and remove the entry.

Test case:
$ mkdir /mnt/foo
$ mount -t zfs zpool/foo /mnt/../mnt/foo////
$ umount /mnt/foo
$ cat /etc/mtab | grep zpool/foo
zpool/foo /mnt/../mnt/foo//// zfs rw 0 0

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #573
cmd/mount_zfs/mount_zfs.c